Exemple #1
0
void ompi_op_create_f(ompi_op_fortran_handler_fn_t* function, ompi_fortran_logical_t *commute,
		     MPI_Fint *op, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Op c_op;

    /* See the note in src/mpi/fortran/mpif-h/prototypes_mpi.h about
       the use of (void*) for function pointers in this function */

    c_ierr = PMPI_Op_create((MPI_User_function *) function,
                           OMPI_LOGICAL_2_INT(*commute),
                           &c_op);
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        c_op->o_flags |= OMPI_OP_FLAGS_FORTRAN_FUNC;
        *op = PMPI_Op_c2f(c_op);
    }
}
Exemple #2
0
MPI_Fint MPI_Op_c2f(MPI_Op op){
  return PMPI_Op_c2f(op);
}