Loading src/TNL/Communicators/MpiCommunicator.h +2 −2 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ class MpiCommunicator { #ifdef HAVE_MPI /***HACK for linear distribution***/ int sum=0; /* int sum=0; for(int i=0;i<dim;i++) sum+=distr[i]; if(sum==0) //uživatel neovlivňuje distribuci Loading @@ -172,7 +172,7 @@ class MpiCommunicator distr[i]=1; } distr[dim-1]=0; } }*/ /***END OF HACK***/ MPI_Dims_create(nproc, dim, distr); Loading src/TNL/Meshes/DistributedMeshes/DistributedGrid_1D.h +4 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,10 @@ class DistributedMesh<Grid< 1, RealType, Device, Index >> static constexpr int getMeshDimension() { return 1; }; DistributedMesh() : isSet(false ){}; : isSet(false ) { domainDecomposition.setValue(0); }; bool setup( const Config::ParameterContainer& parameters, const String& prefix ) Loading src/TNL/Meshes/DistributedMeshes/DistributedGrid_2D.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,10 @@ class DistributedMesh<Grid< 2, RealType, Device, Index >> public: DistributedMesh() : domainDecomposition( 0 ), isSet( false ) {}; : domainDecomposition( 0 ), isSet( false ) { domainDecomposition.setValue(0); }; void setDomainDecomposition( const CoordinatesType& domainDecomposition ) { Loading src/TNL/Meshes/DistributedMeshes/DistributedGrid_3D.h +4 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,10 @@ class DistributedMesh<Grid< 3, RealType, Device, Index >> static constexpr int getMeshDimension() { return 3; }; DistributedMesh() : isSet( false ) {}; : isSet( false ) { domainDecomposition.setValue(0); }; static void configSetup( Config::ConfigDescription& config ) { Loading src/UnitTests/Mpi/CMakeLists.txt +27 −11 Original line number Diff line number Diff line Loading @@ -23,12 +23,29 @@ ADD_EXECUTABLE( CopyEntitesTest CopyEntitiesTest.cpp ) ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cpp ) TARGET_COMPILE_OPTIONS( DistributedGridIOTest PRIVATE ${CXX_TESTS_FLAGS} ) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) CUDA_ADD_EXECUTABLE( DistributedGridIO_MPIIOTest DistributedGridIO_MPIIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIO_MPIIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ELSE( BUILD_CUDA ) ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cpp OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( DistributedGridIO_MPIIOTest DistributedGridIO_MPIIOTest.cpp OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIO_MPIIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) ADD_TEST( NAME CopyEntitesTest COMMAND ${EXECUTABLE_OUTPUT_PATH}/CopyEntitesTest${CMAKE_EXECUTABLE_SUFFIX} ) SET (mpi_test_parameters_1d -np 4 -H localhost:4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridTest_1D${CMAKE_EXECUTABLE_SUFFIX}") Loading @@ -43,12 +60,11 @@ ADD_TEST( NAME DistributedGridTest_3D COMMAND "mpirun" ${mpi_test_parameters_3d} SET (mpi_test_parameters_IO -np 4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridIOTest${CMAKE_EXECUTABLE_SUFFIX}") ADD_TEST( NAME DistributedGridIOTest COMMAND "mpirun" ${mpi_test_parameters_IO}) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( GPUDistributedGridIOTest GPUDistributedGridIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( GPUDistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) SET (mpi_test_parameters_IOMPIIO -np 4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridIO_MPIIOTest${CMAKE_EXECUTABLE_SUFFIX}") ADD_TEST( NAME DistributedGridIO_MPIIOTest COMMAND "mpirun" ${mpi_test_parameters_IOMPIIO}) endif() Loading
src/TNL/Communicators/MpiCommunicator.h +2 −2 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ class MpiCommunicator { #ifdef HAVE_MPI /***HACK for linear distribution***/ int sum=0; /* int sum=0; for(int i=0;i<dim;i++) sum+=distr[i]; if(sum==0) //uživatel neovlivňuje distribuci Loading @@ -172,7 +172,7 @@ class MpiCommunicator distr[i]=1; } distr[dim-1]=0; } }*/ /***END OF HACK***/ MPI_Dims_create(nproc, dim, distr); Loading
src/TNL/Meshes/DistributedMeshes/DistributedGrid_1D.h +4 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,10 @@ class DistributedMesh<Grid< 1, RealType, Device, Index >> static constexpr int getMeshDimension() { return 1; }; DistributedMesh() : isSet(false ){}; : isSet(false ) { domainDecomposition.setValue(0); }; bool setup( const Config::ParameterContainer& parameters, const String& prefix ) Loading
src/TNL/Meshes/DistributedMeshes/DistributedGrid_2D.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,10 @@ class DistributedMesh<Grid< 2, RealType, Device, Index >> public: DistributedMesh() : domainDecomposition( 0 ), isSet( false ) {}; : domainDecomposition( 0 ), isSet( false ) { domainDecomposition.setValue(0); }; void setDomainDecomposition( const CoordinatesType& domainDecomposition ) { Loading
src/TNL/Meshes/DistributedMeshes/DistributedGrid_3D.h +4 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,10 @@ class DistributedMesh<Grid< 3, RealType, Device, Index >> static constexpr int getMeshDimension() { return 3; }; DistributedMesh() : isSet( false ) {}; : isSet( false ) { domainDecomposition.setValue(0); }; static void configSetup( Config::ConfigDescription& config ) { Loading
src/UnitTests/Mpi/CMakeLists.txt +27 −11 Original line number Diff line number Diff line Loading @@ -23,12 +23,29 @@ ADD_EXECUTABLE( CopyEntitesTest CopyEntitiesTest.cpp ) ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cpp ) TARGET_COMPILE_OPTIONS( DistributedGridIOTest PRIVATE ${CXX_TESTS_FLAGS} ) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) CUDA_ADD_EXECUTABLE( DistributedGridIO_MPIIOTest DistributedGridIO_MPIIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIO_MPIIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ELSE( BUILD_CUDA ) ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cpp OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( DistributedGridIO_MPIIOTest DistributedGridIO_MPIIOTest.cpp OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( DistributedGridIO_MPIIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) ADD_TEST( NAME CopyEntitesTest COMMAND ${EXECUTABLE_OUTPUT_PATH}/CopyEntitesTest${CMAKE_EXECUTABLE_SUFFIX} ) SET (mpi_test_parameters_1d -np 4 -H localhost:4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridTest_1D${CMAKE_EXECUTABLE_SUFFIX}") Loading @@ -43,12 +60,11 @@ ADD_TEST( NAME DistributedGridTest_3D COMMAND "mpirun" ${mpi_test_parameters_3d} SET (mpi_test_parameters_IO -np 4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridIOTest${CMAKE_EXECUTABLE_SUFFIX}") ADD_TEST( NAME DistributedGridIOTest COMMAND "mpirun" ${mpi_test_parameters_IO}) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( GPUDistributedGridIOTest GPUDistributedGridIOTest.cu OPTIONS ${CXX_TESTS_FLAGS}) TARGET_LINK_LIBRARIES( GPUDistributedGridIOTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) SET (mpi_test_parameters_IOMPIIO -np 4 "${EXECUTABLE_OUTPUT_PATH}/DistributedGridIO_MPIIOTest${CMAKE_EXECUTABLE_SUFFIX}") ADD_TEST( NAME DistributedGridIO_MPIIOTest COMMAND "mpirun" ${mpi_test_parameters_IOMPIIO}) endif()