X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_ScotchGraph.cxx;h=1cd742b6d0de100a0f2060fe3a55f1a48a4cd0a2;hb=84031c1872103b9a0c9546ea12c4ebd03838034d;hp=a0d4686bd6c969f18cf1bb26edf3b1d033ab7243;hpb=14f30db13a9749dd4a47f5c14944c7331e7390d1;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx index a0d4686bd..1cd742b6d 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -53,10 +53,17 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para std::cout << "proc " << MyGlobals::_Rank << " : SCOTCHGraph::partGraph" << std::endl; //number of graph vertices - int n = _graph->getNumberOf(); + int n = FromIdType(_graph->getNumberOf()); //graph +#ifdef MEDCOUPLING_USE_64BIT_IDS + std::vector indexVec( _graph->getIndex(), _graph->getIndexArray()->end() ); + std::vector valueVec( _graph->getValues(), _graph->getValuesArray()->end() ); + int * xadj=indexVec.data(); + int * adjncy=valueVec.data(); +#else int * xadj=const_cast(_graph->getIndex()); int * adjncy=const_cast(_graph->getValues()); +#endif //ndomain int nparts=ndomain; @@ -99,13 +106,13 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para SCOTCH_stratExit(&scotch_strategy); SCOTCH_graphExit(&scotch_graph); - std::vector index(n+1); - std::vector value(n); + std::vector index(n+1); + std::vector value(n); index[0]=0; for (int i=0; i