Commit c35e3776 authored by ext-neveu_n's avatar ext-neveu_n
Browse files

theta fixes

parent c2111cbc
......@@ -146,7 +146,7 @@ class Simulation:
# ANL theta.alcf.anl.gov
elif (hostname.startswith("theta")):
batchsys = 'COBALT'
runfile = 'run.theta'
runfile = 'run.sh'
self.WriteTheta(opalexe, oinpFile, CORES, time, ram, info, queue, hypert)
# ANL blues.lcrc.anl.gov
......@@ -217,6 +217,10 @@ class Simulation:
elif batchsys == 'PBS':
print( 'Done with setup of the OPAL simulation, please submit the job yourself')
if batchsys == 'COBALT':
qid = subprocess.call(['qsub', runfile, '|', 'awk','\'{print $3}\''])
print( 'Done with setup of the OPAL simulation and submitting the job with {} cores \n\n\n'.format(CORES))
os.chdir('..')
return qid
......@@ -492,24 +496,25 @@ class Simulation:
if (cores % coresPerNode) is 0:
if (cores < coresPerNode):
nodes = 1
nodes = int(1)
else:
nodes = cores / coresPerNode
tasks_per_node = cores/nodes
nodes = int(cores / coresPerNode)
tasks_per_node = int(cores/nodes)
else:
while((cores % coresPerNode) != 0):
coresPerNode -= 1
nodes = cores/coresPerNode
coresPerNode -= int(1)
nodes = int(cores/coresPerNode)
tasks_per_node = cores/nodes
tasks_per_node = int(cores/nodes)
print(nodes,cores, tasks_per_node)
if cores < 512:
queue = 'debug-cache-quad'
time = '00:59:00'
#elif cores > 512:
#nodes = np.ceil(cores/64)
total_mpi_ranks = nodes*coresPerNode
total_mpi_ranks = int(nodes*coresPerNode)
title=oinpFile.partition(".")[0]
myfile = open('run.sh','w')
......@@ -535,7 +540,7 @@ class Simulation:
s1 += "####################################################\n"
myfile.write(s1)
myfile.close()
os.chmod("run.sh", 0o775)
#aprun -n $n_mpi_ranks -N $n_mpi_ranks_per_node \
#--env OMP_NUM_THREADS=$n_openmp_threads_per_rank -cc depth \
# -d $n_hyperthreads_skipped_between_ranks \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment