From b6736da1382ee63fe5b7f92cfeb032c19278fa78 Mon Sep 17 00:00:00 2001 From: Rasmus Rohde Date: Wed, 1 Apr 2015 09:39:31 +0000 Subject: [PATCH] dependency option by Rasmus Rohde --- ChangeLog | 3 +++ slurm_drmaa/util.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9471a02..8139107 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-04-01 Rasmus Rohde + * slurm_drmaa/util.c: dependency option + 2014-09-05 E V * slurm_drmaa/session.c: job array of size 1 patch diff --git a/slurm_drmaa/util.c b/slurm_drmaa/util.c index b9471d1..32d1c1d 100755 --- a/slurm_drmaa/util.c +++ b/slurm_drmaa/util.c @@ -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 @@ -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"); @@ -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)",