From: degomme Date: Wed, 11 Jun 2014 13:09:17 +0000 (+0200) Subject: activate tests using resized and handle some corner cases X-Git-Tag: v3_12~987 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/563d88a01d634ce1fbac8809194b68103076c150?ds=sidebyside activate tests using resized and handle some corner cases --- diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 3e30e4d291..9159a69710 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -2685,7 +2685,16 @@ int PMPI_Type_create_resized(MPI_Datatype oldtype,MPI_Aint lb, MPI_Aint extent, if(oldtype == MPI_DATATYPE_NULL) { return MPI_ERR_TYPE; } - smpi_datatype_create(newtype,oldtype->size, lb, lb + extent, oldtype->has_subtype,oldtype->substruct, oldtype->flags); + int blocks[3] = { 1, 1, 1 }; + MPI_Aint disps[3] = { lb, 0, lb+extent }; + MPI_Datatype types[3] = { MPI_LB, oldtype, MPI_UB }; + + s_smpi_mpi_struct_t* subtype = smpi_datatype_struct_create( blocks, + disps, + 3, + types + ); + smpi_datatype_create(newtype,oldtype->size, lb, lb + extent, 1 , subtype, DT_FLAG_VECTOR); (*newtype)->flags &= ~DT_FLAG_COMMITED; return MPI_SUCCESS; diff --git a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt index f8686dc0b9..6a829c5288 100644 --- a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt @@ -38,7 +38,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) add_executable(simple-commit simple-commit.c) # add_executable(simple-pack simple-pack.c) # add_executable(simple-pack-external simple-pack-external.c) -# add_executable(simple-resized simple-resized.c) + add_executable(simple-resized simple-resized.c) add_executable(simple-size-extent simple-size-extent.c) # add_executable(sizedtypes sizedtypes.c) # add_executable(slice-pack slice-pack.c) @@ -55,8 +55,8 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) add_executable(tfree tfree.c) # add_executable(tmatchsize tmatchsize.c) # add_executable(transpose-pack transpose-pack.c) -# add_executable(tresized2 tresized2.c) -# add_executable(tresized tresized.c) + add_executable(tresized2 tresized2.c) + add_executable(tresized tresized.c) # add_executable(triangular-pack triangular-pack.c) add_executable(typecommit typecommit.c) # add_executable(typefree typefree.c) @@ -94,7 +94,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) target_link_libraries(simple-commit simgrid mtest_c) # target_link_libraries(simple-pack simgrid mtest_c) # target_link_libraries(simple-pack-external simgrid mtest_c) -# target_link_libraries(simple-resized simgrid mtest_c) + target_link_libraries(simple-resized simgrid mtest_c) target_link_libraries(simple-size-extent simgrid mtest_c) # target_link_libraries(sizedtypes simgrid mtest_c) # target_link_libraries(slice-pack simgrid mtest_c) @@ -111,8 +111,8 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) target_link_libraries(tfree simgrid mtest_c) # target_link_libraries(tmatchsize simgrid mtest_c) # target_link_libraries(transpose-pack simgrid mtest_c) -# target_link_libraries(tresized2 simgrid mtest_c) -# target_link_libraries(tresized simgrid mtest_c) + target_link_libraries(tresized2 simgrid mtest_c) + target_link_libraries(tresized simgrid mtest_c) # target_link_libraries(triangular-pack simgrid mtest_c) target_link_libraries(typecommit simgrid mtest_c) # target_link_libraries(typefree simgrid mtest_c) diff --git a/teshsuite/smpi/mpich3-test/datatype/testlist b/teshsuite/smpi/mpich3-test/datatype/testlist index ea89c43f04..c78593f128 100644 --- a/teshsuite/smpi/mpich3-test/datatype/testlist +++ b/teshsuite/smpi/mpich3-test/datatype/testlist @@ -18,7 +18,7 @@ typecommit 1 zeroparms 1 #getpartelm 2 #needs MPI_Type_create_resized -#tresized 2 +tresized 2 #tresized2 2 #needs MPI_Type_match_size #tmatchsize 1 @@ -49,7 +49,7 @@ simple-size-extent 1 #struct-empty-el 1 contig-zero-count 1 #needs MPI_Type_create_resized -#simple-resized 1 +simple-resized 1 #needs MPI_Pack #unusual-noncontigs 1 #buggy, and needs MPI_Get_elements