Commit 31fa61f9 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

MPI refactoring: cleaned up benchmarks

parent 60ee5cd0
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#include <TNL/SystemInfo.h>
#include <TNL/Cuda/DeviceInfo.h>
#include <TNL/Config/ConfigDescription.h>
#include <TNL/Communicators/MpiCommunicator.h>
#include <TNL/MPI/Wrappers.h>

namespace TNL {
namespace Benchmarks {
@@ -356,9 +356,7 @@ inline Benchmark::MetadataMap getHardwareMetadata()
       { "system release", SystemInfo::getSystemRelease() },
       { "start time", SystemInfo::getCurrentTime() },
#ifdef HAVE_MPI
       { "number of MPI processes", convertToString( (Communicators::MpiCommunicator::IsInitialized())
                                       ? Communicators::MpiCommunicator::GetSize( Communicators::MpiCommunicator::AllGroup )
                                       : 1 ) },
       { "number of MPI processes", convertToString( TNL::MPI::GetSize() ) },
#endif
       { "OpenMP enabled", convertToString( Devices::Host::isOMPEnabled() ) },
       { "OpenMP threads", convertToString( Devices::Host::getMaxThreadsCount() ) },
+4 −6
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@

#include <TNL/Devices/Host.h>
#include <TNL/Algorithms/ParallelFor.h>
#include <TNL/Communicators/MpiCommunicator.h>

namespace TNL {
   namespace Benchmarks {
@@ -28,7 +27,6 @@ struct SimpleProblem
   using DeviceType = Device;
   using IndexType = Index;
   using DofVectorType = Containers::Vector< RealType, DeviceType, IndexType >;
   using CommunicatorType = Communicators::MpiCommunicator;

   template< typename VectorPointer >
   void getExplicitUpdate( const RealType& time,
+1 −28
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@
#include <TNL/Config/ParameterContainer.h>

#include "../Benchmarks.h"
#include "SimpleProblem.h"


#include <stdexcept>  // std::runtime_error

@@ -35,31 +33,6 @@ getPerformer()
   return "CPU";
}

/*template< typename Matrix >
void barrier( const Matrix& matrix )
{
}

template< typename Matrix, typename Communicator >
void barrier( const Matrices::DistributedMatrix< Matrix, Communicator >& matrix )
{
   Communicator::Barrier( matrix.getCommunicationGroup() );
}*/

template< typename Device >
bool checkDevice( const Config::ParameterContainer& parameters )
{
   const String device = parameters.getParameter< String >( "device" );
   if( device == "all" )
      return true;
   if( std::is_same< Device, Devices::Host >::value && device == "host" )
      return true;
   if( std::is_same< Device, Devices::Cuda >::value && device == "cuda" )
      return true;
   return false;
}


template< typename Solver, typename VectorPointer >
void
benchmarkSolver( Benchmark& benchmark,