Skip to content
Snippets Groups Projects
Commit a56a7e08 authored by John Chilton's avatar John Chilton
Browse files

Touch up configure_test_slurm.py for non-my-laptop setups.

parent c9a97550
No related branches found
No related tags found
No related merge requests found
from socket import gethostname
from string import Template
from subprocess import call
from getpass import getuser
SLURM_CONFIG_TEMPLATE = '''
# slurm.conf file generated by configurator.html.
......@@ -33,7 +34,7 @@ SlurmctldPort=6817
SlurmdPidFile=/var/run/slurmd.pid
SlurmdPort=6818
SlurmdSpoolDir=/tmp/slurmd
SlurmUser=john
SlurmUser=$user
#SlurmdUser=root
#SrunEpilog=
#SrunProlog=
......@@ -80,7 +81,7 @@ PartitionName=debug Nodes=$hostname Default=YES MaxTime=INFINITE State=UP
def main():
template_params = {"hostname": gethostname()}
template_params = {"hostname": gethostname(), "user": getuser()}
config_contents = Template(SLURM_CONFIG_TEMPLATE).substitute(template_params)
open("/etc/slurm-llnl/slurm.conf", "w").write(config_contents)
call("slurmctld")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment