Commit 42e9ee46 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed TNL_MPI_PRINT macro

parent 6a7f9be5
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -585,11 +585,13 @@ template<> struct MPITypeResolver<long double>
} // namespace TNL

#define TNL_MPI_PRINT( message )                                                                                              \
for( int j = 0; j < TNL::Communicators::MpiCommunicator::GetSize( TNL::Communicators::MpiCommunicator::AllGroup ); j++ ) \
for( int __tnl_mpi_print_j = 0;                                                                                               \
     __tnl_mpi_print_j < TNL::Communicators::MpiCommunicator::GetSize( TNL::Communicators::MpiCommunicator::AllGroup );       \
     __tnl_mpi_print_j++ )                                                                                                    \
{                                                                                                                             \
      if( j == TNL::Communicators::MpiCommunicator::GetRank( TNL::Communicators::MpiCommunicator::AllGroup ) )           \
   if( __tnl_mpi_print_j == TNL::Communicators::MpiCommunicator::GetRank( TNL::Communicators::MpiCommunicator::AllGroup ) )   \
   {                                                                                                                          \
         std::cerr << "Node " << j << " of "                                                                             \
      std::cerr << "Node " << __tnl_mpi_print_j << " of "                                                                     \
                << TNL::Communicators::MpiCommunicator::GetSize( TNL::Communicators::MpiCommunicator::AllGroup )              \
                << " : " << message << std::endl;                                                                             \
   }                                                                                                                          \