Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
commpi.h File Reference

Contains declarations of MPI subroutines used in Roccom. More...

#include <mpi.h>
Include dependency graph for commpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int COMMPI_Comm_rank (MPI_Comm c)
 
int COMMPI_Comm_size (MPI_Comm c)
 
int COMMPI_Initialized ()
 
int COMMPI_Irecv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request)
 Begins a nonblocking receive. More...
 
template<class T >
int COMMPI_Comm_c2f (T t)
 
template<>
int COMMPI_Comm_c2f (int t)
 
template<>
int COMMPI_Comm_c2f (unsigned int t)
 
template<class T >
COMMPI_Comm_f2c (int c, T)
 
template<>
int COMMPI_Comm_f2c (int t, int)
 
template<>
unsigned int COMMPI_Comm_f2c (int t, unsigned int)
 
Nonblocking communicaiton
int COMMPI_Isend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
 Begins a nonblocking send. More...
 

Detailed Description

Contains declarations of MPI subroutines used in Roccom.

If DUMMY_MPI is not define, it includes the true mpi.h. Otherwise, it provides a dummy MPI interface for serial codes.

See Also
commpi.C

Definition in file commpi.h.

Function Documentation

int COMMPI_Comm_c2f ( t)
inline

Definition at line 190 of file commpi.h.

Referenced by Roccom_base::call_function(), and COM_F_FUNC2().

191 { return MPI_Comm_c2f( t); }

Here is the caller graph for this function:

int COMMPI_Comm_c2f ( int  t)
inline

Definition at line 194 of file commpi.h.

195 { return t; }
int COMMPI_Comm_c2f ( unsigned int  t)
inline

Definition at line 198 of file commpi.h.

199 { return t; }
T COMMPI_Comm_f2c ( int  c,
 
)
inline

Definition at line 202 of file commpi.h.

Referenced by Roccom_base::call_function(), and COM_F_FUNC2().

203 { return MPI_Comm_f2c( c); }

Here is the caller graph for this function:

int COMMPI_Comm_f2c ( int  t,
int   
)
inline

Definition at line 206 of file commpi.h.

207 { return t; }
unsigned int COMMPI_Comm_f2c ( int  t,
unsigned  int 
)
inline

Definition at line 210 of file commpi.h.

211 { return t; }
int COMMPI_Comm_size ( MPI_Comm  c)
inline

Definition at line 165 of file commpi.h.

Referenced by RFC_Window_transfer::comm_size(), init_profiling(), and FaceOffset_3::rescale_displacements().

166 { int size; MPI_Comm_size( c, &size); return size; }

Here is the caller graph for this function:

int COMMPI_Initialized ( )
inline

Definition at line 168 of file commpi.h.

Referenced by Roccom_base::abort(), Rocmop::agree_double(), Rocmop::agree_int(), assertion_fail(), Pane_communicator::begin_update(), Rocblas::calcDot(), Rocmop::check_input_pconn(), RFC_Window_transfer::comm_rank(), RFC_Window_transfer::comm_size(), COMMPI_Irecv(), COMMPI_Isend(), Rocsurf::compute_center(), Rocsurf::compute_edge_lengths(), Rocon::constrain_displacements(), FaceOffset_3::FaceOffset_3(), FaceOffset_3::filter_and_identify_ridge_edges(), Rocon::find_intersections(), Roccom_base::get_communicator(), glob_error(), Rocprop::initialize(), Rocon::initialize(), FaceOffset_3::insert_boundary_edges(), Rocsurf::integrate(), main(), Rocmop::obtain_extremal_dihedrals(), output_solution(), Pane_connectivity::pconn_nblocks(), Rocmop::perturb_stationary(), postcondition_fail(), precondition_fail(), Rocmop::print_extremal_dihedrals(), Rocmop::print_legible(), Rocmop::print_mquality(), Rocmop::print_quality(), Propagation_3::Propagation_3(), Rocin::read_by_control_file(), Rocmop::read_config_file(), Rocin::read_windows(), Rocblas::reduce_MPI(), Rocblas::reduce_scalar_MPI(), Rocprop::remesh_serial(), FaceOffset_3::rescale_displacements(), Roccom_base::Roccom_base(), Pane_ghost_connectivity::send_pane_info(), Roccom_base::set_profiling_barrier(), Rocmop::smooth_vol_mesq_ng(), Rocout::write_rocin_control_file(), Condition::~Condition(), and Mutex::~Mutex().

169 { int flag; MPI_Initialized( &flag); return flag; }

Here is the caller graph for this function:

int COMMPI_Irecv ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
MPI_Comm  comm,
MPI_Request *  request 
)

Begins a nonblocking receive.

Definition at line 131 of file commpi.C.

References COM_recv(), and COMMPI_Initialized().

Referenced by Pane_communicator::begin_update(), and Pane_ghost_connectivity::send_pane_info().

133  {
134 #ifndef DUMMY_MPI
135  if ( COMMPI_Initialized())
136  return MPI_Irecv( buf, count, datatype, src, tag, comm, request);
137 #endif
138  try {
139  if ( sendQ == NULL) sendQ = new Msg_Queue();
140  if ( recvQ == NULL) recvQ = new Msg_Queue();
141  }
142  catch (...) {
143  std::cerr << "Out of memory" << std::endl;
144  std::abort();
145  }
146  return COM_recv( *sendQ, *recvQ, buf, count, datatype, tag);
147 }
std::map< int, void * > Msg_Queue
A map from message tags to data addresses.
Definition: commpi.C:41
static Msg_Queue * sendQ
Definition: commpi.C:108
int COM_recv(Msg_Queue &sendQ, Msg_Queue &recvQ, void *buf, int count, MPI_Datatype datatype, int tag)
Definition: commpi.C:88
static Msg_Queue * recvQ
Definition: commpi.C:109
int COMMPI_Initialized()
Definition: commpi.h:168

Here is the call graph for this function:

Here is the caller graph for this function:

int COMMPI_Isend ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
MPI_Comm  comm,
MPI_Request *  request 
)

Begins a nonblocking send.

Definition at line 112 of file commpi.C.

References COM_send(), and COMMPI_Initialized().

Referenced by Pane_communicator::begin_update(), and Pane_ghost_connectivity::send_pane_info().

114  {
115 #ifndef DUMMY_MPI
116  if ( COMMPI_Initialized())
117  return MPI_Isend( buf, count, datatype, dest, tag, comm, request);
118 #endif
119  try {
120  if ( sendQ == NULL) sendQ = new Msg_Queue();
121  if ( recvQ == NULL) recvQ = new Msg_Queue();
122  }
123  catch (...) {
124  std::cerr << "Out of memory" << std::endl;
125  std::abort();
126  }
127  return COM_send( *sendQ, *recvQ, buf, count, datatype, tag);
128 }
int COM_send(Msg_Queue &sendQ, Msg_Queue &recvQ, void *buf, int count, MPI_Datatype datatype, int tag)
Definition: commpi.C:68
std::map< int, void * > Msg_Queue
A map from message tags to data addresses.
Definition: commpi.C:41
static Msg_Queue * sendQ
Definition: commpi.C:108
static Msg_Queue * recvQ
Definition: commpi.C:109
int COMMPI_Initialized()
Definition: commpi.h:168

Here is the call graph for this function:

Here is the caller graph for this function: