fdds_initmpix - initialize the DDS system for MPIX parallelization


SYNOPSIS

#include <mpif.h>

integer fdds_initmpix(node, nodes)

integer node
integer nodes

DESCRIPTION

fdds_initmpix 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 .gt. 1, it checks if MPI is available on the current system and initializes MPI with the MPI_Init call. The node with rank=0 then passes all the command line parameters to all other 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 node with rank.gt.0 will close dictionaries that have been 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 "integer fdds_initmpix" to any routine that uses it. Also note that you need the extra, #include <mpif.h>, include file for any of the mpi routines.

SEE ALSO

      fdds_initmpi  Initialize DDS for MPI
      fdds_initopenmp  Initialize DDS for OpenMP
    

EXAMPLES

Initializes MPI in a DDS application - F77:
      #include <mpif.h>
      #include <fdds.h>

      integer rank, np, ier
      integer fdds_initmpix

      ier = fdds_initmpix(rank, np)
    

Initializes MPI in a DDS application using modules:

      use mpi
      use dds

      integer :: rank, np, ier

      ier = fdds_initmpix(rank, np)
    

AUTHOR

Jerry Ehlers, BP America (Aug 2007)