From: Anthony Geay Date: Tue, 8 Sep 2020 14:14:58 +0000 (+0200) Subject: PTScotch with MEDCOUPLING_USE_64BIT_IDS=ON X-Git-Tag: V9_5_asterxx_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=747f7bbd15cc859ef1a1feb44143144253f5fd96;p=tools%2Fmedcoupling.git PTScotch with MEDCOUPLING_USE_64BIT_IDS=ON --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_PTScotchGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_PTScotchGraph.cxx index 64d21b898..f496ad0dc 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_PTScotchGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_PTScotchGraph.cxx @@ -72,8 +72,17 @@ void PTSCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Pa //output parameters int* partition = new int[n+1]; - int* vlbloctab = _vlbloctab?const_cast(_vlbloctab->begin()):0; - +#ifdef MEDCOUPLING_USE_64BIT_IDS + std::vector vlbloctabVec; + int *vlbloctab(nullptr); + if( _vlbloctab ) + { + vlbloctabVec.insert( vlbloctabVec.end() , _vlbloctab->begin() , _vlbloctab->end() ); + vlbloctab = vlbloctabVec.data(); + } +#else + mcIdType *vlbloctab = _vlbloctab?const_cast(_vlbloctab->begin()):nullptr; +#endif SCOTCH_randomReset(); SCOTCH_Dgraph scotch_graph; SCOTCH_dgraphInit(&scotch_graph, MPI_COMM_WORLD);