- METIS_NodeND(&nbCell,(int*)index_graph,(int*)graph,&num_flag,&options,out0->getPointer(),out1->getPointer());
+
+#if ID_TYPE_SIZE == IDXTYPEWIDTH
+
+ METIS_NodeND(&nbCell,(idx_t*)index_graph,(idx_t*)graph,&num_flag,&options,out0->getPointer(),out1->getPointer());
+
+#else
+
+ mcIdType indexSize = nbCell + 1, graphSize = index_graph[indexSize];
+ std::vector<idx_t> indexVec( index_graph, index_graph + indexSize );
+ std::vector<idx_t> graphVec( graph, graph + graphSize );
+ std::vector<idx_t> out0Vec( nbCell ), out1Vec( nbCell );
+ idx_t nb = static_cast<idx_t>( nbCell );
+ METIS_NodeND(&nb,indexVec.data(),graphVec.data(),&num_flag,&options,out0Vec.data(),out1Vec.data());
+ std::copy( out0Vec.begin(),out0Vec.end(),out0->getPointer() );
+ std::copy( out1Vec.begin(),out1Vec.end(),out1->getPointer() );
+
+#endif
+