Skip to content
Snippets Groups Projects
Commit 8a6fd2ef authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8440: Added slurm_srun_cep3 communication mechanism, acting as prototype SLURM support.

parents 23bdefe8 5d8e5041
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): ...@@ -92,9 +92,24 @@ def run_remote_command(config, logger, host, command, env, arguments = None):
return run_via_mpiexec(logger, command, arguments, host) return run_via_mpiexec(logger, command, arguments, host)
elif method == "cep_mpi": elif method == "cep_mpi":
return run_via_mpiexec_cep(logger, command, arguments, host) 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: else:
return run_via_ssh(logger, host, command, env, arguments) 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","-n 1","-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): def run_via_mpirun(logger, host, command, environment, arguments):
""" """
Dispatch a remote command via mpirun. 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