Commit 8c2dc855 authored by albajacas_a's avatar albajacas_a
Browse files

Merge branch 'fixMerlin6LoginNode' into 'master'

fix for merlin6 login nodes

See merge request !3
parents 4e11e6d7 2c4adeea
......@@ -174,20 +174,11 @@ class Simulation:
queue = os.environ.get('QUEUE')
except:
queue = os.getenv("SGE_QUEUE", "prime_bd.q")
# Merlin5
if (hostname.startswith("merlin-l")):
batchsys = 'SLURM'
runfile = 'run.merlin5'
time = os.getenv("SLURM_TIME", "24:00:00")
ram = os.getenv("SLURM_RAM", "36")
partition = os.getenv("SLURM_PARTITION", "merlin")
self.WriteMerlin5(opalexe, oinpFile, CORES, time, ram, info, runfile, partition)
# Merlin6
if (hostname.startswith("merlin-c")):
if (hostname.startswith("merlin-l")):
batchsys = 'SLURM'
runfile = 'run.merlin5'
runfile = 'run.merlin6'
time = os.getenv("SLURM_TIME", "24:00:00")
ram = os.getenv("SLURM_RAM", "36")
partition = os.getenv("SLURM_PARTITION", "general")
......@@ -393,28 +384,6 @@ class Simulation:
myfile.write(s1)
myfile.close()
def WriteMerlin5(self, opalexe, oinpFile, cores, time, ram, info, name, partition):
# ADA this is for the new PSI Merlin5
title = oinpFile.partition(".")[0]
myfile = open(name, 'w')
s1 = "#!/bin/bash -l \n"
s1 += "#SBATCH --job-name=" + title + "\n"
s1 += "#SBATCH --output=" + title + ".o%j\n"
s1 += "#SBATCH --time=" + time + "\n"
s1 += "#SBATCH --ntasks=" + str(cores) + "\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 += "mpirun " + opalexe + " " + oinpFile + " --info " + str(info) + "\n"
myfile.write(s1)
myfile.close()
def WriteMerlin6(self, opalexe, oinpFile, cores, time, ram, info, name, partition):
# ADA this is for the new PSI Merlin6
title = oinpFile.partition(".")[0]
......@@ -425,14 +394,14 @@ class Simulation:
s1 += "#SBATCH --time=" + time + "\n"
s1 += "#SBATCH --ntasks=" + str(cores) + "\n"
s1 += "#SBATCH --ntasks-per-core=1 \n"
s1 += "#SBATCH --constraint=mc \n"
# s1 += "#SBATCH --constraint=mc \n"
# Discussed in https://gitlab.psi.ch/OPAL/runOPAL/issues/7:
#if (int(cores) > 22):
# s1 += "#SBATCH --ntasks-per-node=16 \n"
#else:
# s1 += "#SBATCH --nodes=1 \n"
s1 += "#SBATCH --partition=" + str(partition) + " \n"
s1 += "#SBATCH --exclude=merlin-c-001 \n"
# s1 += "#SBATCH --exclude=merlin-c-001 \n"
s1 += "#SBATCH --cores-per-socket=22 \n"
s1 += "#SBATCH --sockets-per-node=2 \n"
s1 += "mpirun " + opalexe + " " + oinpFile + " --info " + str(info) + "\n"
......
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