revert to hpcExample from XandY
@@ -3045,37 +3045,18 @@ def runJob(daydate):
try:
slurm_nnodes = int(os.environ['SLURM_NNODES'])
- except KeyError:
+ except:
print("Slurm environment not set. Are you running this in a job?")
- # Doing this instead of the exit allows it to run when not in slurm
- # at regular speed for when you are testing stuff.
- slurm_nnodes = 1
+ slurm_nnodes = 1 # Doing this instead of the exit allows it to run when not in slurm at regular speed for when you are testing stuff.
#exit(1)
print("entering runJob on node %s" % slurm_nnodes)
metdata = demo.readEPW(epwfile=epwfile, hpc=hpc, daydate=daydate)
-
- trackerdict = demo.set1axis(cumulativesky=cumulativesky,
- axis_azimuth=axis_azimuth,
- limit_angle=limit_angle,
- angledelta=angledelta,
- backtrack=backtrack,
- gcr=gcr)
-
+ trackerdict = demo.set1axis(cumulativesky=cumulativesky, axis_azimuth=axis_azimuth, limit_angle=limit_angle, angledelta=angledelta, backtrack=backtrack, gcr=gcr)
trackerdict = demo.gendaylit1axis(hpc=hpc)
-
- trackerdict = demo.makeScene1axis(trackerdict=trackerdict,
- moduletype=moduletype,
- sceneDict=sceneDict,
- cumulativesky=cumulativesky,
- hpc=hpc)
-
+ trackerdict = demo.makeScene1axis(trackerdict=trackerdict, moduletype=moduletype, sceneDict=sceneDict, cumulativesky=cumulativesky, hpc=hpc)
demo.makeOct1axis(trackerdict, hpc=True)
-
- trackerdict = demo.analysis1axis(trackerdict,
- modWanted=modWanted,
- rowWanted=rowWanted,
- sensorsy=sensorsy)
+ trackerdict = demo.analysis1axis(trackerdict, modWanted=modWanted, rowWanted=rowWanted, sensorsy=sensorsy)
def hpcExample():
@@ -3093,7 +3074,7 @@ def hpcExample():
from input_bf import *
else: # module imported or loaded normally
- from bifacial_radiance.readepw import readepw
+ from bifacial_radiance.readepw import readepw # epw file reader from pvlib development forums #module load format
from bifacial_radiance.load import loadTrackerDict
from bifacial_radiance.input_bf import *
@@ -3117,16 +3098,13 @@ def hpcExample():
Other important random notes:
Do not load conda twice nor activate .py3 twice.
- (following above) Either activate conda or .py3 in the login node
- or on the slurm
+ (following above) Either activate conda or .py3 in the login node or on the slurm
TO DO:
- # Test as a function (I usually replace the main section's content
- with this function's content.
+ # Test as a function (I usually replace the main section's content with this function's content.
# Figure why loading conda twice crashes
# Do a batch file to run this maybe?
- # More elegant way to read values from .py than importing
- (only works on declarations at the beginning)
+ # More elegant way to read values from .py than importing (only works on declarations at the beginning)
'''
