From 53e0ed71b0fe808844f69d922ce2430007b8edca Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 31 Jan 2013 18:15:47 +0000 Subject: [PATCH] Disqualify slurm module even if slurm support was configured into the build if we don't have an allocation and haven't enabled dynamic allocations This commit was SVN r27995. --- orte/mca/ras/slurm/ras_slurm_component.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/orte/mca/ras/slurm/ras_slurm_component.c b/orte/mca/ras/slurm/ras_slurm_component.c index 883e1540b6..8514042270 100644 --- a/orte/mca/ras/slurm/ras_slurm_component.c +++ b/orte/mca/ras/slurm/ras_slurm_component.c @@ -111,9 +111,15 @@ static int orte_ras_slurm_component_query(mca_base_module_t **module, int *prior { /* if I built, then slurm support is available. If * I am not in a Slurm allocation, and dynamic alloc - * is not enabled, then I'll deal with that by returning - * an appropriate status code upon allocation + * is not enabled, then disqualify myself */ + if (NULL == getenv("SLURM_JOBID") && + !mca_ras_slurm_component.dyn_alloc_enabled) { + /* disqualify ourselves */ + *priority = 0; + *module = NULL; + return ORTE_ERROR; + } OPAL_OUTPUT_VERBOSE((2, orte_ras_base.ras_output, "%s ras:slurm: available for selection",