Loading src/TNL/Meshes/DistributedMeshes/DistributedGridIO.h +14 −16 Original line number Diff line number Diff line Loading @@ -22,12 +22,6 @@ #include <TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h> #include <TNL/Functions/MeshFunction.h> namespace TNL { namespace Meshes { namespace DistributedMeshes { Loading Loading @@ -166,9 +160,9 @@ class DistributedGridIO<MeshFunctionType,LocalCopy> template<typename MeshFunctionType> class DistributedGridIO<MeshFunctionType,MpiIO> { public: using RealType = typename MeshFunctionType::RealType; typedef typename MeshFunctionType::MeshType MeshType; typedef typename MeshFunctionType::MeshType::CoordinatesType CoordinatesType; typedef typename MeshFunctionType::MeshType::PointType PointType; Loading @@ -188,7 +182,7 @@ class DistributedGridIO<MeshFunctionType,MpiIO> MPI_Datatype atype; int dataCount=CreateDataTypes(distrGrid,&ftype,&atype); double * data=meshFunction.getData().getData();//TYP RealType* data=meshFunction.getData().getData(); //write MPI_File file; Loading @@ -207,7 +201,11 @@ class DistributedGridIO<MeshFunctionType,MpiIO> } MPI_Bcast(&headerSize, 1, MPI_INT,0, MPI_COMM_WORLD); MPI_File_set_view(file,headerSize,MPI_DOUBLE,ftype,"native",MPI_INFO_NULL);//TYP if( std::is_same< RealType, double >::value) MPI_File_set_view(file,headerSize,MPI_DOUBLE,ftype,"native",MPI_INFO_NULL); if( std::is_same< RealType, float >::value) MPI_File_set_view(file,headerSize,MPI_FLOAT,ftype,"native",MPI_INFO_NULL); MPI_Status wstatus; MPI_File_write(file,data,1,atype,&wstatus); Loading src/TNL/Problems/HeatEquationProblem_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ makeSnapshot( const RealType& time, if(CommunicatorType::isDistributed()) { Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::save(fileName.getFileName(), *uPointer ); Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::MpiIO> ::save(fileName.getFileName(), *uPointer ); } else { Loading Loading
src/TNL/Meshes/DistributedMeshes/DistributedGridIO.h +14 −16 Original line number Diff line number Diff line Loading @@ -22,12 +22,6 @@ #include <TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h> #include <TNL/Functions/MeshFunction.h> namespace TNL { namespace Meshes { namespace DistributedMeshes { Loading Loading @@ -166,9 +160,9 @@ class DistributedGridIO<MeshFunctionType,LocalCopy> template<typename MeshFunctionType> class DistributedGridIO<MeshFunctionType,MpiIO> { public: using RealType = typename MeshFunctionType::RealType; typedef typename MeshFunctionType::MeshType MeshType; typedef typename MeshFunctionType::MeshType::CoordinatesType CoordinatesType; typedef typename MeshFunctionType::MeshType::PointType PointType; Loading @@ -188,7 +182,7 @@ class DistributedGridIO<MeshFunctionType,MpiIO> MPI_Datatype atype; int dataCount=CreateDataTypes(distrGrid,&ftype,&atype); double * data=meshFunction.getData().getData();//TYP RealType* data=meshFunction.getData().getData(); //write MPI_File file; Loading @@ -207,7 +201,11 @@ class DistributedGridIO<MeshFunctionType,MpiIO> } MPI_Bcast(&headerSize, 1, MPI_INT,0, MPI_COMM_WORLD); MPI_File_set_view(file,headerSize,MPI_DOUBLE,ftype,"native",MPI_INFO_NULL);//TYP if( std::is_same< RealType, double >::value) MPI_File_set_view(file,headerSize,MPI_DOUBLE,ftype,"native",MPI_INFO_NULL); if( std::is_same< RealType, float >::value) MPI_File_set_view(file,headerSize,MPI_FLOAT,ftype,"native",MPI_INFO_NULL); MPI_Status wstatus; MPI_File_write(file,data,1,atype,&wstatus); Loading
src/TNL/Problems/HeatEquationProblem_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ makeSnapshot( const RealType& time, if(CommunicatorType::isDistributed()) { Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::save(fileName.getFileName(), *uPointer ); Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::MpiIO> ::save(fileName.getFileName(), *uPointer ); } else { Loading