Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
8a6fd2ef
Commit
8a6fd2ef
authored
9 years ago
by
Jan David Mol
Browse files
Options
Downloads
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CEP/Pipeline/framework/lofarpipe/support/remotecommand.py
+15
-0
15 additions, 0 deletions
CEP/Pipeline/framework/lofarpipe/support/remotecommand.py
with
15 additions
and
0 deletions
CEP/Pipeline/framework/lofarpipe/support/remotecommand.py
+
15
−
0
View file @
8a6fd2ef
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment