[mpich-discuss] [PATCH 2/2] test attrdeleteget: use MPI-2 function names

Jed Brown jedbrown at mcs.anl.gov
Sat May 18 12:55:39 CDT 2013


Signed-off-by: Jed Brown <jedbrown at mcs.anl.gov>
---
Feel free to squash this into the last commit if you prefer that the
test suite not include deprecated names.

 test/mpi/attr/attrdeleteget.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/mpi/attr/attrdeleteget.c b/test/mpi/attr/attrdeleteget.c
index a43e939..4d63eeb 100644
--- a/test/mpi/attr/attrdeleteget.c
+++ b/test/mpi/attr/attrdeleteget.c
@@ -21,8 +21,8 @@ int main(int argc,char **argv)
 
     MTest_Init(&argc, &argv);
     MPI_Comm_split(MPI_COMM_WORLD, 1, 0, &scomm);
-    MPI_Keyval_create(MPI_NULL_COPY_FN, delete_fn, &key, &errs);
-    MPI_Attr_put(scomm, key, a);
+    MPI_Comm_create_keyval(MPI_NULL_COPY_FN, delete_fn, &key, &errs);
+    MPI_Comm_set_attr(scomm, key, a);
     MPI_Comm_free(&scomm);
     MTest_Finalize(errs);
     MPI_Finalize();
@@ -39,9 +39,9 @@ int delete_fn(MPI_Comm comm,int keyval,void *attr_val,void *extra_state)
         printf("MPI_COMM_NULL passed to delete_fn\n");
         (*errs)++;
     }
-    err = MPI_Attr_get(comm,key,&ptr,&flg);
+    err = MPI_Comm_get_attr(comm,key,&ptr,&flg);
     if (err != MPI_SUCCESS) {
-        printf("MPI_Attr_get returned error %d, presumably due to invalid communicator\n", err);
+        printf("MPI_Comm_get_attr returned error %d, presumably due to invalid communicator\n", err);
         (*errs)++;
     }
 #endif
-- 
1.8.2.3




More information about the discuss mailing list