diff --git a/orte/mca/ras/alps/help-ras-alps.txt b/orte/mca/ras/alps/help-ras-alps.txt index 3e56a4443d..6b5d095024 100644 --- a/orte/mca/ras/alps/help-ras-alps.txt +++ b/orte/mca/ras/alps/help-ras-alps.txt @@ -10,6 +10,8 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyrigth (c) 2020 Triad National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,14 +27,15 @@ variables: OMPI_ALPS_RESID BASIL_RESERVATION_ID + COBALT_JOBID However, it was unable to find either one of these variables. #This is a fatal error. [alps-env-var-invalid] While trying to determine what resources are available, the ALPS -resource allocator uses either the OMPI_ALPS_RESID or the -BASIL_RESERVATION_ID environment variable. +resource allocator uses either the OMPI_ALPS_RESID, +BASIL_RESERVATION_ID, or COBALT_JOBID environment variable. However, an error was encountered when trying to parse the variable: diff --git a/orte/mca/ras/alps/ras_alps_component.c b/orte/mca/ras/alps/ras_alps_component.c index 2bf719c80e..322df6214b 100644 --- a/orte/mca/ras/alps/ras_alps_component.c +++ b/orte/mca/ras/alps/ras_alps_component.c @@ -13,6 +13,8 @@ * Copyright (c) 2008 UT-Battelle, LLC * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2020 Triad National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -104,7 +106,12 @@ get_res_id(void) if (NULL != (id = getenv("BATCH_PARTITION_ID"))) { return strtoul(id, NULL, 10); } - if (NULL != (id = getenv("PBS_JOBID"))) { + + id = getenv("PBS_JOBID"); + if (NULL == id) { + id = getenv("COBALT_JOBID"); + } + if (NULL != id) { char *prepped_jid = prep_job_id(id); if (NULL == prepped_jid) { /* out of resources */