utilities  0.0
Functions
molpro::mpi Namespace Reference

Functions

MPI_Comm comm_self ()
 Return MPI_COMM_SELF in an MPI program, or an appropriate dummy if not. More...
 
MPI_Comm comm_global ()
 Return the MPI communicator containing all processes available for participation in computation. If MPI support has been compiled (either mpi.h has already been included, or HAVE_MPI_H has been defined) but not yet initialised, MPI will be initialised, and then MPI_COMM_WORLD is selected. Otherwise, in the case of a program compiled with PPIDD, and for which PPIDD has already been initialised, this will be the PPIDD worker communicator. Otherwise, in the case of a program compiled with GA, and for which GA has already been initialised, this will be the GA worker communicator. Otherwise, if MPI support has is active, MPI_COMM_WORLD is selected. Otherwise (completely serial code), a place-holder is chosen. In the Molpro context, if running in mppx mode, MPI_COMM_SELF is always returned. More...
 
int size_global ()
 Query the size of the global MPI communicator. More...
 
int rank_global ()
 Query the rank in the global MPI communicator. More...
 
int init ()
 In MPI environment initialize; otherwise do nothing. Intended to support MPI-agnostic programs. More...
 
int finalize ()
 In MPI environment finalize; otherwise do nothing. More...
 

Function Documentation

◆ comm_global()

MPI_Comm molpro::mpi::comm_global ( )
inline

Return the MPI communicator containing all processes available for participation in computation. If MPI support has been compiled (either mpi.h has already been included, or HAVE_MPI_H has been defined) but not yet initialised, MPI will be initialised, and then MPI_COMM_WORLD is selected. Otherwise, in the case of a program compiled with PPIDD, and for which PPIDD has already been initialised, this will be the PPIDD worker communicator. Otherwise, in the case of a program compiled with GA, and for which GA has already been initialised, this will be the GA worker communicator. Otherwise, if MPI support has is active, MPI_COMM_WORLD is selected. Otherwise (completely serial code), a place-holder is chosen. In the Molpro context, if running in mppx mode, MPI_COMM_SELF is always returned.

Returns
The global communicator

◆ comm_self()

MPI_Comm molpro::mpi::comm_self ( )
inline

Return MPI_COMM_SELF in an MPI program, or an appropriate dummy if not.

Returns
MPI_COMM_SELF if MPI initialised, MPI_COMM_NULL otherwise, or 0 if MPI support not compiled

◆ finalize()

int molpro::mpi::finalize ( )
inline

In MPI environment finalize; otherwise do nothing.

◆ init()

int molpro::mpi::init ( )
inline

In MPI environment initialize; otherwise do nothing. Intended to support MPI-agnostic programs.

◆ rank_global()

int molpro::mpi::rank_global ( )
inline

Query the rank in the global MPI communicator.

Returns
The rank in the global communicator, or 0 if not using MPI

◆ size_global()

int molpro::mpi::size_global ( )
inline

Query the size of the global MPI communicator.

Returns
The size of the global communicator, or 1 if not using MPI