root/ompi/mpi/fortran/mpif-h/init_f.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ompi_init_f

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2007-2012 Cisco Systems, Inc.  All rights reserved.
  13  * Copyright (c) 2007      Sun Microsystems, Inc.  All rights reserved.
  14  * Copyright (c) 2015      Research Organization for Information Science
  15  *                         and Technology (RIST). All rights reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #include "ompi_config.h"
  24 
  25 #if (OPAL_HAVE_WEAK_SYMBOLS || ! OMPI_BUILD_MPI_PROFILING)
  26 #if OPAL_CC_USE_PRAGMA_IDENT
  27 #pragma ident OMPI_IDENT_STRING
  28 #elif OPAL_CC_USE_IDENT
  29 #ident OMPI_IDENT_STRING
  30 #else
  31 const char ident[] = OMPI_IDENT_STRING;
  32 #endif
  33 #endif
  34 
  35 
  36 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  37 
  38 #if OMPI_BUILD_MPI_PROFILING
  39 #if OPAL_HAVE_WEAK_SYMBOLS
  40 #pragma weak PMPI_INIT = ompi_init_f
  41 #pragma weak pmpi_init = ompi_init_f
  42 #pragma weak pmpi_init_ = ompi_init_f
  43 #pragma weak pmpi_init__ = ompi_init_f
  44 
  45 #pragma weak PMPI_Init_f = ompi_init_f
  46 #pragma weak PMPI_Init_f08 = ompi_init_f
  47 #else
  48 OMPI_GENERATE_F77_BINDINGS (PMPI_INIT,
  49                            pmpi_init,
  50                            pmpi_init_,
  51                            pmpi_init__,
  52                            pompi_init_f,
  53                            (MPI_Fint *ierr),
  54                            (ierr) )
  55 #endif
  56 #endif
  57 
  58 #if OPAL_HAVE_WEAK_SYMBOLS
  59 #pragma weak MPI_INIT = ompi_init_f
  60 #pragma weak mpi_init = ompi_init_f
  61 #pragma weak mpi_init_ = ompi_init_f
  62 #pragma weak mpi_init__ = ompi_init_f
  63 
  64 #pragma weak MPI_Init_f = ompi_init_f
  65 #pragma weak MPI_Init_f08 = ompi_init_f
  66 #else
  67 #if ! OMPI_BUILD_MPI_PROFILING
  68 OMPI_GENERATE_F77_BINDINGS (MPI_INIT,
  69                            mpi_init,
  70                            mpi_init_,
  71                            mpi_init__,
  72                            ompi_init_f,
  73                            (MPI_Fint *ierr),
  74                            (ierr) )
  75 #else
  76 #define ompi_init_f pompi_init_f
  77 #endif
  78 #endif
  79 
  80 
  81 void ompi_init_f( MPI_Fint *ierr )
  82 {
  83     int c_ierr;
  84     int argc = 0;
  85     char **argv = NULL;
  86 
  87     c_ierr = PMPI_Init( &argc, &argv );
  88     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  89 }

/* [<][>][^][v][top][bottom][index][help] */