Skip to content

Commit

Permalink
dependency option by Rasmus Rohde <rohde@duff.dk>
Browse files Browse the repository at this point in the history
  • Loading branch information
duffrohde authored and pkopta committed Apr 1, 2015
1 parent d399c32 commit b6736da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2015-04-01 Rasmus Rohde <rohde@duff.dk>
* slurm_drmaa/util.c: dependency option

2014-09-05 E V <eliventer@gmail.com>
* slurm_drmaa/session.c: job array of size 1 patch

Expand Down
12 changes: 10 additions & 2 deletions slurm_drmaa/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ enum slurm_native {
SLURM_NATIVE_MAIL_TYPE,
SLURM_NATIVE_NO_REQUEUE,
SLURM_NATIVE_EXCLUDE,
SLURM_NATIVE_TMP
SLURM_NATIVE_TMP,
SLURM_NATIVE_DEPENDENCY
};

void
Expand Down Expand Up @@ -320,7 +321,11 @@ slurmdrmaa_add_attribute(job_desc_msg_t *job_desc, unsigned attr, const char *va
break;
case SLURM_NATIVE_TMP:
fsd_log_debug(("# tmp = %s", value));
job_desc->pn_min_tmp_disk = fsd_atoi(value);
job_desc->pn_min_tmp_disk = fsd_atoi(value);
break;
case SLURM_NATIVE_DEPENDENCY:
fsd_log_debug(("# dependency = %s", value));
job_desc->dependency = fsd_strdup(value);
break;
default:
fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE,"Invalid attribute");
Expand Down Expand Up @@ -434,6 +439,9 @@ slurmdrmaa_parse_additional_attr(job_desc_msg_t *job_desc,const char *add_attr)
}
else if(strcmp(name,"tmp") == 0) {
slurmdrmaa_add_attribute(job_desc,SLURM_NATIVE_TMP,value);
}
else if(strcmp(name,"dependency") == 0) {
slurmdrmaa_add_attribute(job_desc,SLURM_NATIVE_DEPENDENCY,value);
} else {
fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE,
"Invalid native specification: %s (Unsupported option: --%s)",
Expand Down

0 comments on commit b6736da

Please sign in to comment.