cdds_initmpi - initialize the DDS system for MPI parallelization
SYNOPSIS
#include "cdds.h"
int cdds_initmpi(node, nodes);
-
int *node
int *nodes
DESCRIPTION
This function is used to initialize the DDS system for MPI parallelization.
It deftermines the number of MPI nodes used and the node number (0 through
nodes-1) for the current process. If MPI is available on the current
system MPI is initialized with the MPI_Init call.
The master node then passes all the command line parameters to the slave
nodes to ensure all nodes "see" the exact same parameters (since MPI does
not guarantee that). If MPI is not available, it simply checks that "np=1".
The "par:" dictionary is set for scanning upon exiting this routine.
Any slave nodes will close any dictionaries opened for printing.
The return value is alway 0.
NOTE:
you will have to define this function for yourself
because it cannot be defined in fdds.h (because it would try to use the
parallel routines for all codes). So add "int cdds_initmpi" to any
routine that uses it.
SEE ALSO
cdds_initmpix Initialize DDS for MPIX
cdds_initopenmp Initialize DDS for OpenMP
AUTHOR
Jerry Ehlers, BP America (Feb 2006)