fdds_initmpi - initialize the DDS system for MPI parallelization


SYNOPSIS

#include <mpif.h>

integer fdds_initmpi(node, nodes)

integer node
integer nodes

DESCRIPTION

fdds_initmpi is used to initialize the DDS system for MPI parallelization. It determines 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 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_initmpi" 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_initmpix  Initialize DDS for MPIX
      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_initmpi

      ier = fdds_initmpi(rank, np)
    

Initializes MPI in a DDS application using modules:

      use mpi
      use dds

      integer :: rank, np, ier
      
      ier = fdds_initmpi(rank, np)
    

AUTHOR

Jerry Ehlers, BP America (Feb 2006)