Commit 64c6e595 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'mpi-explosive' of geraldine.fjfi.cvut.cz:/local/projects/tnl/tnl into mpi-explosive

parents 5d9c6f79 96ab7c2d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
@@ -172,7 +172,7 @@ class MpiCommunicator
                    distr[i]=1;
               }
               distr[dim-1]=0;
            }
            }*/
            /***END OF HACK***/

            MPI_Dims_create(nproc, dim, distr);
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ namespace TNL {
template<typename RealType, typename Device, typename Index >
DistributedMesh< Grid< 1, RealType, Device, Index > >::
DistributedMesh()
: isSet(false ){};
: domainDecomposition( 0 ), isSet( false ) {}

template< typename RealType, typename Device, typename Index >     
bool
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ namespace TNL {
template< typename RealType, typename Device, typename Index >
DistributedMesh< Grid< 2, RealType, Device, Index > >::
DistributedMesh()
: domainDecomposition( 0 ), isSet( false ) {};
: domainDecomposition( 0 ), isSet( false ) {}

template< typename RealType, typename Device, typename Index >
void
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ namespace TNL {
template< typename RealType, typename Device, typename Index >
DistributedMesh< Grid< 3, RealType, Device, Index > >::
DistributedMesh()
: isSet( false ) {};
: domainDecomposition( 0 ), isSet( false ) {}

template< typename RealType, typename Device, typename Index >     
void
+31 −11
Original line number Diff line number Diff line
@@ -23,12 +23,33 @@ ADD_EXECUTABLE( CopyEntitesTest CopyEntitiesTest.cpp )
                              ${GTEST_BOTH_LIBRARIES}
                              tnl )

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( DistributedGridIO_MPIIOTest DistributedGridIO_MPIIOTest.cpp )
       TARGET_COMPILE_OPTIONS( DistributedGridIO_MPIIOTest PRIVATE ${CXX_TESTS_FLAGS} )
       TARGET_LINK_LIBRARIES( DistributedGridIO_MPIIOTest
                                  ${GTEST_BOTH_LIBRARIES}
                                  tnl )
            
    ADD_EXECUTABLE( DistributedGridIOTest DistributedGridIOTest.cpp )
       TARGET_COMPILE_OPTIONS( DistributedGridIOTest PRIVATE ${CXX_TESTS_FLAGS} )
       TARGET_LINK_LIBRARIES( DistributedGridIOTest
                                  ${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}")
@@ -43,12 +64,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