Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add MPI_Win_get_group, and activate some tests using *c2f and *f2c calls
authorAugustin Degomme <augustin.degomme@imag.fr>
Tue, 30 Sep 2014 09:28:39 +0000 (11:28 +0200)
committerAugustin Degomme <augustin.degomme@imag.fr>
Thu, 2 Oct 2014 13:09:18 +0000 (15:09 +0200)
include/smpi/smpi.h
src/smpi/private.h
src/smpi/smpi_mpi.c
src/smpi/smpi_pmpi.c
src/smpi/smpi_rma.c
teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/rma/testlist
teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/rma/testlist
teshsuite/smpi/mpich3-test/rma/CMakeLists.txt

index 379a42a..a529e37 100644 (file)
@@ -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,
index 29f0d48..b2d4ff2 100644 (file)
@@ -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);
index 71d88ad..90bc27f 100644 (file)
@@ -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);
 }
index 8fc593c..e75d645 100644 (file)
@@ -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;
 }
index 72f4cc7..653131a 100644 (file)
@@ -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);;
 }
index 4a23dcb..f13b881 100644 (file)
@@ -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)
index 0eb50f2..5d902cb 100644 (file)
@@ -11,7 +11,7 @@ winnamef 1
 #wingroupf 4
 winaccf 4
 #Needs mpi_win_f2c
-#c2f2cwinf 1
+c2f2cwinf 1
 #Needs attr
 #baseattrwinf 1
 #winattrf 1
index 07f0627..6292467 100644 (file)
@@ -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)
index f2eb6fd..e85fb84 100644 (file)
@@ -8,7 +8,7 @@ wingetf90 5
 winnamef90 1
 #wingroupf90 4
 winaccf90 4
-#c2f2cwinf90 1
+c2f2cwinf90 1
 #baseattrwinf90 1
 #winattrf90 1
 #winattr2f90 1
index 6823da3..bde731c 100644 (file)
@@ -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}")