MPIManager.h File Reference

Detailed Description

#include "MPIWrapper.h"
#include "core/DataTypes.h"
#include "core/debug/Debug.h"
#include "core/math/Uint.h"
#include "core/singleton/Singleton.h"

Classes

class  walberla::mpi::MPIManager
 Encapsulates MPI Rank/Communicator information. More...
 

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::mpi
 

Macros

#define WALBERLA_ROOT_SECTION()   if( ::walberla::MPIManager::instance()->worldRank() == 0 )
 
#define WALBERLA_NON_ROOT_SECTION()   if( ::walberla::MPIManager::instance()->worldRank() != 0 )
 
#define WALBERLA_EXCLUSIVE_SECTION(exclusive_rank)   if( ::walberla::MPIManager::instance()->rank() == (exclusive_rank) )
 Exclusive section is only executed on the process with the given rank. More...
 
#define WALBERLA_EXCLUSIVE_WORLD_SECTION(exclusive_rank)   if( ::walberla::MPIManager::instance()->worldRank() == (exclusive_rank) )
 Exclusive section using ranks w.r.t. More...
 
#define WALBERLA_MPI_WORLD_BARRIER()   {}
 
#define WALBERLA_MPI_BARRIER()   {}
 
#define WALBERLA_CRITICAL_SECTION_START
 
#define WALBERLA_CRITICAL_SECTION_END
 

Macro Definition Documentation

◆ WALBERLA_CRITICAL_SECTION_END

#define WALBERLA_CRITICAL_SECTION_END

◆ WALBERLA_CRITICAL_SECTION_START

#define WALBERLA_CRITICAL_SECTION_START

◆ WALBERLA_EXCLUSIVE_SECTION

#define WALBERLA_EXCLUSIVE_SECTION (   exclusive_rank)    if( ::walberla::MPIManager::instance()->rank() == (exclusive_rank) )

Exclusive section is only executed on the process with the given rank.

Warning
The rank here is with respect to MPIManager::comm() (not w.r.t. MPI_COMM_WORLD) These ranks are not valid until the block setup has been done. This means that WALBERLA_ROOT_SECTION() may be different than WALBERLA_EXCLUSIVE_SECTION(0) !! If an exclusive section is needed before the block setup has been done, the WALBERLA_EXCLUSIVE_WORLD_SECTION can be used.

◆ WALBERLA_EXCLUSIVE_WORLD_SECTION

#define WALBERLA_EXCLUSIVE_WORLD_SECTION (   exclusive_rank)    if( ::walberla::MPIManager::instance()->worldRank() == (exclusive_rank) )

Exclusive section using ranks w.r.t.

MPI_COMM_WORLD.

◆ WALBERLA_MPI_BARRIER

#define WALBERLA_MPI_BARRIER ( )    {}

◆ WALBERLA_MPI_WORLD_BARRIER

#define WALBERLA_MPI_WORLD_BARRIER ( )    {}

◆ WALBERLA_NON_ROOT_SECTION

#define WALBERLA_NON_ROOT_SECTION ( )    if( ::walberla::MPIManager::instance()->worldRank() != 0 )

◆ WALBERLA_ROOT_SECTION

#define WALBERLA_ROOT_SECTION ( )    if( ::walberla::MPIManager::instance()->worldRank() == 0 )