diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h index ce82306e85e..69e31c2eb95 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h @@ -79,6 +79,7 @@ void partition_dual_graph(const TriangleMesh& tm, // a dual edge between elements exists if they share 'nparts' vertices idx_t ncommon = 2; + idx_t nparts_as_idx_t = nparts; // either the edgecut or the total communication volume of the dual graph’s partitioning idx_t objval; @@ -98,7 +99,7 @@ void partition_dual_graph(const TriangleMesh& tm, CGAL_assertion_code(int ret =) METIS_PartMeshDual(&ne, &nn, eptr, eind, nullptr /* elements weights*/, nullptr /*elements sizes*/, - &ncommon, &nparts, + &ncommon, &nparts_as_idx_t, nullptr /* partitions weights */, *options, &objval, epart, npart); diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h index c95a8fb7efb..ae1058c3917 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h @@ -112,6 +112,8 @@ void partition_graph(const TriangleMesh& tm, eptr[i + 1] = j; } + idx_t nparts_as_idx_t = nparts; + // either the edgecut or the total communication volume of the dual graph’s partitioning idx_t objval; @@ -130,7 +132,7 @@ void partition_graph(const TriangleMesh& tm, CGAL_assertion_code(int ret =) METIS_PartMeshNodal(&ne, &nn, eptr, eind, nullptr /* nodes weights */, nullptr /* nodes sizes */, - &nparts, + &nparts_as_idx_t, nullptr /* partitions weights */, *options, &objval, epart, npart);