Skip to content

Commit 4fb7586

Browse files
committed
SPC: fix test to succeed even if encountering invalid pvars
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 2540097 commit 4fb7586

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/spc/spc_test.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ int main(int argc, char **argv)
7474
MPI_result = MPI_T_pvar_get_info(i, name, &name_len, &verbosity,
7575
&var_class, &datatype, &enumtype, description, &desc_len, &bind,
7676
&readonly, &continuous, &atomic);
77+
if (MPI_result == MPI_T_ERR_INVALID) {
78+
// skip invalidated MPI_T pvars
79+
continue;
80+
}
7781
if(MPI_result != MPI_SUCCESS || MPI_result == MPI_T_ERR_PVAR_NO_STARTSTOP) {
7882
fprintf(stderr, "Failed to get pvar info.\n");
7983
MPI_Abort(MPI_COMM_WORLD, MPI_result);
@@ -82,6 +86,7 @@ int main(int argc, char **argv)
8286
if(strcmp(name, counter_names[rank]) == 0) {
8387
index = i;
8488
printf("[%d] %s -> %s\n", rank, name, description);
89+
break;
8590
}
8691
}
8792

0 commit comments

Comments
 (0)