From: Augustin Degomme Date: Tue, 30 Sep 2014 09:28:39 +0000 (+0200) Subject: add MPI_Win_get_group, and activate some tests using *c2f and *f2c calls X-Git-Tag: v3_12~783 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8c8892e660c3672d9263394e22fb3a7b040914bc add MPI_Win_get_group, and activate some tests using *c2f and *f2c calls --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 379a42aa58..a529e37be9 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -567,6 +567,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Win_free,( MPI_Win* win)); MPI_CALL(XBT_PUBLIC(int), MPI_Win_create,( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win)); MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_name,(MPI_Win win, char * name)); MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_name,(MPI_Win win, char * name, int* len)); +MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_group,(MPI_Win win, MPI_Group * group)); MPI_CALL(XBT_PUBLIC(int), MPI_Win_fence,( int assert, MPI_Win win)); MPI_CALL(XBT_PUBLIC(int), MPI_Get,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, diff --git a/src/smpi/private.h b/src/smpi/private.h index 29f0d48f1e..b2d4ff20ee 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -364,6 +364,7 @@ int smpi_mpi_win_free( MPI_Win* win); MPI_Win smpi_mpi_win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm); void smpi_mpi_win_get_name(MPI_Win win, char* name, int* length); +void smpi_mpi_win_get_group(MPI_Win win, MPI_Group* group); void smpi_mpi_win_set_name(MPI_Win win, char* name); int smpi_mpi_win_fence( int assert, MPI_Win win); diff --git a/src/smpi/smpi_mpi.c b/src/smpi/smpi_mpi.c index 71d88ade3f..90bc27fb52 100644 --- a/src/smpi/smpi_mpi.c +++ b/src/smpi/smpi_mpi.c @@ -626,6 +626,10 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler* errhandler) { return PMPI_Errhandler_set(comm, errhandler); } +int MPI_Win_get_group(MPI_Win win, MPI_Group * group){ + return PMPI_Win_get_group(win, group); +} + int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) { return PMPI_Win_set_errhandler(win, errhandler); } diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 8fc593c7f2..e75d6452f5 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -2745,15 +2745,24 @@ int PMPI_Win_set_name(MPI_Win win, char * name) int PMPI_Win_get_name(MPI_Win win, char * name, int* len) { - int retval = 0; + int retval = MPI_SUCCESS; if (win == MPI_WIN_NULL) { - retval = MPI_ERR_TYPE; + retval = MPI_ERR_WIN; } else if (name == NULL) { retval = MPI_ERR_ARG; } else { smpi_mpi_win_get_name(win, name, len); - retval = MPI_SUCCESS; + } + return retval; +} + +int PMPI_Win_get_group(MPI_Win win, MPI_Group * group){ + int retval = MPI_SUCCESS; + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + }else { + smpi_mpi_win_get_group(win, group); } return retval; } diff --git a/src/smpi/smpi_rma.c b/src/smpi/smpi_rma.c index 72f4cc7d0a..653131aba0 100644 --- a/src/smpi/smpi_rma.c +++ b/src/smpi/smpi_rma.c @@ -94,6 +94,11 @@ void smpi_mpi_win_get_name(MPI_Win win, char* name, int* length){ strcpy(name, win->name); } +void smpi_mpi_win_get_group(MPI_Win win, MPI_Group* group){ + if(win->comm != MPI_COMM_NULL) + *group = smpi_comm_group(win->comm); +} + void smpi_mpi_win_set_name(MPI_Win win, char* name){ win->name = strdup(name);; } diff --git a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt index 4a23dcb6d4..f13b8813d2 100644 --- a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt @@ -19,7 +19,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) # add_executable(baseattrwinf baseattrwinf.f) # add_executable(winattr2f winattr2f.f) # add_executable(winattrf winattrf.f) -# add_executable(c2f2cwinf c2f2cwinf.f c2f2cwin.c) + add_executable(c2f2cwinf c2f2cwinf.f c2f2cwin.c) add_executable(wingetf wingetf.f) add_executable(winnamef winnamef.f) # add_executable(winscale1f winscale1f.f) @@ -30,7 +30,7 @@ target_link_libraries(winaccf simgrid mtest_f77) target_link_libraries(winfencef simgrid mtest_f77) #target_link_libraries(wingroupf simgrid mtest_f77) #target_link_libraries(baseattrwinf simgrid mtest_f77) -#target_link_libraries(c2f2cwinf simgrid mtest_f77) +target_link_libraries(c2f2cwinf simgrid mtest_f77) #target_link_libraries(winattr2f simgrid mtest_f77) #target_link_libraries(winattrf simgrid mtest_f77) target_link_libraries(wingetf simgrid mtest_f77) diff --git a/teshsuite/smpi/mpich3-test/f77/rma/testlist b/teshsuite/smpi/mpich3-test/f77/rma/testlist index 0eb50f2f11..5d902cb9c8 100644 --- a/teshsuite/smpi/mpich3-test/f77/rma/testlist +++ b/teshsuite/smpi/mpich3-test/f77/rma/testlist @@ -11,7 +11,7 @@ winnamef 1 #wingroupf 4 winaccf 4 #Needs mpi_win_f2c -#c2f2cwinf 1 +c2f2cwinf 1 #Needs attr #baseattrwinf 1 #winattrf 1 diff --git a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt index 07f062784d..6292467547 100644 --- a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt @@ -19,7 +19,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) # add_executable(baseattrwinf90 baseattrwinf90.f90) # add_executable(winattr2f90 winattr2f90.f90) # add_executable(winattrf90 winattrf90.f90) -# add_executable(c2f2cwinf90 c2f2cwinf90.f90 c2f2cwin.c) + add_executable(c2f2cwinf90 c2f2cwinf90.f90 c2f902cwin.c) add_executable(wingetf90 wingetf90.f90) add_executable(winnamef90 winnamef90.f90) # add_executable(winscale1f90 winscale1f90.f90) @@ -30,7 +30,7 @@ target_link_libraries(winaccf90 simgrid mtest_f90) target_link_libraries(winfencef90 simgrid mtest_f90) #target_link_libraries(wingroupf90 simgrid mtest_f90) #target_link_libraries(baseattrwinf90 simgrid mtest_f90) -#target_link_libraries(c2f2cwinf90 simgrid mtest_f90) +target_link_libraries(c2f2cwinf90 simgrid mtest_f90) #target_link_libraries(winattr2f90 simgrid mtest_f90) #target_link_libraries(winattrf90 simgrid mtest_f90) target_link_libraries(wingetf90 simgrid mtest_f90) diff --git a/teshsuite/smpi/mpich3-test/f90/rma/testlist b/teshsuite/smpi/mpich3-test/f90/rma/testlist index f2eb6fd88a..e85fb8474a 100644 --- a/teshsuite/smpi/mpich3-test/f90/rma/testlist +++ b/teshsuite/smpi/mpich3-test/f90/rma/testlist @@ -8,7 +8,7 @@ wingetf90 5 winnamef90 1 #wingroupf90 4 winaccf90 4 -#c2f2cwinf90 1 +c2f2cwinf90 1 #baseattrwinf90 1 #winattrf90 1 #winattr2f90 1 diff --git a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt index 6823da3064..bde731c140 100644 --- a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt @@ -40,7 +40,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) # add_executable(get_acc_local get_acc_local.c) # add_executable(get_accumulate get_accumulate.c) add_executable(getfence1 getfence1.c) -# add_executable(getgroup getgroup.c) + add_executable(getgroup getgroup.c) # add_executable(ircpi ircpi.c) # add_executable(linked_list_bench_lock_all linked_list_bench_lock_all.c) # add_executable(linked_list_bench_lock_excl linked_list_bench_lock_excl.c) @@ -138,7 +138,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) # target_link_libraries(get_acc_local simgrid mtest_c) # target_link_libraries(get_accumulate simgrid mtest_c) target_link_libraries(getfence1 simgrid mtest_c) -# target_link_libraries(getgroup simgrid mtest_c) + target_link_libraries(getgroup simgrid mtest_c) # target_link_libraries(ircpi simgrid mtest_c) # target_link_libraries(linked_list_bench_lock_all simgrid mtest_c) # target_link_libraries(linked_list_bench_lock_excl simgrid mtest_c) @@ -236,7 +236,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) # set_target_properties(get_acc_local PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") # set_target_properties(get_accumulate PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") set_target_properties(getfence1 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") -# set_target_properties(getgroup PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") + set_target_properties(getgroup PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") # set_target_properties(ircpi PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") # set_target_properties(linked_list_bench_lock_all PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}") # set_target_properties(linked_list_bench_lock_excl PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")