-: 0:Source:/home/MPI/testing/mpich2/mpich2/src/binding/f77/keyval_createf.c
-: 0:Graph:keyval_createf.gcno
-: 0:Data:-
-: 0:Runs:0
-: 0:Programs:0
-: 1:/* -*- Mode: C; c-basic-offset:4 ; -*- */
-: 2:/*
-: 3: * (C) 2001 by Argonne National Laboratory.
-: 4: * See COPYRIGHT in top-level directory.
-: 5: *
-: 6: * This file is automatically generated by buildiface
-: 7: * DO NOT EDIT
-: 8: */
-: 9:#include "mpi_fortimpl.h"
-: 10:
-: 11:
-: 12:/* Begin MPI profiling block */
-: 13:#if defined(USE_WEAK_SYMBOLS) && !defined(USE_ONLY_MPI_NAMES)
-: 14:#if defined(HAVE_MULTIPLE_PRAGMA_WEAK)
-: 15:extern FORT_DLL_SPEC void FORT_CALL MPI_KEYVAL_CREATE( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 16:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create__( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 17:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 18:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create_( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 19:
-: 20:#if defined(F77_NAME_UPPER)
-: 21:#pragma weak MPI_KEYVAL_CREATE = PMPI_KEYVAL_CREATE
-: 22:#pragma weak mpi_keyval_create__ = PMPI_KEYVAL_CREATE
-: 23:#pragma weak mpi_keyval_create_ = PMPI_KEYVAL_CREATE
-: 24:#pragma weak mpi_keyval_create = PMPI_KEYVAL_CREATE
-: 25:#elif defined(F77_NAME_LOWER_2USCORE)
-: 26:#pragma weak MPI_KEYVAL_CREATE = pmpi_keyval_create__
-: 27:#pragma weak mpi_keyval_create__ = pmpi_keyval_create__
-: 28:#pragma weak mpi_keyval_create_ = pmpi_keyval_create__
-: 29:#pragma weak mpi_keyval_create = pmpi_keyval_create__
-: 30:#elif defined(F77_NAME_LOWER_USCORE)
-: 31:#pragma weak MPI_KEYVAL_CREATE = pmpi_keyval_create_
-: 32:#pragma weak mpi_keyval_create__ = pmpi_keyval_create_
-: 33:#pragma weak mpi_keyval_create_ = pmpi_keyval_create_
-: 34:#pragma weak mpi_keyval_create = pmpi_keyval_create_
-: 35:#else
-: 36:#pragma weak MPI_KEYVAL_CREATE = pmpi_keyval_create
-: 37:#pragma weak mpi_keyval_create__ = pmpi_keyval_create
-: 38:#pragma weak mpi_keyval_create_ = pmpi_keyval_create
-: 39:#pragma weak mpi_keyval_create = pmpi_keyval_create
-: 40:#endif
-: 41:
-: 42:
-: 43:
-: 44:#elif defined(HAVE_PRAGMA_WEAK)
-: 45:
-: 46:#if defined(F77_NAME_UPPER)
-: 47:extern FORT_DLL_SPEC void FORT_CALL MPI_KEYVAL_CREATE( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 48:
-: 49:#pragma weak MPI_KEYVAL_CREATE = PMPI_KEYVAL_CREATE
-: 50:#elif defined(F77_NAME_LOWER_2USCORE)
-: 51:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create__( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 52:
-: 53:#pragma weak mpi_keyval_create__ = pmpi_keyval_create__
-: 54:#elif !defined(F77_NAME_LOWER_USCORE)
-: 55:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 56:
-: 57:#pragma weak mpi_keyval_create = pmpi_keyval_create
-: 58:#else
-: 59:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create_( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 60:
-: 61:#pragma weak mpi_keyval_create_ = pmpi_keyval_create_
-: 62:#endif
-: 63:
-: 64:#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
-: 65:#if defined(F77_NAME_UPPER)
-: 66:#pragma _HP_SECONDARY_DEF PMPI_KEYVAL_CREATE MPI_KEYVAL_CREATE
-: 67:#elif defined(F77_NAME_LOWER_2USCORE)
-: 68:#pragma _HP_SECONDARY_DEF pmpi_keyval_create__ mpi_keyval_create__
-: 69:#elif !defined(F77_NAME_LOWER_USCORE)
-: 70:#pragma _HP_SECONDARY_DEF pmpi_keyval_create mpi_keyval_create
-: 71:#else
-: 72:#pragma _HP_SECONDARY_DEF pmpi_keyval_create_ mpi_keyval_create_
-: 73:#endif
-: 74:
-: 75:#elif defined(HAVE_PRAGMA_CRI_DUP)
-: 76:#if defined(F77_NAME_UPPER)
-: 77:#pragma _CRI duplicate MPI_KEYVAL_CREATE as PMPI_KEYVAL_CREATE
-: 78:#elif defined(F77_NAME_LOWER_2USCORE)
-: 79:#pragma _CRI duplicate mpi_keyval_create__ as pmpi_keyval_create__
-: 80:#elif !defined(F77_NAME_LOWER_USCORE)
-: 81:#pragma _CRI duplicate mpi_keyval_create as pmpi_keyval_create
-: 82:#else
-: 83:#pragma _CRI duplicate mpi_keyval_create_ as pmpi_keyval_create_
-: 84:#endif
-: 85:#endif /* HAVE_PRAGMA_WEAK */
-: 86:#endif /* USE_WEAK_SYMBOLS */
-: 87:/* End MPI profiling block */
-: 88:
-: 89:
-: 90:/* These definitions are used only for generating the Fortran wrappers */
-: 91:#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK) && \
-: 92: defined(USE_ONLY_MPI_NAMES)
-: 93:extern FORT_DLL_SPEC void FORT_CALL MPI_KEYVAL_CREATE( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 94:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create__( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 95:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 96:extern FORT_DLL_SPEC void FORT_CALL mpi_keyval_create_( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 97:
-: 98:#if defined(F77_NAME_UPPER)
-: 99:#pragma weak mpi_keyval_create__ = MPI_KEYVAL_CREATE
-: 100:#pragma weak mpi_keyval_create_ = MPI_KEYVAL_CREATE
-: 101:#pragma weak mpi_keyval_create = MPI_KEYVAL_CREATE
-: 102:#elif defined(F77_NAME_LOWER_2USCORE)
-: 103:#pragma weak MPI_KEYVAL_CREATE = mpi_keyval_create__
-: 104:#pragma weak mpi_keyval_create_ = mpi_keyval_create__
-: 105:#pragma weak mpi_keyval_create = mpi_keyval_create__
-: 106:#elif defined(F77_NAME_LOWER_USCORE)
-: 107:#pragma weak MPI_KEYVAL_CREATE = mpi_keyval_create_
-: 108:#pragma weak mpi_keyval_create__ = mpi_keyval_create_
-: 109:#pragma weak mpi_keyval_create = mpi_keyval_create_
-: 110:#else
-: 111:#pragma weak MPI_KEYVAL_CREATE = mpi_keyval_create
-: 112:#pragma weak mpi_keyval_create__ = mpi_keyval_create
-: 113:#pragma weak mpi_keyval_create_ = mpi_keyval_create
-: 114:#endif
-: 115:
-: 116:#endif
-: 117:
-: 118:/* Map the name to the correct form */
-: 119:#ifndef MPICH_MPI_FROM_PMPI
-: 120:#if defined(USE_WEAK_SYMBOLS) && defined(HAVE_MULTIPLE_PRAGMA_WEAK)
-: 121:/* Define the weak versions of the PMPI routine*/
-: 122:#ifndef F77_NAME_UPPER
-: 123:extern FORT_DLL_SPEC void FORT_CALL PMPI_KEYVAL_CREATE( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 124:#endif
-: 125:#ifndef F77_NAME_LOWER_2USCORE
-: 126:extern FORT_DLL_SPEC void FORT_CALL pmpi_keyval_create__( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 127:#endif
-: 128:#ifndef F77_NAME_LOWER_USCORE
-: 129:extern FORT_DLL_SPEC void FORT_CALL pmpi_keyval_create_( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 130:#endif
-: 131:#ifndef F77_NAME_LOWER
-: 132:extern FORT_DLL_SPEC void FORT_CALL pmpi_keyval_create( MPI_Copy_function, MPI_Delete_function, MPI_Fint *, void*, MPI_Fint * );
-: 133:
-: 134:#endif
-: 135:
-: 136:#if defined(F77_NAME_UPPER)
-: 137:#pragma weak pmpi_keyval_create__ = PMPI_KEYVAL_CREATE
-: 138:#pragma weak pmpi_keyval_create_ = PMPI_KEYVAL_CREATE
-: 139:#pragma weak pmpi_keyval_create = PMPI_KEYVAL_CREATE
-: 140:#elif defined(F77_NAME_LOWER_2USCORE)
-: 141:#pragma weak PMPI_KEYVAL_CREATE = pmpi_keyval_create__
-: 142:#pragma weak pmpi_keyval_create_ = pmpi_keyval_create__
-: 143:#pragma weak pmpi_keyval_create = pmpi_keyval_create__
-: 144:#elif defined(F77_NAME_LOWER_USCORE)
-: 145:#pragma weak PMPI_KEYVAL_CREATE = pmpi_keyval_create_
-: 146:#pragma weak pmpi_keyval_create__ = pmpi_keyval_create_
-: 147:#pragma weak pmpi_keyval_create = pmpi_keyval_create_
-: 148:#else
-: 149:#pragma weak PMPI_KEYVAL_CREATE = pmpi_keyval_create
-: 150:#pragma weak pmpi_keyval_create__ = pmpi_keyval_create
-: 151:#pragma weak pmpi_keyval_create_ = pmpi_keyval_create
-: 152:#endif /* Test on name mapping */
-: 153:#endif /* Use multiple pragma weak */
-: 154:
-: 155:#ifdef F77_NAME_UPPER
-: 156:#define mpi_keyval_create_ PMPI_KEYVAL_CREATE
-: 157:#elif defined(F77_NAME_LOWER_2USCORE)
-: 158:#define mpi_keyval_create_ pmpi_keyval_create__
-: 159:#elif !defined(F77_NAME_LOWER_USCORE)
-: 160:#define mpi_keyval_create_ pmpi_keyval_create
-: 161:#else
-: 162:#define mpi_keyval_create_ pmpi_keyval_create_
-: 163:#endif /* Test on name mapping */
-: 164:
-: 165:/* This defines the routine that we call, which must be the PMPI version
-: 166: since we're renaming the Fortran entry as the pmpi version. The MPI name
-: 167: must be undefined first to prevent any conflicts with previous renamings,
-: 168: such as those put in place by the globus device when it is building on
-: 169: top of a vendor MPI. */
-: 170:#undef MPI_Keyval_create
-: 171:#define MPI_Keyval_create PMPI_Keyval_create
-: 172:
-: 173:#else
-: 174:
-: 175:#ifdef F77_NAME_UPPER
-: 176:#define mpi_keyval_create_ MPI_KEYVAL_CREATE
-: 177:#elif defined(F77_NAME_LOWER_2USCORE)
-: 178:#define mpi_keyval_create_ mpi_keyval_create__
-: 179:#elif !defined(F77_NAME_LOWER_USCORE)
-: 180:#define mpi_keyval_create_ mpi_keyval_create
-: 181:/* Else leave name alone */
-: 182:#endif
-: 183:
-: 184:
-: 185:#endif /* MPICH_MPI_FROM_PMPI */
-: 186:
-: 187:/* Prototypes for the Fortran interfaces */
-: 188:#include "fproto.h"
-: 189:
-: 190:#ifndef MPICH_MPI_FROM_PMPI
-: 191:#undef MPI_Comm_create_keyval
-: 192:#define MPI_Comm_create_keyval PMPI_Comm_create_keyval
-: 193:#endif
-: 194:
-: 195:/* The F77 attr copy function prototype and calling convention */
-: 196:typedef void (FORT_CALL F77_CopyFunction) (MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *,MPI_Fint *, MPI_Fint *, MPI_Fint *);
-: 197:
-: 198:/* Helper proxy function to thunk the attr copy function call into F77 calling convention */
-: 199:static
-: 200:int
-: 201:MPIR_Comm_copy_attr_f77_proxy(
-: 202: MPI_Comm_copy_attr_function* user_function,
-: 203: MPI_Comm comm,
-: 204: int keyval,
-: 205: void* extra_state,
-: 206: MPIR_AttrType value_type,
-: 207: void* value,
-: 208: void** new_value,
-: 209: int* flag
-: 210: )
|
#####: 211:{
#####: 212: MPI_Fint ierr = 0;
#####: 213: MPI_Fint fhandle = (MPI_Fint)comm;
#####: 214: MPI_Fint fkeyval = (MPI_Fint)keyval;
#####: 215: MPI_Fint fvalue = (MPI_Fint) MPI_VOID_PTR_CAST_TO_MPI_AINT (value);
#####: 216: MPI_Fint* fextra = (MPI_Fint*)extra_state;
#####: 217: MPI_Fint fnew = 0;
#####: 218: MPI_Fint fflag = 0;
-: 219:
#####: 220: ((F77_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr );
-: 221:
#####: 222: *flag = fflag;
#####: 223: *new_value = MPI_AINT_CAST_TO_VOID_PTR ((MPI_Aint) fnew);
#####: 224: return ierr;
-: 225:}
-: 226:
-: 227:
-: 228:/* The F77 attr delete function prototype and calling convention */
-: 229:typedef void (FORT_CALL F77_DeleteFunction) (MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
-: 230:
-: 231:/* Helper proxy function to thunk the attr delete function call into F77 calling convention */
-: 232:static
-: 233:int
-: 234:MPIR_Comm_delete_attr_f77_proxy(
-: 235: MPI_Comm_delete_attr_function* user_function,
-: 236: MPI_Comm comm,
-: 237: int keyval,
-: 238: MPIR_AttrType value_type,
-: 239: void* value,
-: 240: void* extra_state
-: 241: )
#####: 242:{
#####: 243: MPI_Fint ierr = 0;
#####: 244: MPI_Fint fhandle = (MPI_Fint)comm;
#####: 245: MPI_Fint fkeyval = (MPI_Fint)keyval;
#####: 246: MPI_Fint fvalue = (MPI_Fint) MPI_VOID_PTR_CAST_TO_MPI_AINT (value);
#####: 247: MPI_Fint* fextra = (MPI_Fint*)extra_state;
-: 248:
#####: 249: ((F77_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr );
#####: 250: return ierr;
-: 251:}
-: 252:
-: 253:
#####: 254:FORT_DLL_SPEC void FORT_CALL mpi_keyval_create_ ( MPI_Copy_function v1, MPI_Delete_function v2, MPI_Fint *v3, void*v4, MPI_Fint *ierr ){
#####: 255: *ierr = MPI_Comm_create_keyval( v1, v2, v3, v4 );
#####: 256: if (!*ierr) {
#####: 257: MPIR_Keyval_set_proxy(*v3, MPIR_Comm_copy_attr_f77_proxy, MPIR_Comm_delete_attr_f77_proxy);
-: 258: }
#####: 259:}
|