[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-221-g533b8b3

mysql vizuser noreply at mpich.org
Sat May 18 00:15:29 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  533b8b374eec4562d4a50d5ef87e1695c43efad1 (commit)
       via  11fecdc39d1a05c369fde7adae78c941166bb27a (commit)
       via  ac596401399adc5a21268b14cd4354c55694d994 (commit)
       via  8ac5694719b68dad966c5b1fe03f85c46ccdf7e9 (commit)
       via  02b0a83fa24fc4232b8b494d04bdf2f003670702 (commit)
      from  cf31e37add0a36154ca5849c9390be38f870f750 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/533b8b374eec4562d4a50d5ef87e1695c43efad1

commit 533b8b374eec4562d4a50d5ef87e1695c43efad1
Author: Su Huang <suhuang at us.ibm.com>
Date:   Wed Apr 17 07:45:23 2013 -0400

    Hardcoded to wrong value 400000 if MP_POLLING_INTERVAL not set
    
    (ibm) D189371
    (ibm) b02a38e0680dbd1471884439214ee6afe13baeb4
    (ibm) c8ebe0da80732297de985c3640caa4c5623c55d4
    (ibm) 48d1993041c3820a468d2ee6c838ff0a5bc1154a

diff --git a/src/mpid/pamid/src/mpidi_util.c b/src/mpid/pamid/src/mpidi_util.c
index 0f59a78..ee8eda9 100644
--- a/src/mpid/pamid/src/mpidi_util.c
+++ b/src/mpid/pamid/src/mpidi_util.c
@@ -42,17 +42,26 @@
 #define ONEM (1<<20)
 #define ONEG (1<<30)
 
-
+#define PAMI_ASYNC_EXT_ATTR 2000
 
 #if (MPIDI_PRINTENV || MPIDI_STATISTICS || MPIDI_BANNER)
 MPIDI_printenv_t  *mpich_env;
 extern char* mp_euilib;
 char mp_euidevice[20];
 extern pami_extension_t pe_extension;
+extern pamix_extension_info_t PAMIX_Extensions;
+ typedef enum {
+        /* Attribute       usage : type : default : description   */
+         PAMI_ASYNC_ATTR
+           = PAMI_ASYNC_EXT_ATTR,
+         PAMI_CONTEXT_TIMER_INTERVAL,   /**<   U: size_t : N/A : current timer interval in PAMI context */
+       } pamix_attribute_name_async_t;
+
 
 void MPIDI_Set_mpich_env(int rank, int size) {
      static char polling_buf[32]="";
      int rc;
+     pami_configuration_t config;
 
      mpich_env->this_task = rank;
      mpich_env->nprocs  = size;
@@ -60,14 +69,20 @@ void MPIDI_Set_mpich_env(int rank, int size) {
      mpich_env->use_token_flow_control=MPIDI_Process.is_token_flow_control_on;
      mpich_env->mp_statistics=MPIDI_Process.mp_statistics;
      if (mpich_env->polling_interval == 0) {
-            mpich_env->polling_interval = 400000;
+         bzero(&config, sizeof(config));
+         config.name = (pami_attribute_name_t)PAMI_CONTEXT_TIMER_INTERVAL;
+         rc= PAMI_Context_query(MPIDI_Context[0], &config, 1);
+            mpich_env->polling_interval = config.value.intval;;
             sprintf(polling_buf, "MP_POLLING_INTERVAL=%d",
                     mpich_env->polling_interval); /* microseconds */
             rc = putenv(polling_buf);
      }
      if (mpich_env->retransmit_interval == 0) {
-            mpich_env->retransmit_interval = 400000;
-            sprintf(polling_buf, "MP_POLLING_INTERVAL=%d",
+         bzero(&config, sizeof(config));
+         config.name = (pami_attribute_name_ext_t)PAMI_CONTEXT_RETRANSMIT_INTERVAL;
+         rc= PAMI_Context_query(MPIDI_Context[0], &config, 1);
+            mpich_env->retransmit_interval = config.value.intval;
+            sprintf(polling_buf, "MP_RETRANSMIT_INTERVAL=%d",
                     mpich_env->retransmit_interval); /* microseconds */
             rc = putenv(polling_buf);
      }
@@ -135,11 +150,10 @@ void MPIDI_Setup_networkenv()
        *  mpi_printenv variable can print them out.
        */
       if ( mpich_env->retransmit_interval == 0 ) {
-         if (mpich_env->transport_type == IS_US)  {  /* default for IP is 10000 loops */
-             mpich_env->retransmit_interval = 4000000;
-         } else {
-             mpich_env->retransmit_interval = 10000;
-         }
+          bzero(&config, sizeof(config));
+          config.name = (pami_attribute_name_t)PAMI_CONTEXT_RETRANSMIT_INTERVAL;
+          rc= PAMI_Context_query(MPIDI_Context[0], &config, 1);
+             mpich_env->retransmit_interval = config.value.intval;
       }
 
 }

http://git.mpich.org/mpich.git/commitdiff/11fecdc39d1a05c369fde7adae78c941166bb27a

commit 11fecdc39d1a05c369fde7adae78c941166bb27a
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Mon Apr 22 15:19:49 2013 -0400

    pami_tune -o option renames directory
    
     1 - Fixes for command line paramters
     2 - Fix for allgather PAMI_IN_PLACE handling in collective selection path
    
    (ibm) D189995
    (ibm) 7Z8
    (ibm) bad205a6147cebce9a40f3b50560df80d3ddb354
    
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>

diff --git a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
index 5b53acd..36e7fe7 100644
--- a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
+++ b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
@@ -677,6 +677,8 @@ MPIDO_Allgather_simple(const void *sendbuf,
         MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
      }
   }
+  else
+    sbuf = PAMI_IN_PLACE;
 
    TRACE_ERR("Using PAMI-level allgather protocol\n");
    pami_xfer_t allgather;
diff --git a/src/mpid/pamid/src/mpidi_util.c b/src/mpid/pamid/src/mpidi_util.c
index a3b565e..0f59a78 100644
--- a/src/mpid/pamid/src/mpidi_util.c
+++ b/src/mpid/pamid/src/mpidi_util.c
@@ -26,11 +26,16 @@
  */
 
 #include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
 #include <limits.h>
 #include <nl_types.h>
 #include <mpidimpl.h>
 #include "mpidi_util.h"
 
+#define PAMI_TUNE_MAX_ITER 2000
+
 /* Short hand for sizes */
 #define ONE  (1)
 #define ONEK (1<<10)
@@ -1283,7 +1288,7 @@ Options:\n\
   -g            Comma separated list of geometry sizes to benchmark\n\
                 (Default: Powers of 2 (plus and minus one as well))\n\n\
   -i            Number of benchmark iterations per algorithm\n\
-                (Default: 1000)\n\n\
+                (Default: 1000. Maximum is 2000)\n\n\
   -f <file>     Input INI file containing benchmark parameters\n\
                 You can override a parameter with a command line argument\n\n\
   -o <file>     Output XML file containing benchmark results\n\
@@ -1308,9 +1313,9 @@ static void MPIDI_collsel_init_advisor_params(advisor_params_t *params)
   params->procs_per_node = NULL;
   params->geometry_sizes = NULL;
   params->message_sizes = NULL;
-  params->iter = 1000;
   /* Set the following to -1, so that we can
      check if the user has set them or not */
+  params->iter = -1;
   params->verify = -1;
   params->verbose = -1;
   params->checkpoint = -1;
@@ -1527,13 +1532,20 @@ static int MPIDI_collsel_process_output_file(char *filename, char **out_file)
 {
   char *newname;
   int i, filename_len, ret = 0;
+  struct stat ost;
 
   filename_len = strlen(filename);
 
   /* Check if file already exists */
-  if(access(filename, F_OK) == 0)
+  if(stat(filename, &ost) == 0)
   {
+    if(!S_ISREG(ost.st_mode))
+    {
+      fprintf(stderr, "Error: %s exists and is not a regular file\n", filename);
+      return 1;
+    }
     fprintf(stderr, "File %s already exists, renaming existing file\n", filename);
+
     newname = (char *) MPIU_Malloc(filename_len + 5);
     for (i = 0; i < 500; ++i)
     {
@@ -1599,15 +1611,27 @@ static int MPIDI_collsel_process_ini_file(const char *filename, advisor_params_t
 {
   char *line, *start, *name, *value;
   int ret = 0;
+  struct stat ist;
+
+  if(stat(filename, &ist) == 0)
+  {
+    if(!S_ISREG(ist.st_mode))
+    {
+      fprintf(stderr, "Error: %s is not a regular file\n", filename);
+      return 1;
+    }
+  }
+
   FILE *file = fopen(filename, "r");
   if(!file)
   {
-    fprintf(stderr, "Error. Can't open file %s\n", filename);
+    fprintf(stderr, "Error: Cannot open file %s: %s\n",
+            filename, strerror(errno));
     return 1;
   }
-  line = (char *) MPIU_Malloc(1000);
+  line = (char *) MPIU_Malloc(2000);
 
-  while (fgets(line, 1000, file) != NULL)
+  while (fgets(line, 2000, file) != NULL)
   {
     start = MPIDI_collsel_ltrim(MPIDI_collsel_rtrim(line));
     /* Skip comments and sections */
@@ -1642,10 +1666,10 @@ static int MPIDI_collsel_process_ini_file(const char *filename, advisor_params_t
     }
     else if(strcmp(name, "iterations") == 0)
     {
-      if(params->iter == 1000)
+      if(params->iter == -1)
       {
         params->iter = atoi(value);
-        if(params->iter <= 0)
+        if(params->iter <= 0 || params->iter > PAMI_TUNE_MAX_ITER)
         {
           if(!task_id)
             fprintf(stderr, "Invalid iteration count: %s in file: %s\n", value, filename);
@@ -1685,6 +1709,7 @@ static int MPIDI_collsel_process_ini_file(const char *filename, advisor_params_t
 static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *params, char ** out_file)
 {
    int i,c,ret = 0;
+   char *in_file = NULL;
 
    MPIDI_collsel_init_xfer_tables();
    params->verify = 0;
@@ -1704,7 +1729,7 @@ static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *p
          ret = MPIDI_collsel_process_geo_sizes(optarg, params);
          break;
        case 'f':
-         ret = MPIDI_collsel_process_ini_file(optarg, params, out_file);
+         in_file = (char *) optarg;
          break;
        case 'o':
          if(!task_id) /* Only task 0 creates o/p file */
@@ -1712,7 +1737,7 @@ static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *p
          break;
        case 'i':
          params->iter = atoi(optarg);
-         if(params->iter <= 0)
+         if(params->iter <= 0  || params->iter > PAMI_TUNE_MAX_ITER)
          {
            if(!task_id)
              fprintf(stderr, "Invalid iteration count %s\n", optarg);
@@ -1756,6 +1781,17 @@ static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *p
      }
      if(ret) return ret;
    }
+   /* INI file is processed last as we don't wan't to override
+    * command line parameters. Also any invalid value in the INI
+    * file if overriden by a command line flag should not generate
+    * an error
+    */
+   if(in_file != NULL)
+   {
+     ret = MPIDI_collsel_process_ini_file(in_file, params, out_file);
+     if(ret) return ret;
+   }
+
    if(!task_id)
    {
      if (optind < argc)
@@ -1778,7 +1814,8 @@ static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *p
        params->collectives[params->num_collectives++] = i;
      }
    }
-   /* If user did not set any of the following parameters, disable them */
+   /* If user did not set any of the following parameters, set default value */
+   if(params->iter == -1) params->iter = 1000;
    if(params->verbose == -1) params->verbose = 0;
    if(params->verify == -1) params->verify = 0;
    if(params->checkpoint == -1) params->checkpoint = 0;
@@ -1806,7 +1843,7 @@ static void MPIDI_collsel_print_params(advisor_params_t *params, char *output_fi
   }
   printf("\n  Iterations       : %d\n", params->iter);
   printf("  Output file      : %s\n", output_file);
-  printf("  Checkpoint mode  : %d\n", params->checkpoint);
+/*  printf("  Checkpoint mode  : %d\n", params->checkpoint); */
   printf("  Diagnostics mode : %d\n", params->verify);
   printf("  Verbose mode     : %d\n", params->verbose);
 }

http://git.mpich.org/mpich.git/commitdiff/ac596401399adc5a21268b14cd4354c55694d994

commit ac596401399adc5a21268b14cd4354c55694d994
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Thu Apr 18 16:34:50 2013 -0400

    One more fix for correctly displaying warnings in tune mode
    + build fix
    
    (ibm) D189887
    (ibm) 556b0b576c22ef4cc8b745d2ebc57bf4cf354818
    (ibm) cee6d5876ad57094c8631e6c3faaef1bb213377a
    
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>

diff --git a/src/mpid/pamid/src/mpidi_util.c b/src/mpid/pamid/src/mpidi_util.c
index 9605035..a3b565e 100644
--- a/src/mpid/pamid/src/mpidi_util.c
+++ b/src/mpid/pamid/src/mpidi_util.c
@@ -1379,27 +1379,27 @@ static int MPIDI_collsel_process_collectives(char *coll_arg, advisor_params_t *p
     {
       if(strcmp(coll, xfer_array_str[i]) == 0)
       {
-        if(i == 4 )
+        if(i == 4)
         {
-          if(infolevel) 
+          if(infolevel >= 1) 
             fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for ALLGATHERV. ALLGATHERV tuning will be skipped.\nTune for ALLGATHERV_INT instead\n");
           break;
         }
-        else if(i == 7 )
+        else if(i == 7)
         {
-          if(infolevel)
+          if(infolevel >= 1)
             fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for SCATTERV. SCATTERV tuning will be skipped.\nTune for SCATTERV_INT instead\n");
           break;
         }
-        else if(i == 10 )
+        else if(i == 10)
         {
-          if(infolevel)
+          if(infolevel >= 1)
             fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for GATHERV. GATHERV tuning will be skipped.\nTune for GATHERV_INT instead\n");
           break;
         }
-        else if(i == 14 )
+        else if(i == 14)
         {
-          if(infolevel)
+          if(infolevel >= 1)
             fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for ALLTOALLV. ALLTOALLV tuning will be skipped.\nTune for ALLTOALLV_INT instead\n");
           break;
         }

http://git.mpich.org/mpich.git/commitdiff/8ac5694719b68dad966c5b1fe03f85c46ccdf7e9

commit 8ac5694719b68dad966c5b1fe03f85c46ccdf7e9
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Thu Apr 18 15:29:12 2013 -0400

    Changing default iter count to 1000
    
    (ibm) D189889
    (ibm) 7Z8
    (ibm) b987ee6281ea76879793f596a0f6c93c425716d7
    
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>

diff --git a/src/mpid/pamid/src/mpidi_util.c b/src/mpid/pamid/src/mpidi_util.c
index 0d51f1c..9605035 100644
--- a/src/mpid/pamid/src/mpidi_util.c
+++ b/src/mpid/pamid/src/mpidi_util.c
@@ -1281,10 +1281,10 @@ Options:\n\
   -m            Comma separated list of message sizes to benchmark\n\
                 (Default: 1 to 2^k, where k <= 20)\n\n\
   -g            Comma separated list of geometry sizes to benchmark\n\
-                (Default: 2 to 2^k, where k <= world geometry size)\n\n\
+                (Default: Powers of 2 (plus and minus one as well))\n\n\
   -i            Number of benchmark iterations per algorithm\n\
-                (Default: 100)\n\n\
-  -f <file>     Input file containing benchmark parameters\n\
+                (Default: 1000)\n\n\
+  -f <file>     Input INI file containing benchmark parameters\n\
                 You can override a parameter with a command line argument\n\n\
   -o <file>     Output XML file containing benchmark results\n\
                 (Default: pami_tune_results.xml)\n\n\
@@ -1308,7 +1308,7 @@ static void MPIDI_collsel_init_advisor_params(advisor_params_t *params)
   params->procs_per_node = NULL;
   params->geometry_sizes = NULL;
   params->message_sizes = NULL;
-  params->iter = 100;
+  params->iter = 1000;
   /* Set the following to -1, so that we can
      check if the user has set them or not */
   params->verify = -1;
@@ -1534,7 +1534,7 @@ static int MPIDI_collsel_process_output_file(char *filename, char **out_file)
   if(access(filename, F_OK) == 0)
   {
     fprintf(stderr, "File %s already exists, renaming existing file\n", filename);
-    newname = (char *) MPIU_Malloc(filename_len + 4);
+    newname = (char *) MPIU_Malloc(filename_len + 5);
     for (i = 0; i < 500; ++i)
     {
       sprintf(newname,"%s.%d", filename, i);
@@ -1642,7 +1642,7 @@ static int MPIDI_collsel_process_ini_file(const char *filename, advisor_params_t
     }
     else if(strcmp(name, "iterations") == 0)
     {
-      if(params->iter == 100)
+      if(params->iter == 1000)
       {
         params->iter = atoi(value);
         if(params->iter <= 0)

http://git.mpich.org/mpich.git/commitdiff/02b0a83fa24fc4232b8b494d04bdf2f003670702

commit 02b0a83fa24fc4232b8b494d04bdf2f003670702
Author: Sameh Sharkawi <sssharka at us.ibm.com>
Date:   Thu Apr 18 15:19:20 2013 -0400

    Alltoallv_int is missing in the xml file
    
      1 - A fix where all (v) algorithms are disabled in collective selection
          and  only (v)_int algorithms are enabled since MPICH only supports
          (v)_int algorithms. IN the tune case, (v) collectives are skipped
          even if user selected them. Also a warning message is displayed to stderr
          if infolevel is >= 1 in collective selection and tuning cases.
      2 - Another fix for one task geometries where the fast_query object was
          not initialized but was still used and may cause core dump.
    
    (ibm) D189887
    (ibm) 7Z8
    (ibm) 0ea3f16a9fd6e2fbc1cfffeb5401cce20a861e96
    
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>
    
    This is the 2nd commit message:
      BGQ build break fix

diff --git a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
index 47e9eb4..5b53acd 100644
--- a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
+++ b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
@@ -616,35 +616,35 @@ MPIDO_Allgather_simple(const void *sendbuf,
 
    send_size = recv_size;
 
-   if(MPIDI_Pamix_collsel_advise != NULL)
-   {
-     advisor_algorithm_t advisor_algorithms[1];
-     int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLGATHER, send_size, advisor_algorithms, 1);
-     if(num_algorithms)
-     {
-       if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
-       {
-         return MPIR_Allgather(sendbuf, sendcount, sendtype,
-                          recvbuf, recvcount, recvtype,
-                          comm_ptr, mpierrno); 
-       }
-     }
-   }
+  if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+  {
+    advisor_algorithm_t advisor_algorithms[1];
+    int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLGATHER, send_size, advisor_algorithms, 1);
+    if(num_algorithms)
+    {
+      if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
+      {
+        return MPIR_Allgather(sendbuf, sendcount, sendtype,
+                              recvbuf, recvcount, recvtype,
+                              comm_ptr, mpierrno); 
+      }
+    }
+  }
 
    rbuf = (char *)recvbuf+recv_true_lb;
 
-   if(!rcv_data_contig)
-   {
-      rcv_noncontig_buff = MPIU_Malloc(recv_size * size);
-      rbuf = rcv_noncontig_buff;
-      if(rcv_noncontig_buff == NULL)
-      {
-         MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
-            "Fatal:  Cannot allocate pack buffer");
-      }
-   if(sendbuf == MPI_IN_PLACE)
+  if(!rcv_data_contig)
+  {
+    rcv_noncontig_buff = MPIU_Malloc(recv_size * size);
+    rbuf = rcv_noncontig_buff;
+    if(rcv_noncontig_buff == NULL)
+    {
+      MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
+                 "Fatal:  Cannot allocate pack buffer");
+    }
+    if(sendbuf == MPI_IN_PLACE)
     {
-     sbuf = PAMI_IN_PLACE;
+      sbuf = PAMI_IN_PLACE;
       size_t extent;
       MPID_Datatype_get_extent_macro(recvtype,extent);
       MPIR_Localcopy(recvbuf + (rank*recvcount*extent), recvcount, recvtype,
diff --git a/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c b/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
index 3fd0eb6..cec19d4 100644
--- a/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
+++ b/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
@@ -657,9 +657,9 @@ MPIDO_Allgatherv_simple(const void *sendbuf,
                           dt_null,
                           recv_true_lb);
 
-   if(MPIDI_Pamix_collsel_advise != NULL)
-   {
-     advisor_algorithm_t advisor_algorithms[1];
+  if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+  {
+    advisor_algorithm_t advisor_algorithms[1];
     int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLGATHERV_INT, rcvtypelen * recvcounts[0], advisor_algorithms, 1);
      if(num_algorithms)
      {
diff --git a/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c b/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
index b948b8e..b921f9d 100644
--- a/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
+++ b/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
@@ -423,7 +423,7 @@ int MPIDO_Allreduce_simple(const void *sendbuf,
                            data_contig, data_size, data_ptr, data_true_lb);
 
 
-   if(MPIDI_Pamix_collsel_advise != NULL)
+   if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
    {
      advisor_algorithm_t advisor_algorithms[1];
      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLREDUCE, data_size * count, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c b/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
index 39a008f..8246b21 100644
--- a/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
+++ b/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
@@ -242,51 +242,51 @@ int MPIDO_Alltoall_simple(const void *sendbuf,
    rbuf = (char *)recvbuf + rdt_true_lb;
    recv_size = rcvlen * recvcount;
 
-   if(MPIDI_Pamix_collsel_advise != NULL)
-   {
-     advisor_algorithm_t advisor_algorithms[1];
-     int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLTOALL, recv_size, advisor_algorithms, 1);
-     if(num_algorithms)
-     {
-       if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
-       {
-         return MPIR_Alltoall_intra(sendbuf, sendcount, sendtype,
-                      recvbuf, recvcount, recvtype,
-                      comm_ptr, mpierrno);
-       }
-     }
-   }
-
-   if(sendbuf != MPI_IN_PLACE)
-   {
-     MPIDI_Datatype_get_info(1, sendtype, snd_contig, sndlen, sdt, sdt_true_lb);
-     sbuf = (char *)sendbuf + sdt_true_lb;
-     send_size = sndlen * sendcount;
-     if(!snd_contig)
-     {
-        snd_noncontig_buff = MPIU_Malloc(send_size);
-        sbuf = snd_noncontig_buff;
-        if(snd_noncontig_buff == NULL)
-        {
-           MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
-              "Fatal:  Cannot allocate pack buffer");
-        }
-        DLOOP_Offset last = send_size;
-        MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
-        MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
-
-     } 
-   }
-
-   if(!rcv_contig)
-   {
-      rcv_noncontig_buff = MPIU_Malloc(recv_size);
-      rbuf = rcv_noncontig_buff;
-      if(rcv_noncontig_buff == NULL)
+  if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+  {
+    advisor_algorithm_t advisor_algorithms[1];
+    int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLTOALL, recv_size, advisor_algorithms, 1);
+    if(num_algorithms)
+    {
+      if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
       {
-         MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
-            "Fatal:  Cannot allocate pack buffer");
+        return MPIR_Alltoall_intra(sendbuf, sendcount, sendtype,
+                                   recvbuf, recvcount, recvtype,
+                                   comm_ptr, mpierrno);
+      }
+    }
+  }
+
+  if(sendbuf != MPI_IN_PLACE)
+  {
+    MPIDI_Datatype_get_info(1, sendtype, snd_contig, sndlen, sdt, sdt_true_lb);
+    sbuf = (char *)sendbuf + sdt_true_lb;
+    send_size = sndlen * sendcount;
+    if(!snd_contig)
+    {
+      snd_noncontig_buff = MPIU_Malloc(send_size);
+      sbuf = snd_noncontig_buff;
+      if(snd_noncontig_buff == NULL)
+      {
+        MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
+                   "Fatal:  Cannot allocate pack buffer");
       }
+      DLOOP_Offset last = send_size;
+      MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
+      MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+
+    }
+  }
+
+  if(!rcv_contig)
+  {
+    rcv_noncontig_buff = MPIU_Malloc(recv_size);
+    rbuf = rcv_noncontig_buff;
+    if(rcv_noncontig_buff == NULL)
+    {
+      MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
+                 "Fatal:  Cannot allocate pack buffer");
+    }
     if(sendbuf == MPI_IN_PLACE)
     {
       size_t extent;
diff --git a/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c b/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
index 3934877..d2b1c14 100644
--- a/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
+++ b/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
@@ -440,16 +440,16 @@ int MPIDO_Alltoallv_simple(const void *sendbuf,
 
 
   /* Check if collsel has MPICH algorithm as the best performing one, if so, call MPICH now w/o doing any conversions */
-   MPIDI_Datatype_get_info(1, recvtype, rcv_contig, rcvtypelen, rdt, rdt_true_lb);
-   if(MPIDI_Pamix_collsel_advise != NULL)
-   {
-     advisor_algorithm_t advisor_algorithms[1];
-     int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLTOALLV_INT, rcvtypelen * recvcounts[0], advisor_algorithms, 1);
-     if(num_algorithms)
-     {
-       if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
-       {
-         return MPIR_Alltoallv(sendbuf, sendcounts, senddispls, sendtype,
+  MPIDI_Datatype_get_info(1, recvtype, rcv_contig, rcvtypelen, rdt, rdt_true_lb);
+  if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+  {
+    advisor_algorithm_t advisor_algorithms[1];
+    int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_ALLTOALLV_INT, rcvtypelen * recvcounts[0], advisor_algorithms, 1);
+    if(num_algorithms)
+    {
+      if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
+      {
+        return MPIR_Alltoallv(sendbuf, sendcounts, senddispls, sendtype,
                               recvbuf, recvcounts, recvdispls, recvtype,
                               comm_ptr, mpierrno);
        }
diff --git a/src/mpid/pamid/src/coll/bcast/mpido_bcast.c b/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
index fc7a237..05d0c60 100644
--- a/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
+++ b/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
@@ -289,12 +289,11 @@ int MPIDO_Bcast_simple(void *buffer,
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
    const int rank = comm_ptr->rank;
 
-
    /* Must calculate data_size based on count=1 in case it's total size is > integer */
    int data_size_one;
    MPIDI_Datatype_get_info(1, datatype,
 			   data_contig, data_size_one, data_ptr, data_true_lb);
-   if(MPIDI_Pamix_collsel_advise != NULL)
+   if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
    {
      advisor_algorithm_t advisor_algorithms[1];
      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_BROADCAST, data_size_one * count, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/coll/gather/mpido_gather.c b/src/mpid/pamid/src/coll/gather/mpido_gather.c
index d521c1f..6e9fff3 100644
--- a/src/mpid/pamid/src/coll/gather/mpido_gather.c
+++ b/src/mpid/pamid/src/coll/gather/mpido_gather.c
@@ -393,7 +393,7 @@ int MPIDO_Gather_simple(const void *sendbuf,
   {
     MPIDI_Datatype_get_info(sendcount, sendtype, snd_contig,
                             send_size, data_ptr, true_lb);
-    if(MPIDI_Pamix_collsel_advise != NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
     {
       advisor_algorithm_t advisor_algorithms[1];
       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_GATHER, send_size, advisor_algorithms, 1);
@@ -425,7 +425,7 @@ int MPIDO_Gather_simple(const void *sendbuf,
   }
   else
   {
-   if(MPIDI_Pamix_collsel_advise != NULL)
+   if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
    {
      MPIDI_Datatype_get_info(recvcount, recvtype, rcv_contig,
                               recv_size, data_ptr, true_lb);
diff --git a/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c b/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
index 0c5f284..8dddd72 100644
--- a/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
+++ b/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
@@ -264,55 +264,55 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
    {
      MPIDI_Datatype_get_info(sendcount, sendtype, snd_contig,
                             send_size, data_ptr, send_true_lb);
-     if(MPIDI_Pamix_collsel_advise != NULL)
-     {
-       advisor_algorithm_t advisor_algorithms[1];
-       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_GATHERV_INT, 64, advisor_algorithms, 1);
-       if(num_algorithms)
-       {
-         if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
-         {
-           return MPIR_Gatherv(sendbuf, sendcount, sendtype,
-                             recvbuf, recvcounts, displs, recvtype,
-                             root, comm_ptr, mpierrno);
-         }
-       }
-     }
-
-     sbuf = (char *)sendbuf + send_true_lb;
-     if (!snd_contig)
-     {
-        snd_noncontig_buff = MPIU_Malloc(send_size);
-        sbuf = snd_noncontig_buff;
-        if(snd_noncontig_buff == NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+    {
+      advisor_algorithm_t advisor_algorithms[1];
+      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_GATHERV_INT, 64, advisor_algorithms, 1);
+      if(num_algorithms)
+      {
+        if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
         {
-           MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
-              "Fatal:  Cannot allocate pack buffer");
+          return MPIR_Gatherv(sendbuf, sendcount, sendtype,
+                              recvbuf, recvcounts, displs, recvtype,
+                              root, comm_ptr, mpierrno);
         }
-        DLOOP_Offset last = send_size;
-        MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
-        MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
-     }
-   }
-   else
-   {
-     MPIDI_Datatype_get_info(1, recvtype, rcv_contig,
-                                rcvlen, data_ptr, recv_true_lb);
-     if(MPIDI_Pamix_collsel_advise != NULL)
-     {
-       advisor_algorithm_t advisor_algorithms[1];
-       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_GATHERV_INT, 64, advisor_algorithms, 1);
-       if(num_algorithms)
-       {
-         if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
-         {
-           return MPIR_Gatherv(sendbuf, sendcount, sendtype,
-                             recvbuf, recvcounts, displs, recvtype,
-                             root, comm_ptr, mpierrno);
-         }
-       }
-     }
-   }
+      }
+    }
+
+    sbuf = (char *)sendbuf + send_true_lb;
+    if(!snd_contig)
+    {
+      snd_noncontig_buff = MPIU_Malloc(send_size);
+      sbuf = snd_noncontig_buff;
+      if(snd_noncontig_buff == NULL)
+      {
+        MPID_Abort(NULL, MPI_ERR_NO_SPACE, 1,
+                   "Fatal:  Cannot allocate pack buffer");
+      }
+      DLOOP_Offset last = send_size;
+      MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
+      MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+    }
+  }
+  else
+  {
+    MPIDI_Datatype_get_info(1, recvtype, rcv_contig,
+                            rcvlen, data_ptr, recv_true_lb);
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
+    {
+      advisor_algorithm_t advisor_algorithms[1];
+      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_GATHERV_INT, 64, advisor_algorithms, 1);
+      if(num_algorithms)
+      {
+        if(advisor_algorithms[0].algorithm_type == COLLSEL_EXTERNAL_ALGO)
+        {
+          return MPIR_Gatherv(sendbuf, sendcount, sendtype,
+                              recvbuf, recvcounts, displs, recvtype,
+                              root, comm_ptr, mpierrno);
+        }
+      }
+    }
+  }
 
    pami_xfer_t gatherv;
    rbuf = (char *)recvbuf + recv_true_lb;
@@ -354,52 +354,52 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
         MPID_Datatype_get_extent_macro(recvtype,extent);
         MPIR_Localcopy(recvbuf + displs[rank]*extent, recvcounts[rank], recvtype,
                      rcv_noncontig_buff + rdispls[rank], rcounts[rank],MPI_CHAR);
-        }
       }
-      if(sendbuf == MPI_IN_PLACE) 
-      {
-         gatherv.cmd.xfer_gatherv_int.sndbuf = PAMI_IN_PLACE;
-      }
-      else
-      {
-         gatherv.cmd.xfer_gatherv_int.sndbuf = sbuf;
-      }
-      gatherv.cmd.xfer_gatherv_int.stype = PAMI_TYPE_BYTE;/* stype is ignored when sndbuf == PAMI_IN_PLACE */
-      gatherv.cmd.xfer_gatherv_int.stypecount = send_size;
-
-   }
-   else
-   {
+    }
+    if(sendbuf == MPI_IN_PLACE)
+    {
+      gatherv.cmd.xfer_gatherv_int.sndbuf = PAMI_IN_PLACE;
+    }
+    else
+    {
       gatherv.cmd.xfer_gatherv_int.sndbuf = sbuf;
-      gatherv.cmd.xfer_gatherv_int.stype = PAMI_TYPE_BYTE;
-      gatherv.cmd.xfer_gatherv_int.stypecount = send_size;     
-   }
+    }
+    gatherv.cmd.xfer_gatherv_int.stype = PAMI_TYPE_BYTE;/* stype is ignored when sndbuf == PAMI_IN_PLACE */
+    gatherv.cmd.xfer_gatherv_int.stypecount = send_size;
 
+  }
+  else
+  {
+    gatherv.cmd.xfer_gatherv_int.sndbuf = sbuf;
+    gatherv.cmd.xfer_gatherv_int.stype = PAMI_TYPE_BYTE;
+    gatherv.cmd.xfer_gatherv_int.stypecount = send_size;     
+  }
 
-   gatherv.cb_done = cb_gatherv;
-   gatherv.cookie = (void *)&gatherv_active;
-   gatherv.cmd.xfer_gatherv_int.root = MPIDI_Task_to_endpoint(MPID_VCR_GET_LPID(comm_ptr->vcr, root), 0);
-   gatherv.cmd.xfer_gatherv_int.rcvbuf = rbuf;
-   gatherv.cmd.xfer_gatherv_int.rtype = rtype;
-   gatherv.cmd.xfer_gatherv_int.rtypecounts = (int *) rcounts;
-   gatherv.cmd.xfer_gatherv_int.rdispls = (int *) rdispls;
 
+  gatherv.cb_done = cb_gatherv;
+  gatherv.cookie = (void *)&gatherv_active;
+  gatherv.cmd.xfer_gatherv_int.root = MPIDI_Task_to_endpoint(MPID_VCR_GET_LPID(comm_ptr->vcr, root), 0);
+  gatherv.cmd.xfer_gatherv_int.rcvbuf = rbuf;
+  gatherv.cmd.xfer_gatherv_int.rtype = rtype;
+  gatherv.cmd.xfer_gatherv_int.rtypecounts = (int *) rcounts;
+  gatherv.cmd.xfer_gatherv_int.rdispls = (int *) rdispls;
 
-   const pami_metadata_t *my_gatherv_md;
 
-   gatherv.algorithm = mpid->coll_algorithm[PAMI_XFER_GATHERV_INT][0][0];
-   my_gatherv_md = &mpid->coll_metadata[PAMI_XFER_GATHERV_INT][0][0];
+  const pami_metadata_t *my_gatherv_md;
 
-   MPIDI_Update_last_algorithm(comm_ptr, my_gatherv_md->name);
+  gatherv.algorithm = mpid->coll_algorithm[PAMI_XFER_GATHERV_INT][0][0];
+  my_gatherv_md = &mpid->coll_metadata[PAMI_XFER_GATHERV_INT][0][0];
 
-   MPIDI_Post_coll_t gatherv_post;
-   TRACE_ERR("%s gatherv\n", MPIDI_Process.context_post.active>0?"Posting":"Invoking");
-   MPIDI_Context_post(MPIDI_Context[0], &gatherv_post.state,
-                      MPIDI_Pami_post_wrapper, (void *)&gatherv);
-   TRACE_ERR("Gatherv %s\n", MPIDI_Process.context_post.active>0?"posted":"invoked");
-   
-   TRACE_ERR("Waiting on active %d\n", gatherv_active);
-   MPID_PROGRESS_WAIT_WHILE(gatherv_active);
+  MPIDI_Update_last_algorithm(comm_ptr, my_gatherv_md->name);
+
+  MPIDI_Post_coll_t gatherv_post;
+  TRACE_ERR("%s gatherv\n", MPIDI_Process.context_post.active>0?"Posting":"Invoking");
+  MPIDI_Context_post(MPIDI_Context[0], &gatherv_post.state,
+                     MPIDI_Pami_post_wrapper, (void *)&gatherv);
+  TRACE_ERR("Gatherv %s\n", MPIDI_Process.context_post.active>0?"posted":"invoked");
+
+  TRACE_ERR("Waiting on active %d\n", gatherv_active);
+  MPID_PROGRESS_WAIT_WHILE(gatherv_active);
 
   if(!rcv_contig || recvok != PAMI_SUCCESS)
   {
diff --git a/src/mpid/pamid/src/coll/reduce/mpido_reduce.c b/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
index b6a7cd2..abc45fd 100644
--- a/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
+++ b/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
@@ -260,7 +260,7 @@ int MPIDO_Reduce_simple(const void *sendbuf,
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
 
    MPIDI_Datatype_get_info(count, datatype, dt_contig, tsize, dt_null, true_lb);
-   if(MPIDI_Pamix_collsel_advise != NULL)
+   if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
    {
      advisor_algorithm_t advisor_algorithms[1];
      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_REDUCE, tsize, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/coll/scan/mpido_scan.c b/src/mpid/pamid/src/coll/scan/mpido_scan.c
index 6f58dd9..f7a055b 100644
--- a/src/mpid/pamid/src/coll/scan/mpido_scan.c
+++ b/src/mpid/pamid/src/coll/scan/mpido_scan.c
@@ -272,7 +272,7 @@ int MPIDO_Doscan_simple(const void *sendbuf, void *recvbuf,
    pami_xfer_t scan;
    volatile unsigned scan_active = 1;
    MPIDI_Datatype_get_info(count, datatype, dt_contig, tsize, dt_null, true_lb);
-   if(MPIDI_Pamix_collsel_advise != NULL)
+   if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
    {
      advisor_algorithm_t advisor_algorithms[1];
      int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_SCAN, tsize, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/coll/scatter/mpido_scatter.c b/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
index 5f3be7d..b2e9a9d 100644
--- a/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
+++ b/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
@@ -341,7 +341,7 @@ int MPIDO_Scatter_simple(const void *sendbuf,
   {
     MPIDI_Datatype_get_info(sendcount, sendtype, snd_contig,
                             send_size, data_ptr, snd_true_lb);
-    if(MPIDI_Pamix_collsel_advise != NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
     {
       advisor_algorithm_t advisor_algorithms[1];
       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_SCATTER, send_size, advisor_algorithms, 1);
@@ -361,7 +361,7 @@ int MPIDO_Scatter_simple(const void *sendbuf,
   {
     MPIDI_Datatype_get_info(recvcount, recvtype, rcv_contig,
                             recv_size, data_ptr, rcv_true_lb);
-    if(MPIDI_Pamix_collsel_advise != NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
     {
       advisor_algorithm_t advisor_algorithms[1];
       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_SCATTER, recv_size, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c b/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
index 49ddb89..fcafbe0 100644
--- a/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
+++ b/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
@@ -466,7 +466,7 @@ int MPIDO_Scatterv_simple(const void *sendbuf,
   if (rank == root && sendtype != MPI_DATATYPE_NULL && sendcounts[0] >= 0)
   {
     MPIDI_Datatype_get_info(1, sendtype, snd_contig, ssize, dt_ptr, send_true_lb);
-    if(MPIDI_Pamix_collsel_advise != NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
     {
       advisor_algorithm_t advisor_algorithms[1];
       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_SCATTERV_INT, 64, advisor_algorithms, 1);
@@ -486,7 +486,7 @@ int MPIDO_Scatterv_simple(const void *sendbuf,
   {
     MPIDI_Datatype_get_info(recvcount, recvtype, rcv_contig,
                             recv_size, dt_ptr, recv_true_lb);
-    if(MPIDI_Pamix_collsel_advise != NULL)
+    if(MPIDI_Pamix_collsel_advise != NULL && mpid->collsel_fast_query != NULL)
     {
       advisor_algorithm_t advisor_algorithms[1];
       int num_algorithms = MPIDI_Pamix_collsel_advise(mpid->collsel_fast_query, PAMI_XFER_SCATTERV_INT, 64, advisor_algorithms, 1);
diff --git a/src/mpid/pamid/src/comm/mpid_selectcolls.c b/src/mpid/pamid/src/comm/mpid_selectcolls.c
index 4569a0b..3f4e247 100644
--- a/src/mpid/pamid/src/comm/mpid_selectcolls.c
+++ b/src/mpid/pamid/src/comm/mpid_selectcolls.c
@@ -470,6 +470,7 @@ void MPIDI_Comm_coll_envvars(MPID_Comm *comm)
 
    /*   If automatic collective selection is enabled and user didn't specifically overwrite
       it, then use auto coll sel.. Otherwise, go through the manual coll sel code path. */
+   comm->mpid.collsel_fast_query = NULL; /* Init to NULL.. Should only have a value if we create query */
    if(MPIDI_Process.optimized.auto_select_colls != MPID_AUTO_SELECT_COLLS_NONE && MPIDI_Process.optimized.auto_select_colls != MPID_AUTO_SELECT_COLLS_TUNE && comm->local_size > 1)
    {
      /* Create a fast query object, cache it on the comm/geometry and use it in each collective */
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index 45b6ff2..90922d5 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -472,6 +472,11 @@ void MPIDI_Init_collsel_extension()
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_ALLGATHER;
                     break;
                   case PAMI_XFER_ALLGATHERV:
+#if (MPIDI_STATISTICS || MPIDI_PRINTENV)
+                    if(MPIDI_Process.mp_infolevel >= 1)
+                      fprintf(stderr,"WARNING: MPICH (collective selection) doesn't support ALLGATHERV, only ALLGATHERV_INT is supported\n");
+#endif
+                    break;
                   case PAMI_XFER_ALLGATHERV_INT:
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_ALLGATHERV;
                     break;
@@ -479,6 +484,11 @@ void MPIDI_Init_collsel_extension()
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_SCATTER;
                     break;
                   case PAMI_XFER_SCATTERV:
+#if (MPIDI_STATISTICS || MPIDI_PRINTENV)
+                    if(MPIDI_Process.mp_infolevel >= 1)
+                      fprintf(stderr,"WARNING: MPICH (collective selection) doesn't support SCATTERV, only SCATTERV_INT is supported\n");
+#endif
+                    break;
                   case PAMI_XFER_SCATTERV_INT:
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_SCATTERV;
                     break;
@@ -486,6 +496,11 @@ void MPIDI_Init_collsel_extension()
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_GATHER;
                     break;
                   case PAMI_XFER_GATHERV:
+#if (MPIDI_STATISTICS || MPIDI_PRINTENV)
+                    if(MPIDI_Process.mp_infolevel >= 1)
+                      fprintf(stderr,"WARNING: MPICH (collective selection) doesn't support GATHERV, only GATHERV_INT is supported\n");
+#endif
+                    break;
                   case PAMI_XFER_GATHERV_INT:
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_GATHERV;
                     break;
@@ -496,6 +511,11 @@ void MPIDI_Init_collsel_extension()
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_ALLTOALL;
                     break;
                   case PAMI_XFER_ALLTOALLV:
+#if (MPIDI_STATISTICS || MPIDI_PRINTENV)
+                    if(MPIDI_Process.mp_infolevel >= 1)
+                      fprintf(stderr,"WARNING: MPICH (collective selection) doesn't support ALLTOALLV, only ALLTOALLV_INT is supported\n");
+#endif
+                    break;
                   case PAMI_XFER_ALLTOALLV_INT:
                     MPIDI_Process.optimized.auto_select_colls |= MPID_AUTO_SELECT_COLLS_ALLTOALLV;
                     break;
diff --git a/src/mpid/pamid/src/mpidi_util.c b/src/mpid/pamid/src/mpidi_util.c
index 315a1a7..0d51f1c 100644
--- a/src/mpid/pamid/src/mpidi_util.c
+++ b/src/mpid/pamid/src/mpidi_util.c
@@ -1357,6 +1357,11 @@ static int MPIDI_collsel_process_collectives(char *coll_arg, advisor_params_t *p
   int i, ret = 0, arg_len = strlen(coll_arg);
   char *collectives = (char *) MPIU_Malloc(arg_len + 1);
   char *coll;
+  int infolevel = 0;
+#if (MPIDI_STATISTICS || MPIDI_PRINTENV)
+  if(MPIDI_Process.mp_infolevel >= 1)
+    infolevel = 1;
+#endif
   /* if already set via config file, free it */
   if(params->collectives)
   {
@@ -1374,8 +1379,35 @@ static int MPIDI_collsel_process_collectives(char *coll_arg, advisor_params_t *p
     {
       if(strcmp(coll, xfer_array_str[i]) == 0)
       {
-        params->collectives[params->num_collectives++] = i;
-        break;
+        if(i == 4 )
+        {
+          if(infolevel) 
+            fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for ALLGATHERV. ALLGATHERV tuning will be skipped.\nTune for ALLGATHERV_INT instead\n");
+          break;
+        }
+        else if(i == 7 )
+        {
+          if(infolevel)
+            fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for SCATTERV. SCATTERV tuning will be skipped.\nTune for SCATTERV_INT instead\n");
+          break;
+        }
+        else if(i == 10 )
+        {
+          if(infolevel)
+            fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for GATHERV. GATHERV tuning will be skipped.\nTune for GATHERV_INT instead\n");
+          break;
+        }
+        else if(i == 14 )
+        {
+          if(infolevel)
+            fprintf(stderr,"WARNING: MPICH (pami_tune) doesn't support tuning for ALLTOALLV. ALLTOALLV tuning will be skipped.\nTune for ALLTOALLV_INT instead\n");
+          break;
+        }
+        else
+        {
+          params->collectives[params->num_collectives++] = i;
+          break;
+        }
       }
     }
     /* arg did not match any collective */
@@ -1741,6 +1773,8 @@ static int MPIDI_collsel_process_arg(int argc, char *argv[], advisor_params_t *p
      params->collectives = (pami_xfer_type_t *)MPIU_Malloc(sizeof(pami_xfer_type_t)*PAMI_XFER_COUNT);
      for(i = 0; i < PAMI_XFER_COUNT; i++)
      {
+       if(i == 4 || i == 7 || i == 10 || i == 14)
+         i++;
        params->collectives[params->num_collectives++] = i;
      }
    }

-----------------------------------------------------------------------

Summary of changes:
 .../pamid/src/coll/allgather/mpido_allgather.c     |   52 +++---
 .../pamid/src/coll/allgatherv/mpido_allgatherv.c   |    6 +-
 .../pamid/src/coll/allreduce/mpido_allreduce.c     |    2 +-
 src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c  |   86 +++++-----
 .../pamid/src/coll/alltoallv/mpido_alltoallv.c     |   20 ++--
 src/mpid/pamid/src/coll/bcast/mpido_bcast.c        |    3 +-
 src/mpid/pamid/src/coll/gather/mpido_gather.c      |    4 +-
 src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c    |  168 ++++++++++----------
 src/mpid/pamid/src/coll/reduce/mpido_reduce.c      |    2 +-
 src/mpid/pamid/src/coll/scan/mpido_scan.c          |    2 +-
 src/mpid/pamid/src/coll/scatter/mpido_scatter.c    |    4 +-
 src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c  |    4 +-
 src/mpid/pamid/src/comm/mpid_selectcolls.c         |    1 +
 src/mpid/pamid/src/mpid_init.c                     |   20 +++
 src/mpid/pamid/src/mpidi_util.c                    |  137 +++++++++++++---
 15 files changed, 309 insertions(+), 202 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list