Block-Structured AMR Software Framework
AMReX_ParallelDescriptor.cpp File Reference
#include <AMReX.H>
#include <AMReX_Utility.H>
#include <AMReX_BLProfiler.H>
#include <AMReX_BLFort.H>
#include <AMReX_ParallelDescriptor.H>
#include <AMReX_Print.H>
#include <AMReX_TypeTraits.H>
#include <AMReX_Arena.H>
#include <AMReX_ParmParse.H>
#include <cstdio>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fstream>
#include <sstream>
#include <stack>
#include <list>
#include <chrono>

Namespaces

 amrex
 
 amrex::ParallelDescriptor
 Parallel frontend that abstracts functionalities needed to spawn processes and handle communication.
 

Functions

void amrex::ParallelDescriptor::StartParallel (int *argc=nullptr, char ***argv=nullptr, MPI_Comm mpi_comm=MPI_COMM_WORLD)
 Perform any needed parallel initialization. This MUST be the first routine in this class called from within a program. More...
 
void amrex::ParallelDescriptor::Gather (Real const *sendbuf, int nsend, Real *recvbuf, int root)
 Parallel gather. More...
 
void amrex::ParallelDescriptor::EndParallel ()
 Perform any needed parallel finalization. This MUST be the last routine in this class called from within a program. More...
 
void amrex::ParallelDescriptor::Abort (int errorcode=SIGABRT, bool backtrace=true)
 Abort with specified error code. More...
 
const char * amrex::ParallelDescriptor::ErrorString (int errorcode)
 ErrorString return string associated with error internal error condition. More...
 
void amrex::ParallelDescriptor::Barrier (const std::string &)
 
void amrex::ParallelDescriptor::Barrier (const MPI_Comm &, const std::string &)
 
Message amrex::ParallelDescriptor::Abarrier ()
 
Message amrex::ParallelDescriptor::Abarrier (const MPI_Comm &)
 
void amrex::ParallelDescriptor::Test (MPI_Request &, int &, MPI_Status &)
 
void amrex::ParallelDescriptor::Test (Vector< MPI_Request > &, int &, Vector< MPI_Status > &)
 
void amrex::ParallelDescriptor::IProbe (int, int, int &, MPI_Status &)
 
void amrex::ParallelDescriptor::IProbe (int, int, MPI_Comm, int &, MPI_Status &)
 
void amrex::ParallelDescriptor::Comm_dup (MPI_Comm, MPI_Comm &)
 
void amrex::ParallelDescriptor::ReduceRealSum (Vector< std::reference_wrapper< Real > > const &)
 
void amrex::ParallelDescriptor::ReduceRealMax (Vector< std::reference_wrapper< Real > > const &)
 
void amrex::ParallelDescriptor::ReduceRealMin (Vector< std::reference_wrapper< Real > > const &)
 
void amrex::ParallelDescriptor::ReduceRealSum (Vector< std::reference_wrapper< Real > > const &, int)
 
void amrex::ParallelDescriptor::ReduceRealMax (Vector< std::reference_wrapper< Real > > const &, int)
 
void amrex::ParallelDescriptor::ReduceRealMin (Vector< std::reference_wrapper< Real > > const &, int)
 
void amrex::ParallelDescriptor::ReduceLongAnd (Long &rvar)
 Long and-wise reduction. More...
 
void amrex::ParallelDescriptor::ReduceLongSum (Long &rvar)
 Long sum reduction. More...
 
void amrex::ParallelDescriptor::ReduceLongMax (Long &rvar)
 Long max reduction. More...
 
void amrex::ParallelDescriptor::ReduceLongMin (Long &rvar)
 Long min reduction. More...
 
void amrex::ParallelDescriptor::ReduceLongAnd (Long &rvar, int cpu)
 Long and-wise reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceLongSum (Long &rvar, int cpu)
 Long sum reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceLongMax (Long &rvar, int cpu)
 Long max reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceLongMin (Long &rvar, int cpu)
 Long min reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceLongAnd (Long *, int)
 
void amrex::ParallelDescriptor::ReduceLongSum (Long *, int)
 
void amrex::ParallelDescriptor::ReduceLongMax (Long *, int)
 
void amrex::ParallelDescriptor::ReduceLongMin (Long *, int)
 
void amrex::ParallelDescriptor::ReduceLongAnd (Long *, int, int)
 
void amrex::ParallelDescriptor::ReduceLongSum (Long *, int, int)
 
void amrex::ParallelDescriptor::ReduceLongMax (Long *, int, int)
 
void amrex::ParallelDescriptor::ReduceLongMin (Long *, int, int)
 
void amrex::ParallelDescriptor::ReduceLongAnd (Vector< std::reference_wrapper< Long > > const &)
 
void amrex::ParallelDescriptor::ReduceLongSum (Vector< std::reference_wrapper< Long > > const &)
 
void amrex::ParallelDescriptor::ReduceLongMax (Vector< std::reference_wrapper< Long > > const &)
 
void amrex::ParallelDescriptor::ReduceLongMin (Vector< std::reference_wrapper< Long > > const &)
 
void amrex::ParallelDescriptor::ReduceLongAnd (Vector< std::reference_wrapper< Long > > const &, int)
 
void amrex::ParallelDescriptor::ReduceLongSum (Vector< std::reference_wrapper< Long > > const &, int)
 
void amrex::ParallelDescriptor::ReduceLongMax (Vector< std::reference_wrapper< Long > > const &, int)
 
void amrex::ParallelDescriptor::ReduceLongMin (Vector< std::reference_wrapper< Long > > const &, int)
 
void amrex::ParallelDescriptor::ReduceIntSum (int &rvar)
 Integer sum reduction. More...
 
void amrex::ParallelDescriptor::ReduceIntMax (int &rvar)
 Integer max reduction. More...
 
void amrex::ParallelDescriptor::ReduceIntMin (int &rvar)
 Integer min reduction. More...
 
void amrex::ParallelDescriptor::ReduceIntSum (int &rvar, int cpu)
 Integer sum reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceIntMax (int &rvar, int cpu)
 Integer max reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceIntMin (int &rvar, int cpu)
 Integer min reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceIntSum (int *, int)
 
void amrex::ParallelDescriptor::ReduceIntMax (int *, int)
 
void amrex::ParallelDescriptor::ReduceIntMin (int *, int)
 
void amrex::ParallelDescriptor::ReduceIntSum (int *, int, int)
 
void amrex::ParallelDescriptor::ReduceIntMax (int *, int, int)
 
void amrex::ParallelDescriptor::ReduceIntMin (int *, int, int)
 
void amrex::ParallelDescriptor::ReduceIntSum (Vector< std::reference_wrapper< int > > const &)
 
void amrex::ParallelDescriptor::ReduceIntMax (Vector< std::reference_wrapper< int > > const &)
 
void amrex::ParallelDescriptor::ReduceIntMin (Vector< std::reference_wrapper< int > > const &)
 
void amrex::ParallelDescriptor::ReduceIntSum (Vector< std::reference_wrapper< int > > const &, int)
 
void amrex::ParallelDescriptor::ReduceIntMax (Vector< std::reference_wrapper< int > > const &, int)
 
void amrex::ParallelDescriptor::ReduceIntMin (Vector< std::reference_wrapper< int > > const &, int)
 
void amrex::ParallelDescriptor::ReduceBoolAnd (bool &rvar)
 And-wise boolean reduction. More...
 
void amrex::ParallelDescriptor::ReduceBoolOr (bool &rvar)
 Or-wise boolean reduction. More...
 
void amrex::ParallelDescriptor::ReduceBoolAnd (bool &rvar, int cpu)
 And-wise boolean reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::ReduceBoolOr (bool &rvar, int cpu)
 Or-wise boolean reduction to specified cpu. More...
 
void amrex::ParallelDescriptor::Bcast (void *, int, MPI_Datatype, int, MPI_Comm)
 
double amrex::ParallelDescriptor::second () noexcept
 Returns wall-clock seconds since start of execution. More...
 
void amrex::ParallelDescriptor::Wait (MPI_Request &, MPI_Status &)
 
void amrex::ParallelDescriptor::Waitall (Vector< MPI_Request > &, Vector< MPI_Status > &)
 
void amrex::ParallelDescriptor::Waitany (Vector< MPI_Request > &, int &, MPI_Status &)
 
void amrex::ParallelDescriptor::Waitsome (Vector< MPI_Request > &, int &, Vector< int > &, Vector< MPI_Status > &)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_BARRIER, bl_pd_barrier)()
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_COMMUNICATOR, bl_pd_communicator)(void *vcomm)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_MYPROC, bl_pd_myproc)(int *myproc)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_NPROCS, bl_pd_nprocs)(int *nprocs)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_IOPROC, bl_pd_ioproc)(int *ioproc)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_IS_IOPROC, bl_pd_is_ioproc)(int *ioproc)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_SECOND, bl_pd_second)(double *r)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_REDUCE_REAL_MAX_TO_IOPROC, bl_pd_reduce_real_max_to_ioproc)(double *r)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_REDUCE_REAL_SUM_TO_IOPROC, bl_pd_reduce_real_sum_to_ioproc)(double *r)
 
 amrex::ParallelDescriptor::BL_FORT_PROC_DECL (BL_PD_ABORT, bl_pd_abort)()
 
void amrex::ParallelDescriptor::ReadAndBcastFile (const std::string &filename, Vector< char > &charBuf, bool bExitOnError, const MPI_Comm &comm)
 
void amrex::ParallelDescriptor::Initialize ()
 
void amrex::ParallelDescriptor::Finalize ()
 
void amrex::ParallelDescriptor::StartTeams ()
 Split the process pool into teams. More...
 
void amrex::ParallelDescriptor::EndTeams ()
 
std::string amrex::ParallelDescriptor::mpi_level_to_string (int mtlev)
 
int amrex_fi_pd_myproc ()
 
int amrex_fi_pd_nprocs ()
 
int amrex_fi_pd_ioprocessor ()
 
int amrex_fi_pd_ioprocessor_number ()
 
void amrex_fi_pd_bcast_r (Real *x, int n, int root)
 
Real amrex_fi_pd_wtime ()
 

Variables

bool amrex::ParallelDescriptor::use_gpu_aware_mpi = false
 
ProcessTeam amrex::ParallelDescriptor::m_Team
 
MPI_Comm amrex::ParallelDescriptor::m_comm = MPI_COMM_NULL
 
int amrex::ParallelDescriptor::m_nprocs_per_node = 1
 
int amrex::ParallelDescriptor::m_rank_in_node = 0
 
int amrex::ParallelDescriptor::m_nprocs_per_processor = 1
 
int amrex::ParallelDescriptor::m_rank_in_processor = 0
 
Vector< MPI_Datatype * > amrex::ParallelDescriptor::m_mpi_types
 
Vector< MPI_Op * > amrex::ParallelDescriptor::m_mpi_ops
 
int amrex::ParallelDescriptor::m_MinTag = 1000
 
int amrex::ParallelDescriptor::m_MaxTag = -1
 
const int amrex::ParallelDescriptor::ioProcessor = 0
 The MPI rank number of the I/O Processor (probably rank 0). This rank is usually used to write to stdout. More...
 

Function Documentation

◆ amrex_fi_pd_bcast_r()

void amrex_fi_pd_bcast_r ( Real *  x,
int  n,
int  root 
)

◆ amrex_fi_pd_ioprocessor()

int amrex_fi_pd_ioprocessor ( )

◆ amrex_fi_pd_ioprocessor_number()

int amrex_fi_pd_ioprocessor_number ( )

◆ amrex_fi_pd_myproc()

int amrex_fi_pd_myproc ( )

◆ amrex_fi_pd_nprocs()

int amrex_fi_pd_nprocs ( )

◆ amrex_fi_pd_wtime()

Real amrex_fi_pd_wtime ( )