Neko  0.9.0
A portable framework for high-order spectral element flow simulations
parmetis_wrapper.c
Go to the documentation of this file.
1 /*
2 
3  Fortran wrappers for ParMETIS (from CUBE)
4 
5  Removing the issue of figuring out the data type of the MPI
6  communicator from within Fortran
7 
8 */
9 
10 #include <mpi.h>
11 #include <parmetis.h>
12 
13 #include <comm/comm.h>
14 
15 
19 int ParMETIS_V3_PartGeom_wrapper(idx_t *vtxdist, idx_t *ndims,
20  real_t *xyz, idx_t *part)
21 {
22  int rcode;
23 
24  rcode = METIS_ERROR;
25 
26 #ifdef HAVE_PARMETIS
27 
28  rcode = ParMETIS_V3_PartGeom(vtxdist, ndims, xyz, part, &NEKO_COMM);
29 
30 #endif
31 
32  return rcode;
33 
34 }
35 
39 int ParMETIS_V3_PartMeshKway_wrapper(idx_t *elmdist, idx_t *eptr, idx_t *eind,
40  idx_t *elmwgt, idx_t *wgtflag,
41  idx_t *numflag, idx_t *ncon,
42  idx_t *ncommonnodes, idx_t *nparts,
43  real_t *tpwgts, real_t *ubvec,
44  idx_t *options, idx_t *edgecut, idx_t *part)
45 {
46 
47  int rcode;
48 
49  rcode = METIS_ERROR;
50 
51 #ifdef HAVE_PARMETIS
52 
53  rcode = ParMETIS_V3_PartMeshKway(elmdist, eptr, eind, elmwgt, wgtflag,
54  numflag, ncon, ncommonnodes, nparts,tpwgts,
55  ubvec, options, edgecut, part, &NEKO_COMM);
56 #endif
57 
58  return rcode;
59 
60 }
MPI_Comm NEKO_COMM
Definition: comm_wrapper.c:10
int ParMETIS_V3_PartGeom_wrapper(idx_t *vtxdist, idx_t *ndims, real_t *xyz, idx_t *part)
int ParMETIS_V3_PartMeshKway_wrapper(idx_t *elmdist, idx_t *eptr, idx_t *eind, idx_t *elmwgt, idx_t *wgtflag, idx_t *numflag, idx_t *ncon, idx_t *ncommonnodes, idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options, idx_t *edgecut, idx_t *part)