コード例 #1
0
void mpi_get_version_f(MPI_Fint *version, MPI_Fint *subversion, MPI_Fint *ierr)
{
    OMPI_SINGLE_NAME_DECL(version);
    OMPI_SINGLE_NAME_DECL(subversion);

    *ierr = OMPI_INT_2_FINT(MPI_Get_version(OMPI_SINGLE_NAME_CONVERT(version),
				    OMPI_SINGLE_NAME_CONVERT(subversion)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(version);
        OMPI_SINGLE_INT_2_FINT(subversion);
    }
}
コード例 #2
0
ファイル: get_version_f.c プロジェクト: 00datman/ompi
void ompi_get_version_f(MPI_Fint *version, MPI_Fint *subversion, MPI_Fint *ierr)
{
    int c_ierr;
    OMPI_SINGLE_NAME_DECL(version);
    OMPI_SINGLE_NAME_DECL(subversion);

    c_ierr = PMPI_Get_version(OMPI_SINGLE_NAME_CONVERT(version),
                             OMPI_SINGLE_NAME_CONVERT(subversion));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(version);
        OMPI_SINGLE_INT_2_FINT(subversion);
    }
}
コード例 #3
0
ファイル: keyval_create_f.c プロジェクト: 00datman/ompi
void ompi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
                         ompi_mpi1_fortran_delete_attr_function* delete_attr_fn,
                         MPI_Fint *keyval, MPI_Fint *extra_state,
                         MPI_Fint *ierr)
{
    int ret, c_ierr;
    OMPI_SINGLE_NAME_DECL(keyval);
    ompi_attribute_fn_ptr_union_t copy_fn;
    ompi_attribute_fn_ptr_union_t del_fn;

    copy_fn.attr_mpi1_fortran_copy_fn = copy_attr_fn;
    del_fn.attr_mpi1_fortran_delete_fn = delete_attr_fn;

    /* Set the "F77_OLD" bit to denote that the callbacks should use
       the old MPI-1 INTEGER-parameter functions (as opposed to the
       new MPI-2 INTEGER(KIND=MPI_ADDRESS_KIND)-parameter
       functions). */

    ret = ompi_attr_create_keyval_fint(COMM_ATTR, copy_fn, del_fn,
                                       OMPI_SINGLE_NAME_CONVERT(keyval), *extra_state,
                                       OMPI_KEYVAL_F77 | OMPI_KEYVAL_F77_MPI1,
                                       NULL);

    if (MPI_SUCCESS != ret) {
        c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
                                        MPI_ERR_OTHER,
                                        FUNC_NAME);
        if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
    } else {
        if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
        OMPI_SINGLE_INT_2_FINT(keyval);
    }
}
コード例 #4
0
ファイル: win_create_keyval_f.c プロジェクト: 00datman/ompi
void ompi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn,
                             ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn,
                             MPI_Fint *win_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)
{
    int ret, c_ierr;
    OMPI_SINGLE_NAME_DECL(win_keyval);
    ompi_attribute_fn_ptr_union_t copy_fn;
    ompi_attribute_fn_ptr_union_t del_fn;

    copy_fn.attr_mpi2_fortran_copy_fn = win_copy_attr_fn;
    del_fn.attr_mpi2_fortran_delete_fn = win_delete_attr_fn;

    /* Note that we only set the "F77" bit and exclude the "F77_OLD"
       bit, indicating that the callbacks should use the new MPI-2
       INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
       to the old MPI-1 INTEGER-parameter functions). */

    ret = ompi_attr_create_keyval_aint(WIN_ATTR, copy_fn, del_fn,
                                       OMPI_SINGLE_NAME_CONVERT(win_keyval), *extra_state, OMPI_KEYVAL_F77,
                                       NULL);

    if (MPI_SUCCESS != ret) {
        c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER,
                                        FUNC_NAME);
        if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
    } else {
        if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
        OMPI_SINGLE_INT_2_FINT(win_keyval);
    }
}
コード例 #5
0
ファイル: graph_map_f.c プロジェクト: XuanWang1982/ompi
void ompi_graph_map_f(MPI_Fint *comm, MPI_Fint *nnodes, MPI_Fint *indx,
		     MPI_Fint *edges, MPI_Fint *nrank, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Comm c_comm;
    OMPI_ARRAY_NAME_DECL(indx);
    OMPI_ARRAY_NAME_DECL(edges);
    OMPI_SINGLE_NAME_DECL(nrank);

    c_comm = MPI_Comm_f2c(*comm);

    /* Number of edges is equal to the last entry in the index array */
    OMPI_ARRAY_FINT_2_INT(edges, indx[*nnodes - 1]);
    OMPI_ARRAY_FINT_2_INT(indx, *nnodes);

    c_ierr = MPI_Graph_map(c_comm, OMPI_FINT_2_INT(*nnodes),
                           OMPI_ARRAY_NAME_CONVERT(indx),
                           OMPI_ARRAY_NAME_CONVERT(edges),
                           OMPI_SINGLE_NAME_CONVERT(nrank));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(nrank);
    }
    OMPI_ARRAY_FINT_2_INT_CLEANUP(edges);
    OMPI_ARRAY_FINT_2_INT_CLEANUP(indx);
}
コード例 #6
0
void mpi_info_get_valuelen_f(MPI_Fint *info, char *key,
                             MPI_Fint *valuelen, MPI_Flogical *flag,
                             MPI_Fint *ierr, int key_len)
{
    int c_err, ret;
    MPI_Info c_info;
    char *c_key;
    OMPI_SINGLE_NAME_DECL(valuelen);
    OMPI_LOGICAL_NAME_DECL(flag);

    if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(key, key_len, &c_key))) {
        c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME);
        *ierr = OMPI_INT_2_FINT(c_err);
        return;
    }
    c_info = MPI_Info_f2c(*info);
    *ierr = OMPI_INT_2_FINT(MPI_Info_get_valuelen(c_info, c_key,
                            OMPI_SINGLE_NAME_CONVERT(valuelen),
                            OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(valuelen);
        OMPI_SINGLE_INT_2_LOGICAL(flag);
    }

    free(c_key);
}
コード例 #7
0
ファイル: cart_map_f.c プロジェクト: aosm/openmpi
void mpi_cart_map_f(MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *dims,
                    MPI_Flogical *periods, MPI_Fint *newrank, MPI_Fint *ierr)
{
    MPI_Comm c_comm;
    int size;
    OMPI_ARRAY_NAME_DECL(dims);
    OMPI_LOGICAL_ARRAY_NAME_DECL(periods);
    OMPI_SINGLE_NAME_DECL(newrank);

    c_comm = MPI_Comm_f2c(*comm);

    size = OMPI_FINT_2_INT(*ndims);
    OMPI_ARRAY_FINT_2_INT(dims, size);
    OMPI_ARRAY_LOGICAL_2_INT(periods, size);

    *ierr = OMPI_INT_2_FINT(MPI_Cart_map(c_comm, 
                                         OMPI_FINT_2_INT(*ndims),
                                         OMPI_ARRAY_NAME_CONVERT(dims),
                                         OMPI_LOGICAL_ARRAY_NAME_CONVERT(periods),
                                         OMPI_SINGLE_NAME_CONVERT(newrank)));

    OMPI_ARRAY_FINT_2_INT_CLEANUP(dims);
    OMPI_ARRAY_INT_2_LOGICAL(periods, size);
    OMPI_ARRAY_LOGICAL_2_INT_CLEANUP(periods);
    OMPI_SINGLE_INT_2_FINT(newrank);
}
コード例 #8
0
void mpi_type_free_keyval_f(MPI_Fint *type_keyval, MPI_Fint *ierr)
{
    OMPI_SINGLE_NAME_DECL(type_keyval);

    OMPI_SINGLE_FINT_2_INT(type_keyval);

    *ierr = 
	OMPI_INT_2_FINT(MPI_Type_free_keyval(OMPI_SINGLE_NAME_CONVERT(type_keyval)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(type_keyval);
    }
}
コード例 #9
0
void ompi_dist_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *inneighbors,
                                       MPI_Fint *outneighbors, ompi_fortran_logical_t *weighted,
                                       MPI_Fint *ierr)
{
    MPI_Comm c_comm;
    OMPI_SINGLE_NAME_DECL(inneighbors);
    OMPI_SINGLE_NAME_DECL(outneighbors);
    OMPI_LOGICAL_NAME_DECL(weighted);

    c_comm = MPI_Comm_f2c(*comm);

    *ierr = OMPI_INT_2_FINT(MPI_Dist_graph_neighbors_count(c_comm,
                                                           OMPI_SINGLE_NAME_CONVERT(inneighbors),
                                                           OMPI_SINGLE_NAME_CONVERT(outneighbors),
                                                           OMPI_LOGICAL_SINGLE_NAME_CONVERT(weighted)));
    OMPI_SINGLE_INT_2_LOGICAL(weighted);
    if (OMPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
          OMPI_SINGLE_INT_2_FINT(inneighbors);
          OMPI_SINGLE_INT_2_FINT(outneighbors);
    }
}
コード例 #10
0
void ompi_win_free_keyval_f(MPI_Fint *win_keyval, MPI_Fint *ierr)
{
    int c_ierr;
    OMPI_SINGLE_NAME_DECL(win_keyval);
    
    c_ierr = MPI_Win_free_keyval(OMPI_SINGLE_NAME_CONVERT(win_keyval));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(win_keyval);
    }
}
コード例 #11
0
ファイル: comm_compare_f.c プロジェクト: aosm/openmpi
void mpi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr)
{
    MPI_Comm c_comm1 = MPI_Comm_f2c(*comm1);
    MPI_Comm c_comm2 = MPI_Comm_f2c(*comm2);
    OMPI_SINGLE_NAME_DECL(result);

    *ierr = OMPI_INT_2_FINT(MPI_Comm_compare(c_comm1, c_comm2, 
				     OMPI_SINGLE_NAME_CONVERT(result)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(result);
    }
}
コード例 #12
0
void ompi_comm_remote_size_f(MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Comm c_comm = MPI_Comm_f2c ( *comm );
    OMPI_SINGLE_NAME_DECL(size);

    c_ierr = MPI_Comm_remote_size ( c_comm, OMPI_SINGLE_NAME_CONVERT(size ));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(size);
    }
}
コード例 #13
0
void mpi_cartdim_get_f(MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *ierr)
{
    MPI_Comm c_comm;
    OMPI_SINGLE_NAME_DECL(ndims);
    
    c_comm = MPI_Comm_f2c(*comm);

    *ierr = OMPI_INT_2_FINT(MPI_Cartdim_get(c_comm,
					    OMPI_SINGLE_NAME_CONVERT(ndims)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(ndims);
    }
}
コード例 #14
0
ファイル: buffer_detach_f.c プロジェクト: 00datman/ompi
/* (this comment is repeated in ompi/mpi/fortran/use-mpi-f08/buffer_detach.c)
 *
 * MPI-3.1 section 3.6, page 45, states that the mpif.h and mpi module
 * interfaces for MPI_BUFFER_DETACH ignore the buffer argument.
 * Therefore, for the mpif.h and mpi module interfaces, we use a dummy
 * variable and leave the value handed in alone.
 *
 * The mpi_f08 implementation for MPI_BUFFER_DETACH therefore is a
 * separate routine in the use-mpi-f08 directory (it's not built in
 * the mpif-h directory because of all the different combinations of
 * supporting weak symbols (or not), building the profiling layer (or
 * not), etc.).
 */
void ompi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr)
{
    int c_ierr;
    void *dummy;
    OMPI_SINGLE_NAME_DECL(size);

    c_ierr = PMPI_Buffer_detach(&dummy, OMPI_SINGLE_NAME_CONVERT(size));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(size);
    }
}
コード例 #15
0
ファイル: error_class_f.c プロジェクト: 00datman/ompi
void ompi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass,
		       MPI_Fint *ierr)
{
    int c_ierr;
    OMPI_SINGLE_NAME_DECL(errorclass);

    c_ierr = PMPI_Error_class(OMPI_FINT_2_INT(*errorcode),
                             OMPI_SINGLE_NAME_CONVERT(errorclass));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(errorclass);
    }
}
コード例 #16
0
void mpi_group_size_f(MPI_Fint *group, MPI_Fint *size, MPI_Fint *ierr)
{
  ompi_group_t *c_group;
  OMPI_SINGLE_NAME_DECL(size);

  /* Make the fortran to c representation conversion */
  c_group = MPI_Group_f2c(*group);
  
  *ierr = OMPI_INT_2_FINT(MPI_Group_size(c_group, 
					 OMPI_SINGLE_NAME_CONVERT(size))); 
  if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
      OMPI_SINGLE_INT_2_FINT(size);
  }
}
コード例 #17
0
void ompi_cart_shift_f(MPI_Fint *comm, MPI_Fint *direction, MPI_Fint *disp,
		      MPI_Fint *rank_source, MPI_Fint *rank_dest,
		      MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Comm c_comm;
    OMPI_SINGLE_NAME_DECL(rank_source);
    OMPI_SINGLE_NAME_DECL(rank_dest);

    c_comm = MPI_Comm_f2c(*comm);

    c_ierr = MPI_Cart_shift(c_comm, 
                            OMPI_FINT_2_INT(*direction),
                            OMPI_FINT_2_INT(*disp),
                            OMPI_SINGLE_NAME_CONVERT(rank_source),
                            OMPI_SINGLE_NAME_CONVERT(rank_dest));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(rank_source);
        OMPI_SINGLE_INT_2_FINT(rank_dest);
    }
}
コード例 #18
0
ファイル: waitany_f.c プロジェクト: 00datman/ompi
void ompi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests,
		   MPI_Fint *indx, MPI_Fint *status, MPI_Fint *ierr)
{
    MPI_Request *c_req;
    MPI_Status c_status;
    int i, c_ierr;
    OMPI_SINGLE_NAME_DECL(indx);

    /* Shortcut to avoid malloc(0) if *count==0.  We're intentionally
       skipping other parameter error checks. */
    if (OPAL_UNLIKELY(0 == OMPI_FINT_2_INT(*count))) {
        *indx = OMPI_INT_2_FINT(MPI_UNDEFINED);
        PMPI_Status_c2f(&ompi_status_empty, status);
        *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
        return;
    }

    c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request));
    if (NULL == c_req) {
        c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
                                        FUNC_NAME);
        if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
        return;
    }

    for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
        c_req[i] = PMPI_Request_f2c(array_of_requests[i]);
    }

    c_ierr = PMPI_Waitany(OMPI_FINT_2_INT(*count), c_req,
                         OMPI_SINGLE_NAME_CONVERT(indx),
                         &c_status);
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {

        /* Increment index by one for fortran conventions */

        OMPI_SINGLE_INT_2_FINT(indx);
        if (MPI_UNDEFINED != *(OMPI_SINGLE_NAME_CONVERT(indx))) {
            array_of_requests[OMPI_INT_2_FINT(*indx)] =
                c_req[OMPI_INT_2_FINT(*indx)]->req_f_to_c_index;
            ++(*indx);
        }
        if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
            PMPI_Status_c2f(&c_status, status);
        }
    }
    free(c_req);
}
コード例 #19
0
ファイル: add_error_code_f.c プロジェクト: 00datman/ompi
void ompi_add_error_code_f(MPI_Fint *errorclass, MPI_Fint *errorcode, MPI_Fint *ierr)
{
    int ierr_c;
    OMPI_SINGLE_NAME_DECL(errorcode);

    ierr_c = PMPI_Add_error_code(OMPI_FINT_2_INT(*errorclass),
                                 OMPI_SINGLE_NAME_CONVERT(errorcode)
                                 );

    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
    if (MPI_SUCCESS == ierr_c) {
        OMPI_SINGLE_INT_2_FINT(errorcode);
    }
}
コード例 #20
0
ファイル: type_free_keyval_f.c プロジェクト: 00datman/ompi
void ompi_type_free_keyval_f(MPI_Fint *type_keyval, MPI_Fint *ierr)
{
    int c_ierr;
    OMPI_SINGLE_NAME_DECL(type_keyval);

    OMPI_SINGLE_FINT_2_INT(type_keyval);

    c_ierr = PMPI_Type_free_keyval(OMPI_SINGLE_NAME_CONVERT(type_keyval));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(type_keyval);
    }
}
コード例 #21
0
ファイル: file_get_amode_f.c プロジェクト: XuanWang1982/ompi
void ompi_file_get_amode_f(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_File c_fh;
    OMPI_SINGLE_NAME_DECL(amode);

    c_fh = MPI_File_f2c(*fh);
    c_ierr = MPI_File_get_amode(c_fh, OMPI_SINGLE_NAME_CONVERT(amode));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(amode);
    }
}
コード例 #22
0
void ompi_keyval_free_f(MPI_Fint *keyval, MPI_Fint *ierr)
{
    int c_ierr;
    OMPI_SINGLE_NAME_DECL(keyval);

    OMPI_SINGLE_FINT_2_INT(keyval);

    c_ierr = MPI_Keyval_free(OMPI_SINGLE_NAME_CONVERT(keyval));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(keyval);
    }
}
コード例 #23
0
ファイル: type_get_envelope_f.c プロジェクト: aosm/openmpi
void mpi_type_get_envelope_f(MPI_Fint *type, MPI_Fint *num_integers,
			     MPI_Fint *num_addresses, 
			     MPI_Fint *num_datatypes, MPI_Fint *combiner,
			     MPI_Fint *ierr)
{
    MPI_Datatype c_type = MPI_Type_f2c(*type);
    OMPI_SINGLE_NAME_DECL(num_integers);
    OMPI_SINGLE_NAME_DECL(num_addresses);
    OMPI_SINGLE_NAME_DECL(num_datatypes);
    OMPI_SINGLE_NAME_DECL(combiner);

    *ierr = OMPI_INT_2_FINT(MPI_Type_get_envelope(c_type,
				 OMPI_SINGLE_NAME_CONVERT(num_integers), 
				 OMPI_SINGLE_NAME_CONVERT(num_addresses), 
				 OMPI_SINGLE_NAME_CONVERT(num_datatypes), 
				 OMPI_SINGLE_NAME_CONVERT(combiner)));

    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(num_integers);
        OMPI_SINGLE_INT_2_FINT(num_addresses);
        OMPI_SINGLE_INT_2_FINT(num_datatypes);
        OMPI_SINGLE_INT_2_FINT(combiner);
    }
}
コード例 #24
0
ファイル: op_commutative_f.c プロジェクト: 00datman/ompi
void ompi_op_commutative_f(MPI_Fint *op, MPI_Fint *commute, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Op c_op;
    OMPI_SINGLE_NAME_DECL(commute);

    c_op = PMPI_Op_f2c(*op);

    c_ierr = PMPI_Op_commutative(c_op, OMPI_SINGLE_NAME_CONVERT(commute));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(commute);
    }
}
コード例 #25
0
ファイル: topo_test_f.c プロジェクト: 00datman/ompi
void ompi_topo_test_f(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Comm c_comm;
    OMPI_SINGLE_NAME_DECL(topo_type);

    c_comm = PMPI_Comm_f2c(*comm);

    c_ierr = PMPI_Topo_test(c_comm, OMPI_SINGLE_NAME_CONVERT(topo_type));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(topo_type);
    }
}
コード例 #26
0
ファイル: group_rank_f.c プロジェクト: 00datman/ompi
void ompi_group_rank_f(MPI_Fint *group, MPI_Fint *rank, MPI_Fint *ierr)
{
  int c_ierr;
  ompi_group_t *c_group;
  OMPI_SINGLE_NAME_DECL(rank);

  /* Make the fortran to c representation conversion */
  c_group = PMPI_Group_f2c(*group);

  c_ierr = PMPI_Group_rank(c_group, OMPI_SINGLE_NAME_CONVERT(rank));
  if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

  if (MPI_SUCCESS == c_ierr) {
      OMPI_SINGLE_INT_2_FINT(rank);
  }
}
コード例 #27
0
ファイル: init_thread_f.c プロジェクト: 00datman/ompi
void ompi_init_thread_f( MPI_Fint *required, MPI_Fint *provided, MPI_Fint *ierr )
{
    int c_ierr;
    int argc = 0;
    char** argv = NULL;
    OMPI_SINGLE_NAME_DECL(provided);

    c_ierr = PMPI_Init_thread(&argc, &argv,
                             OMPI_FINT_2_INT(*required),
                             OMPI_SINGLE_NAME_CONVERT(provided));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(provided);
    }
}
コード例 #28
0
ファイル: group_compare_f.c プロジェクト: aosm/openmpi
void mpi_group_compare_f(MPI_Fint *group1, MPI_Fint *group2,
                         MPI_Fint *result, MPI_Fint *ierr)
{
    ompi_group_t *c_group1, *c_group2;
    OMPI_SINGLE_NAME_DECL(result);

    /* make the fortran to c representation conversion */
    c_group1 = MPI_Group_f2c(*group1);
    c_group2 = MPI_Group_f2c(*group2);

    *ierr = OMPI_INT_2_FINT(MPI_Group_compare(c_group1, c_group2, 
					      OMPI_SINGLE_NAME_CONVERT(result)
					      ));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(result);
    }
}
コード例 #29
0
ファイル: win_shared_query_f.c プロジェクト: cysheen/ompi
void ompi_win_shared_query_f(MPI_Fint *win, MPI_Fint *rank, MPI_Aint *size,
                             MPI_Fint *disp_unit, char *baseptr,
                             MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Win c_win;
    OMPI_SINGLE_NAME_DECL(disp_unit);

    c_win = PMPI_Win_f2c(*win);

    c_ierr = PMPI_Win_shared_query(c_win, OMPI_FINT_2_INT(*rank), size,
                                   OMPI_SINGLE_NAME_CONVERT(disp_unit), baseptr);
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_FINT(disp_unit);
    }
}
コード例 #30
0
ファイル: pack_size_f.c プロジェクト: aosm/openmpi
void mpi_pack_size_f(MPI_Fint *incount, MPI_Fint *datatype, 
		     MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
{
    MPI_Comm c_comm;
    MPI_Datatype c_type;
    OMPI_SINGLE_NAME_DECL(size);
    
    c_comm = MPI_Comm_f2c(*comm);
    c_type = MPI_Type_f2c(*datatype);

    *ierr = OMPI_INT_2_FINT(MPI_Pack_size(OMPI_FINT_2_INT(*incount),
					  c_type, c_comm, 
					  OMPI_SINGLE_NAME_CONVERT(size)));

    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_FINT(size);
    }
}