Skip to content

Commit

Permalink
Merge pull request #141 from stefanhiemer/main
Browse files Browse the repository at this point in the history
Fix Slurm queuename.
  • Loading branch information
srmnitc authored Jul 31, 2024
2 parents 769274e + a76de09 commit 8b2f845
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion calphy/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(self, options, cores=1, directory=os.getcwd()):
"""
self.queueoptions = {"scheduler": "slurm",
"jobname": "tis",
"queuename": None,
"walltime": "23:59:00",
"memory": "3GB",
"cores": cores,
Expand Down Expand Up @@ -125,7 +126,8 @@ def write_script(self, outfile):
#write the main header options
fout.write("#SBATCH --job-name=%s\n" %self.queueoptions["jobname"])
fout.write("#SBATCH --time=%s\n" %self.queueoptions["walltime"])
fout.write("#SBATCH --partition=%s\n"%self.queueoptions["queuename"])
if self.queueoptions["queuename"] is not None:
fout.write("#SBATCH --partition=%s\n"%self.queueoptions["queuename"])
fout.write("#SBATCH --ntasks=%s\n" %str(self.queueoptions["cores"]))
fout.write("#SBATCH --mem-per-cpu=%s\n"%self.queueoptions["memory"])
fout.write("#SBATCH --hint=%s\n" %self.queueoptions["hint"])
Expand Down

0 comments on commit 8b2f845

Please sign in to comment.