|
| 1 | +diff --git a/config/BuildSystem/config/packages/metis.py b/config/BuildSystem/config/packages/metis.py |
| 2 | +index b2d66ab23f..08219fb317 100644 |
| 3 | +--- a/config/BuildSystem/config/packages/metis.py |
| 4 | ++++ b/config/BuildSystem/config/packages/metis.py |
| 5 | +@@ -41,6 +41,12 @@ class Configure(config.package.CMakePackage): |
| 6 | + if self.framework.argDB['download-metis-use-doubleprecision']: |
| 7 | + args.append('-DMETIS_USE_DOUBLEPRECISION=1') |
| 8 | + args.append('-DMATH_LIB="'+self.libraries.toStringNoDupes(self.mathlib.lib)+'"') |
| 9 | ++ mpicc = self.framework.getMakeMacro('MPICC_SHOW') |
| 10 | ++ mpicxx = self.framework.getMakeMacro('MPICXX_SHOW') |
| 11 | ++ if mpicc and mpicxx: |
| 12 | ++ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER']) |
| 13 | ++ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"') |
| 14 | ++ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"') |
| 15 | + return args |
| 16 | + |
| 17 | + def configureLibrary(self): |
| 18 | +diff --git a/config/BuildSystem/config/packages/mmg.py b/config/BuildSystem/config/packages/mmg.py |
| 19 | +index 43fe0c8981..a574b06fe3 100644 |
| 20 | +--- a/config/BuildSystem/config/packages/mmg.py |
| 21 | ++++ b/config/BuildSystem/config/packages/mmg.py |
| 22 | +@@ -28,4 +28,10 @@ class Configure(config.package.CMakePackage): |
| 23 | + args.append('-DUSE_VTK=OFF') |
| 24 | + args.append('-DUSE_POINTMAP=ON') |
| 25 | + args.append('-DSCOTCH_DIR:STRING="'+self.ptscotch.directory+'"') |
| 26 | ++ mpicc = self.framework.getMakeMacro('MPICC_SHOW') |
| 27 | ++ mpicxx = self.framework.getMakeMacro('MPICXX_SHOW') |
| 28 | ++ if mpicc and mpicxx: |
| 29 | ++ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER']) |
| 30 | ++ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"') |
| 31 | ++ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"') |
| 32 | + return args |
| 33 | +diff --git a/src/mat/impls/aij/mpi/mumps/mumps.c b/src/mat/impls/aij/mpi/mumps/mumps.c |
| 34 | +index 3226ffb961..95f38a899f 100644 |
| 35 | +--- a/src/mat/impls/aij/mpi/mumps/mumps.c |
| 36 | ++++ b/src/mat/impls/aij/mpi/mumps/mumps.c |
| 37 | +@@ -1792,11 +1792,7 @@ PetscErrorCode PetscSetMUMPSFromOptions(Mat F, Mat A) |
| 38 | + see https://github.com/pmodels/mpich/issues/5589. This bug was fixed by https://github.com/pmodels/mpich/pull/5590. |
| 39 | + In short, we could not use distributed RHS with MPICH until v4.0b1. |
| 40 | + */ |
| 41 | +-#if PETSC_PKG_MUMPS_VERSION_LT(5,3,0) || (defined(PETSC_HAVE_MPICH_NUMVERSION) && (PETSC_HAVE_MPICH_NUMVERSION < 40000101)) |
| 42 | + mumps->ICNTL20 = 0; /* Centralized dense RHS*/ |
| 43 | +-#else |
| 44 | +- mumps->ICNTL20 = 10; /* Distributed dense RHS*/ |
| 45 | +-#endif |
| 46 | + ierr = PetscOptionsMUMPSInt("-mat_mumps_icntl_20","ICNTL(20): give mumps centralized (0) or distributed (10) dense right-hand sides","None",mumps->ICNTL20,&mumps->ICNTL20,&flg);CHKERRQ(ierr); |
| 47 | + if (flg && mumps->ICNTL20 != 10 && mumps->ICNTL20 != 0) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_SUP,"ICNTL(20)=%d is not supported by the PETSc/MUMPS interface. Allowed values are 0, 10\n",(int)mumps->ICNTL20); |
| 48 | + #if PETSC_PKG_MUMPS_VERSION_LT(5,3,0) |
| 49 | +diff --git a/config/BuildSystem/config/compilers.py b/config/BuildSystem/config/compilers.py |
| 50 | +index 24780f1f9b..eb6d7c515f 100644 |
| 51 | +--- a/config/BuildSystem/config/compilers.py |
| 52 | ++++ b/config/BuildSystem/config/compilers.py |
| 53 | +@@ -364,7 +364,7 @@ class Configure(config.base.Configure): |
| 54 | + # Check for '-rpath /sharedlibpath/ or -R /sharedlibpath/' |
| 55 | + if arg == '-rpath' or arg == '-R': |
| 56 | + lib = next(argIter) |
| 57 | +- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? |
| 58 | ++ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? |
| 59 | + if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] |
| 60 | + lib = os.path.abspath(lib) |
| 61 | + if lib in skipdefaultpaths: continue |
| 62 | +@@ -964,7 +964,7 @@ class Configure(config.base.Configure): |
| 63 | + # Check for '-rpath /sharedlibpath/ or -R /sharedlibpath/' |
| 64 | + if arg == '-rpath' or arg == '-R': |
| 65 | + lib = next(argIter) |
| 66 | +- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? |
| 67 | ++ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? |
| 68 | + if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] |
| 69 | + lib = os.path.abspath(lib) |
| 70 | + if lib in skipdefaultpaths: continue |
| 71 | +@@ -1394,7 +1394,7 @@ Otherwise you need a different combination of C, C++, and Fortran compilers") |
| 72 | + if arg == '-rpath' or arg == '-R': |
| 73 | + lib = next(argIter) |
| 74 | + if lib == '\\': lib = next(argIter) |
| 75 | +- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? |
| 76 | ++ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? |
| 77 | + if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] |
| 78 | + lib = os.path.abspath(lib) |
| 79 | + if lib in skipdefaultpaths: continue |
| 80 | +diff --git a/config/BuildSystem/config/packages/hpddm.py b/config/BuildSystem/config/packages/hpddm.py |
| 81 | +index eacc8521e6..0e76e71be9 100644 |
| 82 | +--- a/config/BuildSystem/config/packages/hpddm.py |
| 83 | ++++ b/config/BuildSystem/config/packages/hpddm.py |
| 84 | +@@ -3,7 +3,7 @@ import config.package |
| 85 | + class Configure(config.package.Package): |
| 86 | + def __init__(self,framework): |
| 87 | + config.package.Package.__init__(self,framework) |
| 88 | +- self.gitcommit = '832303ecdffd25c34206e5392fb3cf85960490a2' # main oct-09-2021 |
| 89 | ++ self.gitcommit = '5fd4ea2cec52b491874ccd3907b53f92f43e5093' # main nov-03-2021 |
| 90 | + self.download = ['git://https://github.com/hpddm/hpddm','https://github.com/hpddm/hpddm/archive/'+self.gitcommit+'.tar.gz'] |
| 91 | + self.minversion = '2.0.8' |
| 92 | + self.versionname = 'HPDDM_VERSION' |
| 93 | +@@ -23,13 +23,14 @@ class Configure(config.package.Package): |
| 94 | + config.package.Package.setupDependencies(self,framework) |
| 95 | + self.setCompilers = framework.require('config.setCompilers',self) |
| 96 | + self.sharedLibraries = framework.require('PETSc.options.sharedLibraries',self) |
| 97 | +- self.mathlib = framework.require('config.packages.mathlib',self) |
| 98 | ++ self.blasLapack = framework.require('config.packages.BlasLapack',self) |
| 99 | + self.cxxlibs = framework.require('config.packages.cxxlibs',self) |
| 100 | ++ self.mathlib = framework.require('config.packages.mathlib',self) |
| 101 | ++ self.flibs = framework.require('config.packages.flibs',self) |
| 102 | ++ self.deps = [self.blasLapack,self.cxxlibs,self.mathlib,self.flibs] # KSPHPDDM |
| 103 | + self.mpi = framework.require('config.packages.MPI',self) |
| 104 | +- self.blasLapack = framework.require('config.packages.BlasLapack',self) |
| 105 | + self.slepc = framework.require('config.packages.slepc',self) |
| 106 | +- self.deps = [self.blasLapack,self.cxxlibs,self.mathlib] |
| 107 | +- self.odeps = [self.mpi,self.slepc] |
| 108 | ++ self.odeps = [self.mpi,self.slepc] # KSPHPDDM + PCHPDDM |
| 109 | + return |
| 110 | + |
| 111 | + def Install(self): |
| 112 | +@@ -63,50 +64,44 @@ class Configure(config.package.Package): |
| 113 | + except RuntimeError as e: |
| 114 | + raise RuntimeError('Error copying HPDDM: '+str(e)) |
| 115 | + # SLEPc dependency |
| 116 | +- if self.mpi.found: |
| 117 | +- if self.slepc.found: |
| 118 | +- if self.checkSharedLibrariesEnabled(): |
| 119 | +- slepcbuilddep = '' |
| 120 | +- ldflags = ' '.join(self.setCompilers.sharedLibraryFlags) |
| 121 | +- # how can we get the slepc lib? Eventually, we may want to use the variables from the framework |
| 122 | +- #cxxflags += self.headers.toStringNoDupes(self.slepc.dinclude) |
| 123 | +- #ldflags += self.libraries.toString(self.slepc.dlib) |
| 124 | +- dinclude = [incDir]+self.dinclude+[os.path.join(PETSC_DIR,'include'),os.path.join(PETSC_DIR,PETSC_ARCH,'include'),os.path.join(self.petscdir.dir,'include'),os.path.join(self.packageDir,'include')] |
| 125 | +- dlib = [os.path.join(libDir,'libslepc.'+self.setCompilers.sharedLibraryExt)] |
| 126 | +- cxxflags += ' '+self.headers.toStringNoDupes(dinclude) |
| 127 | +- ldflags += ' '+self.libraries.toStringNoDupes(dlib) |
| 128 | +- slepcbuilddep = 'slepc-install slepc-build' |
| 129 | +- oldFlags = self.compilers.CXXPPFLAGS |
| 130 | +- self.compilers.CXXPPFLAGS += ' -I'+incDir |
| 131 | +- self.checkVersion() |
| 132 | +- self.compilers.CXXPPFLAGS = oldFlags |
| 133 | +- # check for Windows-specific define |
| 134 | +- if self.sharedLibraries.getMakeMacro('PETSC_DLL_EXPORTS'): |
| 135 | +- cxxflags += ' -Dpetsc_EXPORTS' |
| 136 | +- # need to explicitly link to PETSc and BLAS on Windows |
| 137 | +- ldflags += ' '+self.libraries.toStringNoDupes([os.path.join(libDir,'libpetsc.'+self.setCompilers.sharedLibraryExt),self.libraries.toStringNoDupes(self.blasLapack.lib)]) |
| 138 | +- self.addMakeRule('hpddmbuild',slepcbuilddep,\ |
| 139 | +- ['@echo "*** Building and installing HPDDM ***"',\ |
| 140 | +- '@${RM} -f ${PETSC_ARCH}/lib/petsc/conf/hpddm.errorflg',\ |
| 141 | +- '@'+cxx+' '+cxxflags+' '+self.packageDir+'/interface/hpddm_petsc.cpp '+ldflags+' -o '+libDir+os.path.join('/libhpddm_petsc.'+self.setCompilers.sharedLibraryExt)+' > ${PETSC_ARCH}/lib/petsc/conf/hpddm.log 2>&1 || \\\n\ |
| 142 | +- (echo "**************************ERROR*************************************" && \\\n\ |
| 143 | +- echo "Error building HPDDM. Check ${PETSC_ARCH}/lib/petsc/conf/hpddm.log" && \\\n\ |
| 144 | +- echo "********************************************************************" && \\\n\ |
| 145 | +- touch '+os.path.join('${PETSC_ARCH}','lib','petsc','conf','hpddm.errorflg')+' && \\\n\ |
| 146 | +- exit 1)']) |
| 147 | +- if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: |
| 148 | +- self.addMakeRule('hpddm-build','') |
| 149 | +- self.addMakeRule('hpddm-install','hpddmbuild') |
| 150 | +- return self.installDir |
| 151 | +- else: |
| 152 | +- self.addMakeRule('hpddm-build','hpddmbuild') |
| 153 | +- self.addMakeRule('hpddm-install','') |
| 154 | +- return self.installDir |
| 155 | ++ if self.slepc.found: |
| 156 | ++ if self.checkSharedLibrariesEnabled(): |
| 157 | ++ slepcbuilddep = '' |
| 158 | ++ ldflags = ' '.join(self.setCompilers.sharedLibraryFlags) |
| 159 | ++ cxxflags += ' '+self.headers.toStringNoDupes(self.dinclude+[os.path.join(PETSC_DIR,'include'),os.path.join(PETSC_DIR,PETSC_ARCH,'include')]) |
| 160 | ++ ldflags += ' '+self.libraries.toStringNoDupes(self.dlib) |
| 161 | ++ slepcbuilddep = 'slepc-install slepc-build' |
| 162 | ++ oldFlags = self.compilers.CXXPPFLAGS |
| 163 | ++ self.compilers.CXXPPFLAGS += ' -I'+incDir |
| 164 | ++ self.checkVersion() |
| 165 | ++ self.compilers.CXXPPFLAGS = oldFlags |
| 166 | ++ # check for Windows-specific define |
| 167 | ++ if self.sharedLibraries.getMakeMacro('PETSC_DLL_EXPORTS'): |
| 168 | ++ cxxflags += ' -Dpetsc_EXPORTS' |
| 169 | ++ # need to explicitly link to PETSc and BLAS on Windows |
| 170 | ++ ldflags += ' '+self.libraries.toStringNoDupes([os.path.join(libDir,'libpetsc.'+self.setCompilers.sharedLibraryExt),self.libraries.toStringNoDupes(self.blasLapack.lib)]) |
| 171 | ++ self.addMakeRule('hpddmbuild',slepcbuilddep,\ |
| 172 | ++ ['@echo "*** Building and installing HPDDM ***"',\ |
| 173 | ++ '@${RM} -f ${PETSC_ARCH}/lib/petsc/conf/hpddm.errorflg',\ |
| 174 | ++ '@'+cxx+' '+cxxflags+' '+os.path.join(self.packageDir,'interface','hpddm_petsc.cpp')+' '+ldflags+' -o '+os.path.join(libDir,'libhpddm_petsc.'+self.setCompilers.sharedLibraryExt)+' > ${PETSC_ARCH}/lib/petsc/conf/hpddm.log 2>&1 || \\\n\ |
| 175 | ++ (echo "**************************ERROR*************************************" && \\\n\ |
| 176 | ++ echo "Error building HPDDM. Check ${PETSC_ARCH}/lib/petsc/conf/hpddm.log" && \\\n\ |
| 177 | ++ echo "********************************************************************" && \\\n\ |
| 178 | ++ touch '+os.path.join('${PETSC_ARCH}','lib','petsc','conf','hpddm.errorflg')+' && \\\n\ |
| 179 | ++ exit 1)']) |
| 180 | ++ if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: |
| 181 | ++ self.addMakeRule('hpddm-build','') |
| 182 | ++ self.addMakeRule('hpddm-install','hpddmbuild') |
| 183 | ++ return self.installDir |
| 184 | + else: |
| 185 | +- self.logPrintBox('***** WARNING: Skipping PCHPDDM installation,\n\ |
| 186 | +-remove --with-shared-libraries=0 *****') |
| 187 | ++ self.addMakeRule('hpddm-build','hpddmbuild') |
| 188 | ++ self.addMakeRule('hpddm-install','') |
| 189 | ++ return self.installDir |
| 190 | + else: |
| 191 | +- self.logPrintBox('***** WARNING: Compiling HPDDM with MPI but no SLEPc,\n\ |
| 192 | ++ self.logPrintBox('***** WARNING: Skipping PCHPDDM installation,\n\ |
| 193 | ++remove --with-shared-libraries=0 *****') |
| 194 | ++ else: |
| 195 | ++ self.logPrintBox('***** WARNING: Compiling HPDDM without SLEPc,\n\ |
| 196 | + PCHPDDM won\'t be available, unless reconfiguring with --download-slepc *****') |
| 197 | + self.addMakeRule('hpddm-build','') |
| 198 | + self.addMakeRule('hpddm-install','') |
| 199 | +diff --git a/config/BuildSystem/config/packages/slepc.py b/config/BuildSystem/config/packages/slepc.py |
| 200 | +index bdf0bbe4be..ec77d1e06a 100644 |
| 201 | +--- a/config/BuildSystem/config/packages/slepc.py |
| 202 | ++++ b/config/BuildSystem/config/packages/slepc.py |
| 203 | +@@ -27,6 +27,9 @@ class Configure(config.package.Package): |
| 204 | + self.installdir = framework.require('PETSc.options.installDir',self) |
| 205 | + self.parch = framework.require('PETSc.options.arch',self) |
| 206 | + self.scalartypes = framework.require('PETSc.options.scalarTypes',self) |
| 207 | ++ self.cuda = framework.require('config.packages.cuda',self) |
| 208 | ++ self.thrust = framework.require('config.packages.thrust',self) |
| 209 | ++ self.odeps = [self.cuda,self.thrust] |
| 210 | + return |
| 211 | + |
| 212 | + def Install(self): |
| 213 | +@@ -51,6 +54,8 @@ class Configure(config.package.Package): |
| 214 | + else: |
| 215 | + configargs = '' |
| 216 | + |
| 217 | ++ self.include = [os.path.join(prefix,'include')] |
| 218 | ++ self.lib = [os.path.join(prefix,'lib','libslepc.'+self.setCompilers.sharedLibraryExt)] |
| 219 | + self.addDefine('HAVE_SLEPC',1) |
| 220 | + self.addMakeMacro('SLEPC','yes') |
| 221 | + self.addMakeRule('slepcbuild','', \ |
0 commit comments