Skip to content
Snippets Groups Projects
Commit f24d3003 authored by Stefan Froehlich's avatar Stefan Froehlich
Browse files

Task #8440: added srun command as it is on jureca right now. left out the jureca fix for hostnames.

parent 1089f101
No related branches found
No related tags found
No related merge requests found
......@@ -92,9 +92,24 @@ def run_remote_command(config, logger, host, command, env, arguments = None):
return run_via_mpiexec(logger, command, arguments, host)
elif method == "cep_mpi":
return run_via_mpiexec_cep(logger, command, arguments, host)
elif method == "slurm_srun_cep3":
return run_via_slurm_srun_cep3(logger, command, arguments, host)
else:
return run_via_ssh(logger, host, command, env, arguments)
def run_via_slurm_srun_cep3(logger, command, arguments, host):
for arg in arguments:
command = command + " " + str(arg)
commandstring = ["srun","-N 1","--cpu_bind=map_cpu:none","-w",host, "/bin/sh", "-c", "hostname && " + command]
# we have a bug that crashes jobs when too many get startet at the same time
# temporary NOT 100% reliable workaround
#from random import randint
#time.sleep(randint(0,10))
##########################
process = spawn_process(commandstring, logger)
process.kill = lambda : os.kill(process.pid, signal.SIGKILL)
return process
def run_via_mpirun(logger, host, command, environment, arguments):
"""
Dispatch a remote command via mpirun.
......
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