Commit e756b264 authored by snuverink_j's avatar snuverink_j
Browse files

make batch script more clear, for #7

parent bb0adaec
......@@ -346,10 +346,6 @@ class Simulation:
# ADA this is for the new PSI Merlin5
#
coresPerNode = cores
if (int(cores) > 16):
coresPerNode = 16
title = oinpFile.partition(".")[0]
myfile = open(name, 'w')
s1 = "#!/bin/bash -l \n"
......@@ -357,13 +353,14 @@ class Simulation:
s1 += "#SBATCH --output=" + title + ".o%j\n"
s1 += "#SBATCH --time=" + time + "\n"
s1 += "#SBATCH --ntasks=" + str(cores) + "\n"
s1 += "#SBATCH --ntasks-per-node=" + str(coresPerNode) + " \n"
# s1 += "#SBATCH --ntasks-per-core=1 \n"
# s1 += "#SBATCH --cpus-per-task=1 \n"
# s1 += "#SBATCH --constraint=mc \n"
# Discussed in https://gitlab.psi.ch/OPAL/runOPAL/issues/7:
if (int(cores) > 16):
s1 += "#SBATCH --ntasks-per-node=16 \n"
else:
s1 += "#SBATCH --nodes=1 \n"
# s1 += "#SBATCH --mem=" + str(ram) + "GB \n"
s1 += "#SBATCH --partition=" + str(partition) + " \n"
# s1 += "export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK \n"
s1 += "mpirun " + opalexe + " " + oinpFile + " --info " + str(info) + "\n"
myfile.write(s1)
myfile.close()
......
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