moved Routine from MAin to funcitondefinition of runJob
@@ -2665,25 +2665,10 @@ class AnalysisObj:
return frontDict, backDict
def runJob(daydate):
- try:
- slurm_nnodes = int(os.environ['SLURM_NNODES'])
- except:
- print("Slurm environment not set. Are you running this in a job?")
- exit(1)
-
- 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.gendaylit1axis(hpc=hpc) #benchmark time: gendaylit2:105s. gendaylit: 5s
- trackerdict = demo.makeScene1axis(trackerdict=trackerdict, moduletype=moduletype, sceneDict=sceneDict, cumulativesky=cumulativesky) #makeScene creates a .rad file with 20 modules per row, 7 rows.
- demo.makeOct1axis(trackerdict, hpc=True)
- trackerdict = demo.analysis1axis(trackerdict, sceneDict=sceneDict, modWanted=modWanted, rowWanted=rowWanted, sensorsy=sensorsy)
+ ''' Example HPC Job Call
-if __name__ == "__main__":
- '''
Example of how to run a Radiance routine for a simple rooftop bifacial system
- '''
-
# print("This is daydate %s" % (daydate))
demo = RadianceObj(simulationname,path=testfolder)
@@ -2717,3 +2702,22 @@ if __name__ == "__main__":
print(res.get())
pool.join()
pool.terminate()
+
+ '''
+
+ try:
+ slurm_nnodes = int(os.environ['SLURM_NNODES'])
+ except:
+ print("Slurm environment not set. Are you running this in a job?")
+ exit(1)
+
+ 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.gendaylit1axis(hpc=hpc) #benchmark time: gendaylit2:105s. gendaylit: 5s
+ trackerdict = demo.makeScene1axis(trackerdict=trackerdict, moduletype=moduletype, sceneDict=sceneDict, cumulativesky=cumulativesky) #makeScene creates a .rad file with 20 modules per row, 7 rows.
+ demo.makeOct1axis(trackerdict, hpc=True)
+ trackerdict = demo.analysis1axis(trackerdict, sceneDict=sceneDict, modWanted=modWanted, rowWanted=rowWanted, sensorsy=sensorsy)
+
+
+if __name__ == "__main__":
+
