From 0a139bd8427bafd28aa6577166c315071e10e618 Mon Sep 17 00:00:00 2001 From: degomme Date: Sat, 4 Oct 2014 01:12:39 +0200 Subject: [PATCH 1/1] Add MPI_Comm_*keyval and MPI_Comm*attr functions These are just aliases for MPI*keyval and MPI*attr deprecated functions --- src/smpi/smpi_pmpi.c | 49 ++++++++++--------- .../smpi/mpich3-test/attr/CMakeLists.txt | 12 ++--- teshsuite/smpi/mpich3-test/attr/testlist | 9 ++-- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 2c7ec2c77c..a40bccb707 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -3001,6 +3001,31 @@ int PMPI_Attr_put(MPI_Comm comm, int keyval, void* attr_value) { return smpi_attr_put(comm, keyval, attr_value); } + +int PMPI_Comm_get_attr (MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag) +{ + return PMPI_Attr_get(comm, comm_keyval, attribute_val,flag); +} + +int PMPI_Comm_set_attr (MPI_Comm comm, int comm_keyval, void *attribute_val) +{ + return PMPI_Attr_put(comm, comm_keyval, attribute_val); +} + +int PMPI_Comm_delete_attr (MPI_Comm comm, int comm_keyval) +{ + return PMPI_Attr_delete(comm, comm_keyval); +} + +int PMPI_Comm_create_keyval(MPI_Comm_copy_attr_function* copy_fn, MPI_Comm_delete_attr_function* delete_fn, int* keyval, void* extra_state) +{ + return PMPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state); +} + +int PMPI_Comm_free_keyval(int* keyval) { + return PMPI_Keyval_free(keyval); +} + /* The following calls are not yet implemented and will fail at runtime. */ /* Once implemented, please move them above this notice. */ @@ -3112,30 +3137,6 @@ int PMPI_Comm_test_inter(MPI_Comm comm, int* flag) { NOT_YET_IMPLEMENTED } -int PMPI_Comm_get_attr (MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag) -{ - NOT_YET_IMPLEMENTED -} - -int PMPI_Comm_set_attr (MPI_Comm comm, int comm_keyval, void *attribute_val) -{ - NOT_YET_IMPLEMENTED -} - -int PMPI_Comm_delete_attr (MPI_Comm comm, int comm_keyval) -{ - NOT_YET_IMPLEMENTED -} - -int PMPI_Comm_create_keyval(MPI_Comm_copy_attr_function* copy_fn, MPI_Comm_delete_attr_function* delete_fn, int* keyval, void* extra_state) -{ - NOT_YET_IMPLEMENTED -} - -int PMPI_Comm_free_keyval(int* keyval) { - NOT_YET_IMPLEMENTED -} - int PMPI_Pcontrol(const int level ) { NOT_YET_IMPLEMENTED diff --git a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt index a6bd72b7de..c4772079bd 100644 --- a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt @@ -17,15 +17,15 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) add_executable(attrend2 attrend2.c) add_executable(attrend attrend.c) add_executable(attrerr attrerr.c) -# add_executable(attrerrcomm attrerrcomm.c) + add_executable(attrerrcomm attrerrcomm.c) # add_executable(attrerrtype attrerrtype.c) # add_executable(attric attric.c) add_executable(attrorder attrorder.c) -# add_executable(attrordercomm attrordercomm.c) + add_executable(attrordercomm attrordercomm.c) # add_executable(attrordertype attrordertype.c) add_executable(attrt attrt.c) add_executable(baseattr2 baseattr2.c) -# add_executable(baseattrcomm baseattrcomm.c) + add_executable(baseattrcomm baseattrcomm.c) add_executable(fkeyval fkeyval.c) # add_executable(fkeyvalcomm fkeyvalcomm.c) # add_executable(fkeyvaltype fkeyvaltype.c) @@ -35,15 +35,15 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) target_link_libraries(attrend2 simgrid mtest_c) target_link_libraries(attrend simgrid mtest_c) target_link_libraries(attrerr simgrid mtest_c) -# target_link_libraries(attrerrcomm simgrid mtest_c) + target_link_libraries(attrerrcomm simgrid mtest_c) # target_link_libraries(attrerrtype simgrid mtest_c) # target_link_libraries(attric simgrid mtest_c) target_link_libraries(attrorder simgrid mtest_c) -# target_link_libraries(attrordercomm simgrid mtest_c) + target_link_libraries(attrordercomm simgrid mtest_c) # target_link_libraries(attrordertype simgrid mtest_c) target_link_libraries(attrt simgrid mtest_c) target_link_libraries(baseattr2 simgrid mtest_c) -# target_link_libraries(baseattrcomm simgrid mtest_c) + target_link_libraries(baseattrcomm simgrid mtest_c) target_link_libraries(fkeyval simgrid mtest_c) # target_link_libraries(fkeyvalcomm simgrid mtest_c) # target_link_libraries(fkeyvaltype simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/attr/testlist b/teshsuite/smpi/mpich3-test/attr/testlist index 480ea27996..c687935157 100644 --- a/teshsuite/smpi/mpich3-test/attr/testlist +++ b/teshsuite/smpi/mpich3-test/attr/testlist @@ -11,20 +11,17 @@ attrerr 1 #attrend 4 attrend2 1 attrend2 5 -#needs MPI_Errhandler_set, MPI_Comm_create_keyval, MPI_Comm_free_keyval, MPI_Comm_set_attr, MPI_Comm_delete_attr -#attrerrcomm 1 +attrerrcomm 1 #needs MPI_Errhandler_set, MPI_Type_create_keyval, MPI_Type_dup, MPI_Type_set_attr, MPI_Type_delete_attr #attrerrtype 1 #needs MPI_Type_create_keyval, MPI_Type_dup, MPI_Type_set_attr #attr2type 1 attrorder 1 -#needs MPI_Comm_create_keyval, MPI_Comm_free_keyval, MPI_Comm_get_attr, MPI_Comm_set_attr, MPI_Comm_delete_attr -#attrordercomm 1 +attrordercomm 1 #needs MPI_Type_create_keyval, MPI_Type_delete_keyval, MPI_Type_set_attr, MPI_Type_delete_attr #attrordertype 1 baseattr2 1 -#needs MPI_Comm_get_attr -#baseattrcomm 1 +baseattrcomm 1 #MPI_Keyval_create, MPI_Keyval_free for type and comm also #fkeyval 1 #fkeyvalcomm 1 -- 2.20.1