Skip to content

Conversation

@nysal
Copy link
Member

@nysal nysal commented Nov 15, 2016

@hjelmn Please take a look.

MPI_T_pvar_get_index was returning an incorrect index. The index
was never set correctly while registering the performance variables.
Additionally fix a missing case in the mca_base_var_type_t to MPI
datatype conversion. This type is currently used for control variables
registered by mxm, fca and hcoll components.

This fixes the mpich test - http://git.mpich.org/mpich.git/blob/HEAD:/test/mpi/mpi_t/getindex.c
You might need a few changes to run the test:

--- getindex.c	2016-11-15 17:20:56.089095214 +0530
+++ getindex_new.c	2016-11-15 17:23:15.891400761 +0530
@@ -31,7 +31,8 @@
         fprintf(stdout, "%d MPI Control Variables\n", num_cvar);
     for (i = 0; i < num_cvar; i++) {
         namelen = sizeof(name);
-        MPI_T_cvar_get_info(i, name, &namelen, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+        errno = MPI_T_cvar_get_info(i, name, &namelen, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+        if(errno != MPI_SUCCESS) continue;
         if (namelen <= 128) {
             errno = MPI_T_cvar_get_index(name, &cvar_index);
             if (errno != MPI_SUCCESS || cvar_index != i)
@@ -52,8 +53,9 @@
 
     for (i = 0; i < num_pvar; i++) {
         namelen = sizeof(name);
-        MPI_T_pvar_get_info(i, name, &namelen, NULL, &pvar_class, NULL, NULL, NULL,
+        errno = MPI_T_pvar_get_info(i, name, &namelen, NULL, &pvar_class, NULL, NULL, NULL,
                             NULL, NULL, NULL, NULL, NULL);
+        if(errno != MPI_SUCCESS) continue;
         if (namelen <= 128) {
             errno = MPI_T_pvar_get_index(name, pvar_class, &pvar_index);
             if (errno != MPI_SUCCESS || pvar_index != i)
@@ -74,7 +76,8 @@
         fprintf(stdout, "%d MPI_T categories\n", num_cat);
     for (i = 0; i < num_cat; i++) {
         namelen = sizeof(name);
-        MPI_T_category_get_info(i, name, &namelen, NULL, NULL, NULL, NULL, NULL);
+        errno = MPI_T_category_get_info(i, name, &namelen, NULL, NULL, NULL, NULL, NULL);
+        if(errno != MPI_SUCCESS) continue;
         if (namelen <= 128) {
             errno = MPI_T_category_get_index(name, &cat_index);
             if (errno != MPI_SUCCESS || cat_index != i)

@nysal nysal added the bug label Nov 15, 2016
@nysal nysal assigned nysal and hjelmn and unassigned nysal Nov 21, 2016
@nysal
Copy link
Member Author

nysal commented Dec 12, 2016

@jsquyres Could you check in the weekly meeting if Nathan or someone else can review this PR?

@jsquyres
Copy link
Member

@hjelmn Looked at this quickly while on the webex and thought it was correct. He will check deeper shortly.

@hjelmn
Copy link
Member

hjelmn commented Dec 20, 2016

Please PR to any affected version. Probably 2.0.x and 2.x.

MPI_T_pvar_get_index was returning an incorrect index. The index
was never set correctly while registering the performance variables.
Additionally fix a missing case in the mca_base_var_type_t to MPI
datatype conversion. This type is currently used for control variables
registered by mxm, fca and hcoll components.

Signed-off-by: Nysal Jan K.A <jnysal@in.ibm.com>
@nysal nysal merged commit 19e3be3 into open-mpi:master Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants