Loading examples/heat-equation/tnl-heat-equation.h +4 −5 Original line number Diff line number Diff line Loading @@ -8,8 +8,9 @@ /* See Copyright Notice in tnl/Copyright */ #ifndef TNL_HEAT_EQUATION_H_ #define TNL_HEAT_EQUATION_H_ #pragma once #define MPIIO #include <TNL/Solvers/Solver.h> #include <TNL/Solvers/FastBuildConfigTag.h> Loading Loading @@ -109,5 +110,3 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; return EXIT_SUCCESS; } No newline at end of file #endif /* TNL_HEAT_EQUATION_H_ */ src/TNL/Communicators/MpiCommunicator.h +0 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,6 @@ class MpiCommunicator } } }; MPI::Request MpiCommunicator::NullRequest; Loading src/TNL/Meshes/DistributedMeshes/DistributedGridIO.h +6 −9 Original line number Diff line number Diff line Loading @@ -13,11 +13,8 @@ #include <iostream> #include <mpi.h> //#ifdef MPIIO #include <TNL/Communicators/MpiCommunicator.h> //#endif #include <TNL/File.h> #include <TNL/Communicators/MpiCommunicator.h> #include <TNL/Meshes/DistributedMeshes/DistributedMesh.h> #include <TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h> #include <TNL/Functions/MeshFunction.h> Loading Loading @@ -156,7 +153,6 @@ class DistributedGridIO<MeshFunctionType,LocalCopy> * BAD IMPLEMENTTION creating MPI-Types at every save! -- I dont want contamine more places by MPI.. */ #ifdef MPIIO template<typename MeshFunctionType> class DistributedGridIO<MeshFunctionType,MpiIO> { Loading @@ -171,6 +167,7 @@ class DistributedGridIO<MeshFunctionType,MpiIO> static bool save(const String& fileName, MeshFunctionType &meshFunction) { #ifdef MPIIO auto *distrGrid=meshFunction.getMesh().getDistributedMesh(); if(distrGrid==NULL) //not distributed Loading Loading @@ -214,8 +211,11 @@ class DistributedGridIO<MeshFunctionType,MpiIO> MPI_Type_free(&atype); MPI_Type_free(&ftype); return true; #else std::cerr << "MPI-IO is not supported by your system." << std::endl; return false; #endif }; template<typename DitsributedGridType> Loading Loading @@ -402,9 +402,6 @@ class DistributedGridIO<MeshFunctionType,MpiIO> }; #endif } } } 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::MpiIO> ::save(fileName.getFileName(), *uPointer ); Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::save(fileName.getFileName(), *uPointer ); } else { Loading src/Tools/tnl-init.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -83,5 +83,9 @@ int main( int argc, char* argv[] ) if( ! resolveMeshType( parsedMeshType, parameters ) ) return EXIT_FAILURE; #ifdef HAVE_MPI Communicators::MpiCommunicator::Finalize(); #endif return EXIT_SUCCESS; } Loading
examples/heat-equation/tnl-heat-equation.h +4 −5 Original line number Diff line number Diff line Loading @@ -8,8 +8,9 @@ /* See Copyright Notice in tnl/Copyright */ #ifndef TNL_HEAT_EQUATION_H_ #define TNL_HEAT_EQUATION_H_ #pragma once #define MPIIO #include <TNL/Solvers/Solver.h> #include <TNL/Solvers/FastBuildConfigTag.h> Loading Loading @@ -109,5 +110,3 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; return EXIT_SUCCESS; } No newline at end of file #endif /* TNL_HEAT_EQUATION_H_ */
src/TNL/Communicators/MpiCommunicator.h +0 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,6 @@ class MpiCommunicator } } }; MPI::Request MpiCommunicator::NullRequest; Loading
src/TNL/Meshes/DistributedMeshes/DistributedGridIO.h +6 −9 Original line number Diff line number Diff line Loading @@ -13,11 +13,8 @@ #include <iostream> #include <mpi.h> //#ifdef MPIIO #include <TNL/Communicators/MpiCommunicator.h> //#endif #include <TNL/File.h> #include <TNL/Communicators/MpiCommunicator.h> #include <TNL/Meshes/DistributedMeshes/DistributedMesh.h> #include <TNL/Meshes/DistributedMeshes/CopyEntitiesHelper.h> #include <TNL/Functions/MeshFunction.h> Loading Loading @@ -156,7 +153,6 @@ class DistributedGridIO<MeshFunctionType,LocalCopy> * BAD IMPLEMENTTION creating MPI-Types at every save! -- I dont want contamine more places by MPI.. */ #ifdef MPIIO template<typename MeshFunctionType> class DistributedGridIO<MeshFunctionType,MpiIO> { Loading @@ -171,6 +167,7 @@ class DistributedGridIO<MeshFunctionType,MpiIO> static bool save(const String& fileName, MeshFunctionType &meshFunction) { #ifdef MPIIO auto *distrGrid=meshFunction.getMesh().getDistributedMesh(); if(distrGrid==NULL) //not distributed Loading Loading @@ -214,8 +211,11 @@ class DistributedGridIO<MeshFunctionType,MpiIO> MPI_Type_free(&atype); MPI_Type_free(&ftype); return true; #else std::cerr << "MPI-IO is not supported by your system." << std::endl; return false; #endif }; template<typename DitsributedGridType> Loading Loading @@ -402,9 +402,6 @@ class DistributedGridIO<MeshFunctionType,MpiIO> }; #endif } } }
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::MpiIO> ::save(fileName.getFileName(), *uPointer ); Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::save(fileName.getFileName(), *uPointer ); } else { Loading
src/Tools/tnl-init.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -83,5 +83,9 @@ int main( int argc, char* argv[] ) if( ! resolveMeshType( parsedMeshType, parameters ) ) return EXIT_FAILURE; #ifdef HAVE_MPI Communicators::MpiCommunicator::Finalize(); #endif return EXIT_SUCCESS; }