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

fix conflict

parents e542320f 08a84af9
......@@ -189,8 +189,8 @@ def main(argv):
qid = sim.run(N, baseFileName, restart_step, inputfilePath, tmplFile, oinpFile, restart_file, doTest, doKeep, doNobatch, info, queue, hypert, quiet)
if doNobatch:
print( "... finished!\n")
else:
print( "SGE-ID= {}\n".format(qid))
#else:
# print( "SGE-ID= {}\n".format(qid))
else:
ranges = opaldict.Range()
......
......@@ -150,7 +150,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
......@@ -225,6 +225,10 @@ class Simulation:
if quiet == False:
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
......@@ -502,24 +506,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
#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')
......@@ -534,18 +539,22 @@ class Simulation:
s1 += "export n_mpi_ranks_per_node=" + str(coresPerNode)+ " \n"
s1 += "export n_mpi_ranks=" + str(total_mpi_ranks) + "\n"
#s1 += "export n_openmp_threads_per_rank=4"
#s1 += "export n_hyperthreads_per_core=2"
if hypert > 0:
s1 += "export n_hyperthreads_per_core=2 \n"
#s1 += "export n_hyperthreads_skipped_between_ranks=4"
s1 += "####################################################\n"
s1 += "ARGS=" + "\"" + oinpFile + " --info " + str(info) + " --warn 6 \"\n"
s1 += "CMD=$OPAL_EXE_PATH/opal \n"
s1 += "MPICMD=\"aprun -n $n_mpi_ranks -N $n_mpi_ranks_per_node $CMD $ARGS\" \n"
if hypert > 0:
s1 += "MPICMD=\"aprun -n $n_mpi_ranks -N $n_mpi_ranks_per_node -j $n_hyperthreads_per_core $CMD $ARGS\" \n"
else:
s1 += "MPICMD=\"aprun -n $n_mpi_ranks -N $n_mpi_ranks_per_node $CMD $ARGS\" \n"
s1 += "echo $MPICMD\n"
s1 += "$MPICMD \n"
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