Exemple #1
0
void ompi_win_get_attr_f(MPI_Fint *win, MPI_Fint *win_keyval,
                        MPI_Aint *attribute_val, ompi_fortran_logical_t *flag, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Win c_win = PMPI_Win_f2c(*win);
    OMPI_LOGICAL_NAME_DECL(flag);

    /* This stuff is very confusing.  Be sure to see the comment at
       the top of src/attributes/attributes.c. */

    c_ierr = ompi_attr_get_fortran_mpi2(c_win->w_keyhash,
                                        OMPI_FINT_2_INT(*win_keyval),
                                        attribute_val,
                                        OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
    OMPI_SINGLE_INT_2_LOGICAL(flag);
}
void mpi_comm_get_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
                         MPI_Aint *attribute_val, ompi_fortran_logical_t *flag,
                         MPI_Fint *ierr)
{
    int c_err;
    MPI_Comm c_comm = MPI_Comm_f2c(*comm);
    OMPI_LOGICAL_NAME_DECL(flag);

    /* This stuff is very confusing.  Be sure to see the comment at
       the top of src/attributes/attributes.c. */

    c_err = ompi_attr_get_fortran_mpi2(c_comm->c_keyhash,
                                       OMPI_FINT_2_INT(*comm_keyval),
                                       attribute_val,
                                       OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag));
    *ierr = OMPI_INT_2_FINT(c_err);
    OMPI_SINGLE_INT_2_LOGICAL(flag);
}