Commit 0fc72428 authored by Matthias Frey's avatar Matthias Frey
Browse files

Fix edison slurm script

parent 04fb66d4
......@@ -307,24 +307,25 @@ class Simulation:
def WriteEdison(self, opalexe, oinpFile, cores, time, ram, info, name):
title=oinpFile.partition(".")[0]
myfile = open(name,'w')
coresPerNode = 24
cores = int(cores)
if ((cores%coresPerNode) is 0):
nodes = cores/coresPerNode
if cores % coresPerNode == 0:
nodes = int(cores / coresPerNode)
else:
nodes = cores/coresPerNode + 1
nodes = int(cores / coresPerNode) + 1
s1 = "#!/bin/bash -l \n"
s1 += "#SBATCH -p regular \n"
s1 += "#SBATCH -q regular \n"
s1 += "#SBATCH -N " + str(nodes) + " \n"
s1 += "#SBATCH -t " + time + "G\n"
s1 += "#SBATCH -t " + time + "\n"
s1 += "#SBATCH -J " + title + "\n"
s1 += "#SBATCH -o " + title + ".o%j\n"
s1 += "#SBATCH -L SCRATCH \n"
s1 += "#SBATCH --qos=premium \n"
s1 += "srun -n " + str(cores) + " " + opalexe + " " + oinpFile + "\n"
myfile = open(name, 'w')
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