"Fossies" - the Fresh Open Source Software Archive

Member "openmpi-4.1.2/ompi/mpi/c/address.c" (24 Nov 2021, 2082 Bytes) of package /linux/misc/openmpi-4.1.2.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "address.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 4.1.1_vs_5.0.0rc2.

    1 /*
    2  * Copyright (c) 2004-2007 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) 2015      Research Organization for Information Science
   13  *                         and Technology (RIST). All rights reserved.
   14  * Copyright (c) 2019      IBM Corporation.  All rights reserved.
   15  * $COPYRIGHT$
   16  *
   17  * Additional copyrights may follow
   18  *
   19  * $HEADER$
   20  */
   21 
   22 #include "ompi_config.h"
   23 #include <stdio.h>
   24 
   25 /* This implementation has been removed from the MPI 3.0 standard.
   26  * Open MPI v4.0.x is keeping the implementation in the library, but
   27  * removing the prototypes from the headers, unless the user configures
   28  * with --enable-mpi1-compatibility.
   29  */
   30 
   31 #include "ompi/mpi/c/bindings.h"
   32 #include "ompi/runtime/params.h"
   33 #include "ompi/communicator/communicator.h"
   34 #include "ompi/errhandler/errhandler.h"
   35 
   36 #if OMPI_BUILD_MPI_PROFILING
   37 #if OPAL_HAVE_WEAK_SYMBOLS
   38 #pragma weak MPI_Address = PMPI_Address
   39 #endif
   40 /* undef before defining, to prevent possible redefinition when
   41  * using _Static_assert to error on usage of removed functions.
   42  */
   43 #undef MPI_Address
   44 #define MPI_Address PMPI_Address
   45 #endif
   46 
   47 static const char FUNC_NAME[] = "MPI_Address";
   48 
   49 
   50 int MPI_Address(void *location, MPI_Aint *address)
   51 {
   52 
   53     OPAL_CR_NOOP_PROGRESS();
   54 
   55     if( MPI_PARAM_CHECK ) {
   56       OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
   57       if (NULL == location || NULL == address) {
   58         return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
   59       }
   60     }
   61 
   62     *address = (MPI_Aint)location;
   63     return MPI_SUCCESS;
   64 }