44 * reserved.
55 * Copyright (c) 2011-2013 Inria. All rights reserved.
66 * Copyright (c) 2011-2013 Université Bordeaux 1
7- * Copyright (c) 2015 Research Organization for Information Science
8- * and Technology (RIST). All rights reserved.
7+ * Copyright (c) 2015-2019 Research Organization for Information Science
8+ * and Technology (RIST). All rights reserved.
99 * $COPYRIGHT$
1010 *
1111 * Additional copyrights may follow
@@ -74,6 +74,7 @@ void ompi_dist_graph_neighbors_f(MPI_Fint* comm, MPI_Fint* maxindegree,
7474 OMPI_ARRAY_NAME_DECL (sourceweights );
7575 OMPI_ARRAY_NAME_DECL (destinations );
7676 OMPI_ARRAY_NAME_DECL (destweights );
77+ int c_ierr ;
7778
7879 c_comm = PMPI_Comm_f2c (* comm );
7980
@@ -86,12 +87,14 @@ void ompi_dist_graph_neighbors_f(MPI_Fint* comm, MPI_Fint* maxindegree,
8687 OMPI_ARRAY_FINT_2_INT_ALLOC (destweights , * maxoutdegree );
8788 }
8889
89- * ierr = OMPI_INT_2_FINT (PMPI_Dist_graph_neighbors (c_comm , OMPI_FINT_2_INT (* maxindegree ),
90- OMPI_ARRAY_NAME_CONVERT (sources ),
91- OMPI_IS_FORTRAN_UNWEIGHTED (sourceweights ) ? MPI_UNWEIGHTED : OMPI_ARRAY_NAME_CONVERT (sourceweights ),
92- OMPI_FINT_2_INT (* maxoutdegree ), OMPI_ARRAY_NAME_CONVERT (destinations ),
93- OMPI_IS_FORTRAN_UNWEIGHTED (destweights ) ? MPI_UNWEIGHTED : OMPI_ARRAY_NAME_CONVERT (destweights )));
94- if (OMPI_SUCCESS == OMPI_FINT_2_INT (* ierr )) {
90+ c_ierr = PMPI_Dist_graph_neighbors (c_comm , OMPI_FINT_2_INT (* maxindegree ),
91+ OMPI_ARRAY_NAME_CONVERT (sources ),
92+ OMPI_IS_FORTRAN_UNWEIGHTED (sourceweights ) ? MPI_UNWEIGHTED : OMPI_ARRAY_NAME_CONVERT (sourceweights ),
93+ OMPI_FINT_2_INT (* maxoutdegree ), OMPI_ARRAY_NAME_CONVERT (destinations ),
94+ OMPI_IS_FORTRAN_UNWEIGHTED (destweights ) ? MPI_UNWEIGHTED : OMPI_ARRAY_NAME_CONVERT (destweights ));
95+ if (NULL != ierr ) * ierr = OMPI_INT_2_FINT (c_ierr );
96+
97+ if (OMPI_SUCCESS == c_ierr ) {
9598 OMPI_ARRAY_INT_2_FINT (sources , * maxindegree );
9699 if ( !OMPI_IS_FORTRAN_UNWEIGHTED (sourceweights ) ) {
97100 OMPI_ARRAY_INT_2_FINT (sourceweights , * maxindegree );
0 commit comments