PURIFY
Next-generation radio interferometric imaging
Classes | Functions
main.cc File Reference
#include "purify/config.h"
#include <benchmark/benchmark.h>
#include "purify/logging.h"
#include <sopt/logging.h>
#include <sopt/mpi/communicator.h>
#include <sopt/mpi/session.h>
+ Include dependency graph for main.cc:

Go to the source code of this file.

Classes

class  NullReporter
 

Functions

int main (int argc, char const **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char const **  argv 
)

Definition at line 20 of file main.cc.

20  {
23 
24 #ifdef PURIFY_MPI
25  auto const session = sopt::mpi::init(argc, argv);
26  auto const world = sopt::mpi::Communicator::World();
27  PURIFY_LOW_LOG("MPI initialized");
28 #endif
29  ::benchmark::Initialize(&argc, const_cast<char **>(argv));
30 
31 #ifdef PURIFY_MPI
32  if (world.is_root())
33  // root process will use a reporter from the usual set provided by
34  // ::benchmark
35  ::benchmark::RunSpecifiedBenchmarks();
36  else {
37  // reporting from other processes is disabled by passing a custom reporter
38  NullReporter null;
39  ::benchmark::RunSpecifiedBenchmarks(&null);
40  }
41 #endif
42  return 0;
43 }
#define PURIFY_LOW_LOG(...)
Low priority message.
Definition: logging.h:207
void set_level(const std::string &level)
Method to set the logging level of the default Log object.
Definition: logging.h:137

References PURIFY_LOW_LOG, and purify::logging::set_level().