Error when specifing METIS as a TPL when building trilinos for ML package

I tried building trilinos with the ML package enabled along with TPL's
METIS and ParaMEtis. However I ran into the following errors:

/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:85:19:
error: unknown type name ‘idxtype’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:444:24:
error: unknown type name ‘idxtype’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:
In function ‘ML_DecomposeGraph_with_METIS’:
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:753:3:
error: unknown type name ‘idxtype’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:755:3:
error: unknown type name ‘idxtype’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:757:3:
error: unknown type name ‘idxtype’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:819:14:
error: ‘idxtype’ undeclared (first use in this function)
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:819:14:
note: each undeclared identifier is reported only once for each function
it appears in
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:819:23:
error: expected expression before ‘)’ token
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:828:23:
error: expected expression before ‘)’ token
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:829:23:
error: expected expression before ‘)’ token
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:889:22:
error: expected expression before ‘)’ token
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:945:7:
warning: passing argument 9 of ‘METIS_PartGraphRecursive’ from
incompatible pointer type [enabled by default]
/home/vishagan/met/metis-5.0.1/build/include/metis.h:185:16: note:
expected ‘real_t *’ but argument is of type ‘int *’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:945:7:
warning: passing argument 10 of ‘METIS_PartGraphRecursive’ from
incompatible pointer type [enabled by default]
/home/vishagan/met/metis-5.0.1/build/include/metis.h:185:16: note:
expected ‘real_t *’ but argument is of type ‘int *’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:945:7:
error: too few arguments to function ‘METIS_PartGraphRecursive’
/home/vishagan/met/metis-5.0.1/build/include/metis.h:185:16: note:
declared here
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:956:9:
warning: passing argument 9 of ‘METIS_PartGraphKway’ from incompatible
pointer type [enabled by default]
/home/vishagan/met/metis-5.0.1/build/include/metis.h:190:16: note:
expected ‘real_t *’ but argument is of type ‘int *’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:956:9:
warning: passing argument 10 of ‘METIS_PartGraphKway’ from incompatible
pointer type [enabled by default]
/home/vishagan/met/metis-5.0.1/build/include/metis.h:190:16: note:
expected ‘real_t *’ but argument is of type ‘int *’
/home/vishagan/t2/trilinos-10.8.2-Source/packages/ml/src/Coarsen/ml_agg_METIS.c:956:9:
error: too few arguments to function ‘METIS_PartGraphKway’
/home/vishagan/met/metis-5.0.1/build/include/metis.h:190:16: note:
declared here
make[2]: *** [packages/ml/src/CMakeFiles/ml.dir/Coarsen/ml_agg_METIS.c.o]
Error 1
make[1]: *** [packages/ml/src/CMakeFiles/ml.dir/all] Error 2
make: *** [all] Error 2

I've tried rebuilding metis along with Parametis and so forth, but no luck
still. Any help would be appreciated. Thanks.

RE: You will need to talk to the

You will need to talk to the trilinos folks.

RE: quick fix

Hello,
as far as I understood the issues come from the following few interface changes:
* the idxtype is renamed idx_t (just add typedef idx_t idxtype;)
* the functions METIS_PartGraphRecursive and METIS_PartGraphKway accept two more optional parameters: just add , NULL, NULL before the 'option' input parameter
* the function METIS_EstimateMemory is obsolete. Comment out where it is used (anyway it is always used to print something to the standard output).
Hope this helps

Paolo