Loading src/TNL/Containers/Array.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -920,6 +920,7 @@ void send( const Array< Value, Device, Index, Allocator >& array, int dest, int template< typename Value, typename Device, typename Index, typename Allocator > void receive( Array< Value, Device, Index, Allocator >& array, int src, int tag, MPI_Comm comm ) { #ifdef HAVE_MPI TNL_ASSERT( false, "Does not work" ); MPI_Status status; Index size; Loading @@ -927,7 +928,7 @@ void receive( Array< Value, Device, Index, Allocator >& array, int src, int tag, std::cerr << "Size = " << size << std::endl; array.setSize( size ); MPI_Recv( ( void* ) array.getData(), size * sizeof( Value ), MPI_BYTE, src, tag, comm, &status ); #endif } Loading src/TNL/Containers/ArrayView.h +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <TNL/File.h> #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/MPI.h> namespace TNL { namespace Containers { Loading src/TNL/Containers/ArrayView.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include <TNL/Containers/detail/ArrayIO.h> #include <TNL/Containers/detail/ArrayAssignment.h> #include <TNL/Allocators/Default.h> #include <TNL/MPI/getDataType.h> #include "ArrayView.h" Loading Loading @@ -544,10 +543,12 @@ File& operator>>( File&& file, ArrayView< Value, Device, Index > view ) template< typename Value, typename Device, typename Index > void send( const ArrayView< Value, Device, Index >& view, int dest, int tag, MPI_Comm comm ) { #ifdef HAVE_MPI TNL_ASSERT( false, "Does not work" ); auto size = view.getSize(); MPI_Send( ( const void* ) size, 1, MPI::getDataType< Index >(), dest, tag, comm ); MPI_Send( ( const void* ) view.getData(), view.getSize() * sizeof( Value ), MPI_BYTE, dest, tag, comm ); #endif } Loading src/TNL/MPI/DummyDefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ enum { #define MPI_CART 1 /* cartesian topology */ #define MPI_GRAPH 2 /* graph topology */ #define MPI_KEYVAL_INVALID -1 /* invalid key value */ #define MPI_COMM_WORLD 0 #endif Loading
src/TNL/Containers/Array.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -920,6 +920,7 @@ void send( const Array< Value, Device, Index, Allocator >& array, int dest, int template< typename Value, typename Device, typename Index, typename Allocator > void receive( Array< Value, Device, Index, Allocator >& array, int src, int tag, MPI_Comm comm ) { #ifdef HAVE_MPI TNL_ASSERT( false, "Does not work" ); MPI_Status status; Index size; Loading @@ -927,7 +928,7 @@ void receive( Array< Value, Device, Index, Allocator >& array, int src, int tag, std::cerr << "Size = " << size << std::endl; array.setSize( size ); MPI_Recv( ( void* ) array.getData(), size * sizeof( Value ), MPI_BYTE, src, tag, comm, &status ); #endif } Loading
src/TNL/Containers/ArrayView.h +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <TNL/File.h> #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/MPI.h> namespace TNL { namespace Containers { Loading
src/TNL/Containers/ArrayView.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include <TNL/Containers/detail/ArrayIO.h> #include <TNL/Containers/detail/ArrayAssignment.h> #include <TNL/Allocators/Default.h> #include <TNL/MPI/getDataType.h> #include "ArrayView.h" Loading Loading @@ -544,10 +543,12 @@ File& operator>>( File&& file, ArrayView< Value, Device, Index > view ) template< typename Value, typename Device, typename Index > void send( const ArrayView< Value, Device, Index >& view, int dest, int tag, MPI_Comm comm ) { #ifdef HAVE_MPI TNL_ASSERT( false, "Does not work" ); auto size = view.getSize(); MPI_Send( ( const void* ) size, 1, MPI::getDataType< Index >(), dest, tag, comm ); MPI_Send( ( const void* ) view.getData(), view.getSize() * sizeof( Value ), MPI_BYTE, dest, tag, comm ); #endif } Loading
src/TNL/MPI/DummyDefs.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ enum { #define MPI_CART 1 /* cartesian topology */ #define MPI_GRAPH 2 /* graph topology */ #define MPI_KEYVAL_INVALID -1 /* invalid key value */ #define MPI_COMM_WORLD 0 #endif