Commit 9e7bc61f authored by adelmann's avatar adelmann 🎗
Browse files

add --hypert for BEBOP

parent e8cd4d48
......@@ -50,7 +50,7 @@ def getBaseName():
return name
def printUsage():
print "./runOPAL.py [--restart-file=FILE [--restart-step=STEPNR | --restart-pos=POS]] [--info num] [--test] [--block] [--keep] [ATTR=SCANVALUE] {[ATTR=VALUE]}"
print "./runOPAL.py [--restart-file=FILE [--restart-step=STEPNR | --restart-pos=POS]] [--info=num] [--test] [--block] [--keep] [--hypert=num] [ATTR=SCANVALUE] {[ATTR=VALUE]}"
print ""
print "Unit of POS is meter."
print "SCANVALUE=start:end:step, example TFWHM=0.85:0.90:0.01 "
......@@ -60,8 +60,9 @@ def printUsage():
print "--keep if same simulation has been run before, keep old data and abort"
print "--nobatch run opal locally not using the batch system and waits until the job is done"
print "--optPilot run optPilot (at the moment with default MOGA settings on host merlinl01.psi.ch)"
print "--info <num> steers the std-output of OPAL. The range is 0 < num < 6 (default), from minimal to maximum output"
print "--info=<num> steers the std-output of OPAL. The range is 0 < num < 6 (default), from minimal to maximum output"
print "--queue=<qname> defines in which queue the job goes. Overwrites QUEUE (deprecated SGE_QUEUE)"
print "--hypert=<num> defines the number of Hyper-Threads used. Default 0"
print "Recognized environment variables: DISTRIBUTIONS, FIELDMAPS, OPAL_EXE_PATH, TEMPLATES, QUEUE, RAM, TIME (deprecated SGE_)"
"""
......@@ -108,6 +109,7 @@ def main(argv):
restart_file = ""
queue = ""
info = 6
hypert = 0
qid = -1
for arg in argv:
......@@ -117,6 +119,8 @@ def main(argv):
restart_file = str.lstrip(arg,"--restart-file=")
elif arg.startswith("--restart-step"):
restart_step = arg.split("=")[1]
elif arg.startswith("--hypert"):
hypert = int(arg.split("=")[1])
elif arg.startswith("--restart-pos"):
restart_pos = arg.split("=")[1]
restart_step = str(getNearestRestartStep(restart_pos,restart_file))
......@@ -183,7 +187,7 @@ def main(argv):
print "SGE-ID= ",qid,'\n'
elif not opaldict.hasRanges():
sim = Simulation(opaldict)
qid = sim.run(N, baseFileName, restart_step, inputfilePath, tmplFile, oinpFile, restart_file, doTest, doBlock, doKeep, doNobatch, info, queue)
qid = sim.run(N, baseFileName, restart_step, inputfilePath, tmplFile, oinpFile, restart_file, doTest, doBlock, doKeep, doNobatch, info, queue, hypert)
if doNobatch:
print "... finished!\n"
else:
......@@ -213,7 +217,7 @@ def main(argv):
print ranges
#run simulations of all possible combinations
args = [N, baseFileName, restart_step, inputfilePath, tmplFile, oinpFile, restart_file, doTest, doBlock, doKeep, doNobatch, info, queue]
args = [N, baseFileName, restart_step, inputfilePath, tmplFile, oinpFile, restart_file, doTest, doBlock, doKeep, doNobatch, info, queue, hypert]
traverseRanges(ranges.items(), opaldict, args)
# clean up
os.system("rm -f *.bak ")
......
......@@ -471,10 +471,8 @@ class Simulation:
s1 += "#SBATCH -e " + title + ".%j.%N.error \n"
s1 += "#SBATCH -p " + queue + " \n"
s1 += "#SBATCH --time=" + time + "\n"
s1 += "#SBATCH --nodes=" + str(int(nodes)) + " \n"
s1 += "#SBATCH --ntasks=" + str(cores) + "\n"
#s1 += "#SBATCH --ntasks-per-core=1 \n"
#s1 += "#SBATCH --cpus-per-task=1 \n"
s1 += "#SBATCH --ntasks-per-node=" + str(coresPerNode) + "\n"
s1 += "export I_MPI_SLURM_EXT=0 \n"
s1 += "export I_MPI_FABRICS=shm:tmi \n"
if (queue=='knl' or queue=='knlall' or queue=='knld'):
......
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