From 4ff71c75bab4b2722c627ea601c50ca7c7ae577a Mon Sep 17 00:00:00 2001 From: Justin Thomas Date: Tue, 21 Feb 2017 09:39:27 -0500 Subject: [PATCH 1/2] Missing , GCC 4.5.2 fails without --- src/cmds/qstat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c index 94ea27249d..1233cd34bd 100644 --- a/src/cmds/qstat.c +++ b/src/cmds/qstat.c @@ -21,6 +21,7 @@ #include #include #include +#include #if TCL_QSTAT #include From 46c3cec43d7ef68c8180809fc33165bd40d47308 Mon Sep 17 00:00:00 2001 From: Justin Thomas Date: Tue, 21 Feb 2017 09:20:38 -0500 Subject: [PATCH 2/2] Prevent job "Variable_List" from being lost between submission attempts Previously, if a job submission through qsub did not succeed on first attempt, then the ATTR_v attribute would be lost on the next attempt to submit the job to the server. This patch attempts to fix that by not deleting the attribute when encoding the job attributes to send to the server. When encoding attropl's for the server, the ATTR_v is skipped since it seems that the server expects the ATTR_v data after it has received both the job and job resource data. --- src/lib/Libifl/enc_attropl_hash.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/lib/Libifl/enc_attropl_hash.c b/src/lib/Libifl/enc_attropl_hash.c index d67590ba53..d3c1118488 100644 --- a/src/lib/Libifl/enc_attropl_hash.c +++ b/src/lib/Libifl/enc_attropl_hash.c @@ -123,7 +123,6 @@ int build_var_list( attrs->lock(); job_data_iterator *it = attrs->get_iterator(); int item_count = 0; - int preexisting_var_list = FALSE; while ((atr = it->get_next_item()) != NULL) { @@ -159,20 +158,13 @@ int build_var_list( var_list += ','; } var_list += atr->value; - preexisting_var_list = TRUE; - /* In this case, do not add an item (this is taken care or OUTSIDE this call) */ - /* item_count++; */ + item_count++; } } delete it; attrs->unlock(); - if (preexisting_var_list == TRUE) - { - hash_del_item(attrs, (char *)ATTR_v); - } - return(item_count); } /* END build_var_list() */ @@ -202,7 +194,8 @@ int encode_DIS_attropl_hash_single( /* Data pattern: * len of (name)(0 OR 1resource)(value)(op) */ if ((strncmp(atr->name.c_str(), "pbs_o", 5) == 0) - || (strncmp(atr->name.c_str(), "PBS_O", 5) == 0)) + || (strncmp(atr->name.c_str(), "PBS_O", 5) == 0) + || (strcmp(atr->name.c_str(), ATTR_v ) == 0 )) continue; if (is_res) {