diff --git a/src/common/librnbg.c b/src/common/librnbg.c index 803721c85..1d27be8e6 100644 --- a/src/common/librnbg.c +++ b/src/common/librnbg.c @@ -67,7 +67,7 @@ int MMG5_kPartBoxCompute(SCOTCH_Graph *graf, int vertNbr, int boxVertNbr, /* Initializing SCOTCH functions */ CHECK_SCOTCH(SCOTCH_stratInit(&strat), "scotch_stratInit", 0) ; - if ( SCOTCH_6 ) { + if ( SCOTCH_6 || SCOTCH_7 ) { CHECK_SCOTCH(SCOTCH_archCmplt(&arch, boxNbr), "scotch_archCmplt", 0) ; } else { @@ -87,7 +87,7 @@ int MMG5_kPartBoxCompute(SCOTCH_Graph *graf, int vertNbr, int boxVertNbr, } - if ( SCOTCH_6 ) { + if ( SCOTCH_6 || SCOTCH_7 ) { // Looking for the max value in sortPartTb and computing sortPartTb as // followed : // - sortPartTb[2i] is the box value @@ -237,7 +237,7 @@ int MMG5_scotchCall(MMG5_pMesh mesh, MMG5_pSol met, /*check enough vertex to renum*/ if ( mesh->info.renum && (mesh->np/2. > MMG5_BOXSIZE) ) { - if ( (SCOTCH_5 && SCOTCH_6 ) || ( (!SCOTCH_5) && (!SCOTCH_6) ) ) { + if ( (SCOTCH_5 && SCOTCH_6 && SCOTCH_7 ) || ( (!SCOTCH_5) && (!SCOTCH_6) && (!SCOTCH_7) ) ) { if ( !mmgWarn ) { fprintf(stderr,"\n ## Warning: %s: fail to determine scotch version." " No renumbering.\n",__func__); diff --git a/src/common/librnbg.h b/src/common/librnbg.h index c3c080b03..cba73835a 100644 --- a/src/common/librnbg.h +++ b/src/common/librnbg.h @@ -46,6 +46,8 @@ #define SCOTCH_6 !strcmp(TOSTRING(SCOTCH_VERSION),"6") +#define SCOTCH_7 !strcmp(TOSTRING(SCOTCH_VERSION),"7") + #define CHECK_SCOTCH(t,m,e) if(0!=t){perror(m);return e;} typedef struct MeshGraphHash_ {