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
b7016252
Commit
b7016252
authored
2 years ago
by
Clément Barthélemy
Committed by
Alberto Miranda
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
plugins/slurm: slurmadmcli add Slurm job ID
parent
00e9ed4c
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
+12
-4
12 additions, 4 deletions
plugins/slurm/slurmadmcli.c
with
12 additions
and
4 deletions
plugins/slurm/slurmadmcli.c
+
12
−
4
View file @
b7016252
...
...
@@ -147,7 +147,7 @@ process_opts(int tag, const char *optarg, int remote)
}
static
int
scord_register_job
(
const
char
*
scord_proto
,
const
char
*
scord_addr
,
const
char
*
nodelist
)
scord_register_job
(
const
char
*
scord_proto
,
const
char
*
scord_addr
,
const
char
*
nodelist
,
uint32_t
jobid
)
{
int
rc
=
0
;
...
...
@@ -236,7 +236,7 @@ scord_register_job(const char *scord_proto, const char *scord_addr, const char *
}
ADM_job_t
scord_job
;
if
(
ADM_register_job
(
scord_server
,
job_resources
,
scord_reqs
,
&
scord_job
)
!=
ADM_SUCCESS
)
{
if
(
ADM_register_job
(
scord_server
,
job_resources
,
scord_reqs
,
jobid
,
&
scord_job
)
!=
ADM_SUCCESS
)
{
slurm_error
(
"slurmadmcli: scord job registration failed"
);
rc
=
-
1
;
goto
end
;
...
...
@@ -298,6 +298,14 @@ slurm_spank_local_user_init(spank_t sp, int ac, char **av)
}
}
/* get job id */
uint32_t
jobid
;
spank_err_t
rc
;
if
((
rc
=
spank_get_item
(
sp
,
S_JOB_ID
,
&
jobid
))
!=
ESPANK_SUCCESS
)
{
slurm_error
(
"slurmadmcli: failed to get jobid: %s"
,
spank_strerror
(
rc
));
return
-
1
;
}
/* get list of nodes. /!\ at this point env SLURM_NODELIST is
set, but not SLURM_JOB_NODELIST! */
const
char
*
nodelist
=
getenv
(
"SLURM_NODELIST"
);
...
...
@@ -306,5 +314,5 @@ slurm_spank_local_user_init(spank_t sp, int ac, char **av)
return
-
1
;
}
return
scord_register_job
(
scord_proto
,
scord_addr
,
nodelist
);
}
\ No newline at end of file
return
scord_register_job
(
scord_proto
,
scord_addr
,
nodelist
,
jobid
);
}
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