Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
eu
ADMIRE
scord
Commits
1f715011
Commit
1f715011
authored
1 year ago
by
Clément Barthélemy
Committed by
Alberto Miranda
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
plugins/slurm: slurmadmcli launch a single scord-ctl per allocation
parent
93989dba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!95
Resolve "Add Slurm CLI plugin"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/slurm/slurmadmcli.c
+2
-13
2 additions, 13 deletions
plugins/slurm/slurmadmcli.c
with
2 additions
and
13 deletions
plugins/slurm/slurmadmcli.c
+
2
−
13
View file @
1f715011
...
...
@@ -328,25 +328,14 @@ slurm_spank_local_user_init(spank_t sp, int ac, char **av)
return
-
1
;
}
/* get number of nodes */
uint32_t
nnodes
;
char
snnodes
[
INT32_STR_LEN
];
if
((
rc
=
spank_get_item
(
sp
,
S_JOB_NNODES
,
&
nnodes
))
!=
ESPANK_SUCCESS
)
{
slurm_error
(
"slurmadmcli: failed to get number of nodes: %s"
,
spank_strerror
(
rc
));
return
-
1
;
}
if
(
snprintf
(
snnodes
,
INT32_STR_LEN
,
"%"
PRIu32
,
nnodes
)
<
0
)
{
slurm_error
(
"slurmadmcli: failed to convert number of nodes"
);
return
-
1
;
}
/* launch one scord-ctl task on
each
node
s
in the allocation */
/* launch one scord-ctl task on
one
node in the allocation
, let Slurm decide which
*/
pid_t
pid
;
if
((
pid
=
fork
())
<
0
)
{
slurm_error
(
"slurmadmcli: failed to start scord-ctl: %s"
,
strerror
(
errno
));
return
-
1
;
}
else
if
(
pid
==
0
)
{
char
*
argv
[]
=
{
"srun"
,
"-
-ntasks"
,
snnodes
,
"--ntasks-per-node=
1"
,
"--overlap"
,
"--cpu-bind=none"
,
"--jobid"
,
sjobid
,
(
char
*
const
)
scordctl_bin
,
NULL
};
char
*
argv
[]
=
{
"srun"
,
"-
N1"
,
"-n
1"
,
"--overlap"
,
"--cpu-bind=none"
,
"--jobid"
,
sjobid
,
(
char
*
const
)
scordctl_bin
,
NULL
};
execvp
(
argv
[
0
],
argv
);
slurm_error
(
"slurmadmcli: failed to srun scord-ctl: %s"
,
strerror
(
errno
));
return
0
;
...
...
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