Hi,

We've recently installed OpenMPI on one of our Cray XT5 machines, here at CSCS. This machine uses SLURM for launching jobs.
Doing an salloc defines this environment variable:
              BASIL_RESERVATION_ID
              The reservation ID on Cray systems running ALPS/BASIL only.

Since the alps ras module tries to find a variable called OMPI_ALPS_RESID which is set using a script, we thought that for SLURM systems it would be a good idea to directly integrate this BASIL_RESERVATION_ID variable in the code, rather than using a script. The small patch is attached.

Regards,

Jerome

--
Jérôme Soumagne
Scientific Computing Research Group
CSCS, Swiss National Supercomputing Centre
Galleria 2, Via Cantonale  | Tel: +41 (0)91 610 8258
CH-6928 Manno, Switzerland | Fax: +41 (0)91 610 8282


Index: orte/mca/ras/alps/ras_alps_component.c
===================================================================
--- orte/mca/ras/alps/ras_alps_component.c      (revision 23365)
+++ orte/mca/ras/alps/ras_alps_component.c      (working copy)
@@ -93,7 +93,7 @@

     /* Are we running under a ALPS job? */

-    if (NULL != getenv("OMPI_ALPS_RESID")) {
+    if ((NULL != getenv("OMPI_ALPS_RESID")) || (NULL != 
getenv("BASIL_RESERVATION_ID"))) {
         mca_base_param_lookup_int(param_priority, priority);
         opal_output_verbose(1, orte_ras_base.ras_output,
                              "ras:alps: available for selection");
Index: orte/mca/ras/alps/ras_alps_module.c
===================================================================
--- orte/mca/ras/alps/ras_alps_module.c (revision 23365)
+++ orte/mca/ras/alps/ras_alps_module.c (working copy)
@@ -70,6 +70,10 @@
     char        *alps_config_str;

     alps_batch_id = getenv("OMPI_ALPS_RESID");
+    /* check if the system uses SLURM, in this case, OMPI_ALPS_RESID
+     * is not necessary and BASIL_RESERVATION_ID can be directly used instead
+     */
+    if (NULL == alps_batch_id) alps_batch_id = getenv("BASIL_RESERVATION_ID");
     if (NULL == alps_batch_id) {
         orte_show_help("help-ras-alps.txt", "alps-env-var-not-found", 1,
                        "OMPI_ALPS_RESID");

Reply via email to