Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make S_SLURM_RESTART_COUNT item available to SPANK

  • Loading branch information...
commit 96673989ed2c62e4f9fa7730eba9bae4be54b08e 1 parent f005e50
@fossing fossing authored jette committed
Showing with 10 additions and 1 deletion.
  1. +1 −0  NEWS
  2. +2 −1  slurm/spank.h
  3. +7 −0 src/common/plugstack.c
View
1  NEWS
@@ -37,6 +37,7 @@ documents those changes that are of interest to users and admins.
-- Fix sinfo output so that host in state allocated and mixed will not be
merged together.
-- GRES: Avoid crash if GRES configurations is inconstent.
+ -- Make S_SLURM_RESTART_COUNT item available to SPANK.
* Changes in Slurm 2.6.6
========================
View
3  slurm/spank.h
@@ -169,7 +169,8 @@ enum spank_item {
S_JOB_ALLOC_CORES, /* Job allocated cores in list format (char **) */
S_JOB_ALLOC_MEM, /* Job allocated memory in MB (uint32_t *) */
S_STEP_ALLOC_CORES, /* Step alloc'd cores in list format (char **) */
- S_STEP_ALLOC_MEM /* Step alloc'd memory in MB (uint32_t *) */
+ S_STEP_ALLOC_MEM, /* Step alloc'd memory in MB (uint32_t *) */
+ S_SLURM_RESTART_COUNT /* Job restart count (uint32_t *) */
};
typedef enum spank_item spank_item_t;
View
7 src/common/plugstack.c
@@ -2133,6 +2133,13 @@ spank_err_t spank_get_item(spank_t spank, spank_item_t item, ...)
else
*p2uint32 = 0;
break;
+ case S_SLURM_RESTART_COUNT:
+ p2uint32 = va_arg(vargs, uint32_t *);
+ if (slurmd_job)
+ *p2uint32 = slurmd_job->restart_cnt;
+ else
+ *p2uint32 = 0;
+ break;
case S_SLURM_VERSION:
p2vers = va_arg(vargs, char **);
*p2vers = SLURM_VERSION_STRING;
Please sign in to comment.
Something went wrong with that request. Please try again.