cdds_initmpix - initialize the DDS system for MPIX parallelization
SYNOPSIS
#include "cdds.h"
int cdds_initmpix(node, nodes);
-
int *node
int *nodes
DESCRIPTION
This function is used to initialize the DDS system for MPIX parallelization
(where MPI is not used if np=1 so programs can be piped
when using a single node). Makefiles should define "MPIX" instead
of "MPI". It determines the number of MPI nodes used and the node
number (0 through nodes-1) for the current process. It checks the value of
"np=" from the command line to determine if MPI is needed. If so and if
np > 1, it checks if MPI is available on the current system and
initializes MPI 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 cdds.h (because it would try to use the
parallel routines for all codes). So add "int cdds_initmpix" to any
routine that uses it.
SEE ALSO
cdds_initmpi Initialize DDS for MPI
cdds_initopenmp Initialize DDS for OpenMP
AUTHOR
Jerry Ehlers, BP America (Aug 2007)