1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
|
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mpi/fortran/mpif-h/bindings.h"
#include "ompi/mpi/fortran/base/fint_2_int.h"
#if OPAL_HAVE_WEAK_SYMBOLS
#pragma weak MPI_TYPE_NULL_COPY_FN = ompi_type_null_copy_fn_f
#pragma weak mpi_type_null_copy_fn = ompi_type_null_copy_fn_f
#pragma weak mpi_type_null_copy_fn_ = ompi_type_null_copy_fn_f
#pragma weak mpi_type_null_copy_fn__ = ompi_type_null_copy_fn_f
#pragma weak MPI_TYPE_NULL_DELETE_FN = ompi_type_null_delete_fn_f
#pragma weak mpi_type_null_delete_fn = ompi_type_null_delete_fn_f
#pragma weak mpi_type_null_delete_fn_ = ompi_type_null_delete_fn_f
#pragma weak mpi_type_null_delete_fn__ = ompi_type_null_delete_fn_f
#pragma weak MPI_TYPE_DUP_FN = ompi_type_dup_fn_f
#pragma weak mpi_type_dup_fn = ompi_type_dup_fn_f
#pragma weak mpi_type_dup_fn_ = ompi_type_dup_fn_f
#pragma weak mpi_type_dup_fn__ = ompi_type_dup_fn_f
#pragma weak MPI_COMM_NULL_DELETE_FN = ompi_comm_null_delete_fn_f
#pragma weak mpi_comm_null_delete_fn = ompi_comm_null_delete_fn_f
#pragma weak mpi_comm_null_delete_fn_ = ompi_comm_null_delete_fn_f
#pragma weak mpi_comm_null_delete_fn__ = ompi_comm_null_delete_fn_f
#pragma weak MPI_COMM_DUP_FN = ompi_comm_dup_fn_f
#pragma weak mpi_comm_dup_fn = ompi_comm_dup_fn_f
#pragma weak mpi_comm_dup_fn_ = ompi_comm_dup_fn_f
#pragma weak mpi_comm_dup_fn__ = ompi_comm_dup_fn_f
#pragma weak MPI_COMM_NULL_COPY_FN = ompi_comm_null_copy_fn_f
#pragma weak mpi_comm_null_copy_fn = ompi_comm_null_copy_fn_f
#pragma weak mpi_comm_null_copy_fn_ = ompi_comm_null_copy_fn_f
#pragma weak mpi_comm_null_copy_fn__ = ompi_comm_null_copy_fn_f
#pragma weak MPI_WIN_NULL_DELETE_FN = ompi_win_null_delete_fn_f
#pragma weak mpi_win_null_delete_fn = ompi_win_null_delete_fn_f
#pragma weak mpi_win_null_delete_fn_ = ompi_win_null_delete_fn_f
#pragma weak mpi_win_null_delete_fn__ = ompi_win_null_delete_fn_f
#pragma weak MPI_WIN_NULL_COPY_FN = ompi_win_null_copy_fn_f
#pragma weak mpi_win_null_copy_fn = ompi_win_null_copy_fn_f
#pragma weak mpi_win_null_copy_fn_ = ompi_win_null_copy_fn_f
#pragma weak mpi_win_null_copy_fn__ = ompi_win_null_copy_fn_f
#pragma weak MPI_WIN_DUP_FN = ompi_win_dup_fn_f
#pragma weak mpi_win_dup_fn = ompi_win_dup_fn_f
#pragma weak mpi_win_dup_fn_ = ompi_win_dup_fn_f
#pragma weak mpi_win_dup_fn__ = ompi_win_dup_fn_f
#pragma weak MPI_NULL_COPY_FN = ompi_null_copy_fn_f
#pragma weak mpi_null_copy_fn = ompi_null_copy_fn_f
#pragma weak mpi_null_copy_fn_ = ompi_null_copy_fn_f
#pragma weak mpi_null_copy_fn__ = ompi_null_copy_fn_f
#pragma weak MPI_NULL_DELETE_FN = ompi_null_delete_fn_f
#pragma weak mpi_null_delete_fn = ompi_null_delete_fn_f
#pragma weak mpi_null_delete_fn_ = ompi_null_delete_fn_f
#pragma weak mpi_null_delete_fn__ = ompi_null_delete_fn_f
#pragma weak MPI_DUP_FN = ompi_dup_fn_f
#pragma weak mpi_dup_fn = ompi_dup_fn_f
#pragma weak mpi_dup_fn_ = ompi_dup_fn_f
#pragma weak mpi_dup_fn__ = ompi_dup_fn_f
#else
OMPI_GENERATE_F77_BINDINGS( MPI_TYPE_NULL_DELETE_FN,
mpi_type_null_delete_fn,
mpi_type_null_delete_fn_,
mpi_type_null_delete_fn__,
ompi_type_null_delete_fn_f,
(MPI_Fint* type, MPI_Fint* type_keyval, MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr),
(type, type_keyval, attribute_val_out, extra_state, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_TYPE_NULL_COPY_FN,
mpi_type_null_copy_fn,
mpi_type_null_copy_fn_,
mpi_type_null_copy_fn__,
ompi_type_null_copy_fn_f,
(MPI_Fint* type, MPI_Fint* type_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(type, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_TYPE_DUP_FN,
mpi_type_dup_fn,
mpi_type_dup_fn_,
mpi_type_dup_fn__,
ompi_type_dup_fn_f,
(MPI_Fint* type, MPI_Fint* type_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(type, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_COMM_NULL_DELETE_FN,
mpi_comm_null_delete_fn,
mpi_comm_null_delete_fn_,
mpi_comm_null_delete_fn__,
ompi_comm_null_delete_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval,MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr ),
(comm, comm_keyval, attribute_val_out, extra_state, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_COMM_NULL_COPY_FN,
mpi_comm_null_copy_fn,
mpi_comm_null_copy_fn_,
mpi_comm_null_copy_fn__,
ompi_comm_null_copy_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(comm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_COMM_DUP_FN,
mpi_comm_dup_fn,
mpi_comm_dup_fn_,
mpi_comm_dup_fn__,
ompi_comm_dup_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(comm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_NULL_DELETE_FN,
mpi_null_delete_fn,
mpi_null_delete_fn_,
mpi_null_delete_fn__,
ompi_null_delete_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval,MPI_Fint* attribute_val_out, MPI_Fint* extra_state, MPI_Fint* ierr ),
(comm, comm_keyval, attribute_val_out, extra_state, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_NULL_COPY_FN,
mpi_null_copy_fn,
mpi_null_copy_fn_,
mpi_null_copy_fn__,
ompi_null_copy_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Fint* extra_state, MPI_Fint* attribute_val_in, MPI_Fint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(comm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_DUP_FN,
mpi_dup_fn,
mpi_dup_fn_,
mpi_dup_fn__,
ompi_dup_fn_f,
(MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Fint* extra_state, MPI_Fint* attribute_val_in, MPI_Fint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(comm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_WIN_NULL_DELETE_FN,
mpi_win_null_delete_fn,
mpi_win_null_delete_fn_,
mpi_win_null_delete_fn__,
ompi_win_null_delete_fn_f,
(MPI_Fint* type, MPI_Fint* type_keyval,MPI_Aint* attribute_val_out, MPI_Aint* extra_state, MPI_Fint* ierr ),
(type, type_keyval, attribute_val_out, extra_state, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_WIN_NULL_COPY_FN,
mpi_win_null_copy_fn,
mpi_win_null_copy_fn_,
mpi_win_null_copy_fn__,
ompi_win_null_copy_fn_f,
(MPI_Fint* window, MPI_Fint* win_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(window, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
OMPI_GENERATE_F77_BINDINGS( MPI_WIN_DUP_FN,
mpi_win_dup_fn,
mpi_win_dup_fn_,
mpi_win_dup_fn__,
ompi_win_dup_fn_f,
(MPI_Fint* window, MPI_Fint* win_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t* flag, MPI_Fint* ierr),
(window, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierr) )
#endif
/*
* Note that in this file, we invoke OMPI_C_<function> rather than
* <function>, where <function> is MPI_DUP_FN (and all the rest).
* Specifically:
*
* MPI_NULL_DELETE_FN -> OMPI_C_MPI_NULL_DELETE_FN
* MPI_NULL_COPY_FN -> OMPI_C_MPI_NULL_COPY_FN
* MPI_DUP_FN -> OMPI_C_MPI_DUP_FN
*
* MPI_TYPE_NULL_DELETE_FN -> OMPI_C_MPI_TYPE_NULL_DELETE_FN
* MPI_TYPE_NULL_COPY_FN -> OMPI_C_MPI_TYPE_NULL_COPY_FN
* MPI_TYPE_DUP_FN -> OMPI_C_MPI_TYPE_DUP_FN
*
* MPI_COMM_NULL_DELETE_FN -> OMPI_C_MPI_COMM_NULL_DELETE_FN
* MPI_COMM_NULL_COPY_FN -> OMPI_C_MPI_COMM_NULL_COPY_FN
* MPI_COMM_DUP_FN -> OMPI_C_MPI_COMM_DUP_FN
*
* MPI_WIN_NULL_DELETE_FN -> OMPI_C_MPI_WIN_NULL_DELETE_FN
* MPI_WIN_NULL_COPY_FN -> OMPI_C_MPI_WIN_NULL_COPY_FN
* MPI_WIN_DUP_FN -> OMPI_C_MPI_WIN_DUP_FN
*
* The reason why is discussed in a lengthy comment in mpi.h.
*/
void ompi_type_null_delete_fn_f(MPI_Fint* type, MPI_Fint* type_keyval,
MPI_Aint* attribute_val_out,
MPI_Aint* extra_state, MPI_Fint* ierr)
{
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_type_null_copy_fn_f(MPI_Fint* type, MPI_Fint* type_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 0;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_type_dup_fn_f(MPI_Fint* type, MPI_Fint* type_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr )
{
*flag = (ompi_fortran_logical_t) 1;
*attribute_val_out = *attribute_val_in;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_comm_null_delete_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Aint* attribute_val_out,
MPI_Aint* extra_state, MPI_Fint* ierr)
{
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_comm_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 0;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_comm_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 1;
*attribute_val_out = *attribute_val_in;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_null_delete_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Fint* attribute_val_out,
MPI_Fint* extra_state, MPI_Fint* ierr)
{
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_null_copy_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Fint* extra_state,
MPI_Fint* attribute_val_in,
MPI_Fint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 0;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_dup_fn_f(MPI_Fint* comm, MPI_Fint* comm_keyval,
MPI_Fint* extra_state,
MPI_Fint* attribute_val_in,
MPI_Fint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 1;
*attribute_val_out = *attribute_val_in;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_win_null_delete_fn_f(MPI_Fint* window, MPI_Fint* win_keyval,
MPI_Aint* attribute_val_out,
MPI_Aint* extra_state, MPI_Fint* ierr)
{
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_win_null_copy_fn_f(MPI_Fint* window, MPI_Fint* win_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 0;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
void ompi_win_dup_fn_f(MPI_Fint* window, MPI_Fint* win_keyval,
MPI_Aint* extra_state,
MPI_Aint* attribute_val_in,
MPI_Aint* attribute_val_out,
ompi_fortran_logical_t* flag, MPI_Fint* ierr)
{
*flag = (ompi_fortran_logical_t) 1;
*attribute_val_out = *attribute_val_in;
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
}
|