-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from FreeFem/release-v4.10
Version v4.10
- Loading branch information
Showing
171 changed files
with
5,568 additions
and
2,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
diff --git a/config/BuildSystem/config/packages/metis.py b/config/BuildSystem/config/packages/metis.py | ||
index b2d66ab23f..08219fb317 100644 | ||
--- a/config/BuildSystem/config/packages/metis.py | ||
+++ b/config/BuildSystem/config/packages/metis.py | ||
@@ -41,6 +41,12 @@ class Configure(config.package.CMakePackage): | ||
if self.framework.argDB['download-metis-use-doubleprecision']: | ||
args.append('-DMETIS_USE_DOUBLEPRECISION=1') | ||
args.append('-DMATH_LIB="'+self.libraries.toStringNoDupes(self.mathlib.lib)+'"') | ||
+ mpicc = self.framework.getMakeMacro('MPICC_SHOW') | ||
+ mpicxx = self.framework.getMakeMacro('MPICXX_SHOW') | ||
+ if mpicc and mpicxx: | ||
+ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER']) | ||
+ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"') | ||
+ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"') | ||
return args | ||
|
||
def configureLibrary(self): | ||
diff --git a/config/BuildSystem/config/packages/mmg.py b/config/BuildSystem/config/packages/mmg.py | ||
index 43fe0c8981..a574b06fe3 100644 | ||
--- a/config/BuildSystem/config/packages/mmg.py | ||
+++ b/config/BuildSystem/config/packages/mmg.py | ||
@@ -28,4 +28,10 @@ class Configure(config.package.CMakePackage): | ||
args.append('-DUSE_VTK=OFF') | ||
args.append('-DUSE_POINTMAP=ON') | ||
args.append('-DSCOTCH_DIR:STRING="'+self.ptscotch.directory+'"') | ||
+ mpicc = self.framework.getMakeMacro('MPICC_SHOW') | ||
+ mpicxx = self.framework.getMakeMacro('MPICXX_SHOW') | ||
+ if mpicc and mpicxx: | ||
+ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER']) | ||
+ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"') | ||
+ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"') | ||
return args | ||
diff --git a/src/mat/impls/aij/mpi/mumps/mumps.c b/src/mat/impls/aij/mpi/mumps/mumps.c | ||
index 3226ffb961..95f38a899f 100644 | ||
--- a/src/mat/impls/aij/mpi/mumps/mumps.c | ||
+++ b/src/mat/impls/aij/mpi/mumps/mumps.c | ||
@@ -1792,11 +1792,7 @@ PetscErrorCode PetscSetMUMPSFromOptions(Mat F, Mat A) | ||
see https://github.com/pmodels/mpich/issues/5589. This bug was fixed by https://github.com/pmodels/mpich/pull/5590. | ||
In short, we could not use distributed RHS with MPICH until v4.0b1. | ||
*/ | ||
-#if PETSC_PKG_MUMPS_VERSION_LT(5,3,0) || (defined(PETSC_HAVE_MPICH_NUMVERSION) && (PETSC_HAVE_MPICH_NUMVERSION < 40000101)) | ||
mumps->ICNTL20 = 0; /* Centralized dense RHS*/ | ||
-#else | ||
- mumps->ICNTL20 = 10; /* Distributed dense RHS*/ | ||
-#endif | ||
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); | ||
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); | ||
#if PETSC_PKG_MUMPS_VERSION_LT(5,3,0) | ||
diff --git a/config/BuildSystem/config/compilers.py b/config/BuildSystem/config/compilers.py | ||
index 24780f1f9b..eb6d7c515f 100644 | ||
--- a/config/BuildSystem/config/compilers.py | ||
+++ b/config/BuildSystem/config/compilers.py | ||
@@ -364,7 +364,7 @@ class Configure(config.base.Configure): | ||
# Check for '-rpath /sharedlibpath/ or -R /sharedlibpath/' | ||
if arg == '-rpath' or arg == '-R': | ||
lib = next(argIter) | ||
- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? | ||
+ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? | ||
if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] | ||
lib = os.path.abspath(lib) | ||
if lib in skipdefaultpaths: continue | ||
@@ -964,7 +964,7 @@ class Configure(config.base.Configure): | ||
# Check for '-rpath /sharedlibpath/ or -R /sharedlibpath/' | ||
if arg == '-rpath' or arg == '-R': | ||
lib = next(argIter) | ||
- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? | ||
+ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? | ||
if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] | ||
lib = os.path.abspath(lib) | ||
if lib in skipdefaultpaths: continue | ||
@@ -1394,7 +1394,7 @@ Otherwise you need a different combination of C, C++, and Fortran compilers") | ||
if arg == '-rpath' or arg == '-R': | ||
lib = next(argIter) | ||
if lib == '\\': lib = next(argIter) | ||
- if lib.startswith('-'): continue # perhaps the path was striped due to quotes? | ||
+ if lib.startswith('-') or lib.startswith('@loader_path'): continue # perhaps the path was striped due to quotes? | ||
if lib.startswith('"') and lib.endswith('"') and lib.find(' ') == -1: lib = lib[1:-1] | ||
lib = os.path.abspath(lib) | ||
if lib in skipdefaultpaths: continue | ||
diff --git a/config/BuildSystem/config/packages/hpddm.py b/config/BuildSystem/config/packages/hpddm.py | ||
index eacc8521e6..0e76e71be9 100644 | ||
--- a/config/BuildSystem/config/packages/hpddm.py | ||
+++ b/config/BuildSystem/config/packages/hpddm.py | ||
@@ -3,7 +3,7 @@ import config.package | ||
class Configure(config.package.Package): | ||
def __init__(self,framework): | ||
config.package.Package.__init__(self,framework) | ||
- self.gitcommit = '832303ecdffd25c34206e5392fb3cf85960490a2' # main oct-09-2021 | ||
+ self.gitcommit = '5fd4ea2cec52b491874ccd3907b53f92f43e5093' # main nov-03-2021 | ||
self.download = ['git://https://github.com/hpddm/hpddm','https://github.com/hpddm/hpddm/archive/'+self.gitcommit+'.tar.gz'] | ||
self.minversion = '2.0.8' | ||
self.versionname = 'HPDDM_VERSION' | ||
@@ -23,13 +23,14 @@ class Configure(config.package.Package): | ||
config.package.Package.setupDependencies(self,framework) | ||
self.setCompilers = framework.require('config.setCompilers',self) | ||
self.sharedLibraries = framework.require('PETSc.options.sharedLibraries',self) | ||
- self.mathlib = framework.require('config.packages.mathlib',self) | ||
+ self.blasLapack = framework.require('config.packages.BlasLapack',self) | ||
self.cxxlibs = framework.require('config.packages.cxxlibs',self) | ||
+ self.mathlib = framework.require('config.packages.mathlib',self) | ||
+ self.flibs = framework.require('config.packages.flibs',self) | ||
+ self.deps = [self.blasLapack,self.cxxlibs,self.mathlib,self.flibs] # KSPHPDDM | ||
self.mpi = framework.require('config.packages.MPI',self) | ||
- self.blasLapack = framework.require('config.packages.BlasLapack',self) | ||
self.slepc = framework.require('config.packages.slepc',self) | ||
- self.deps = [self.blasLapack,self.cxxlibs,self.mathlib] | ||
- self.odeps = [self.mpi,self.slepc] | ||
+ self.odeps = [self.mpi,self.slepc] # KSPHPDDM + PCHPDDM | ||
return | ||
|
||
def Install(self): | ||
@@ -63,50 +64,44 @@ class Configure(config.package.Package): | ||
except RuntimeError as e: | ||
raise RuntimeError('Error copying HPDDM: '+str(e)) | ||
# SLEPc dependency | ||
- if self.mpi.found: | ||
- if self.slepc.found: | ||
- if self.checkSharedLibrariesEnabled(): | ||
- slepcbuilddep = '' | ||
- ldflags = ' '.join(self.setCompilers.sharedLibraryFlags) | ||
- # how can we get the slepc lib? Eventually, we may want to use the variables from the framework | ||
- #cxxflags += self.headers.toStringNoDupes(self.slepc.dinclude) | ||
- #ldflags += self.libraries.toString(self.slepc.dlib) | ||
- 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')] | ||
- dlib = [os.path.join(libDir,'libslepc.'+self.setCompilers.sharedLibraryExt)] | ||
- cxxflags += ' '+self.headers.toStringNoDupes(dinclude) | ||
- ldflags += ' '+self.libraries.toStringNoDupes(dlib) | ||
- slepcbuilddep = 'slepc-install slepc-build' | ||
- oldFlags = self.compilers.CXXPPFLAGS | ||
- self.compilers.CXXPPFLAGS += ' -I'+incDir | ||
- self.checkVersion() | ||
- self.compilers.CXXPPFLAGS = oldFlags | ||
- # check for Windows-specific define | ||
- if self.sharedLibraries.getMakeMacro('PETSC_DLL_EXPORTS'): | ||
- cxxflags += ' -Dpetsc_EXPORTS' | ||
- # need to explicitly link to PETSc and BLAS on Windows | ||
- ldflags += ' '+self.libraries.toStringNoDupes([os.path.join(libDir,'libpetsc.'+self.setCompilers.sharedLibraryExt),self.libraries.toStringNoDupes(self.blasLapack.lib)]) | ||
- self.addMakeRule('hpddmbuild',slepcbuilddep,\ | ||
- ['@echo "*** Building and installing HPDDM ***"',\ | ||
- '@${RM} -f ${PETSC_ARCH}/lib/petsc/conf/hpddm.errorflg',\ | ||
- '@'+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\ | ||
- (echo "**************************ERROR*************************************" && \\\n\ | ||
- echo "Error building HPDDM. Check ${PETSC_ARCH}/lib/petsc/conf/hpddm.log" && \\\n\ | ||
- echo "********************************************************************" && \\\n\ | ||
- touch '+os.path.join('${PETSC_ARCH}','lib','petsc','conf','hpddm.errorflg')+' && \\\n\ | ||
- exit 1)']) | ||
- if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: | ||
- self.addMakeRule('hpddm-build','') | ||
- self.addMakeRule('hpddm-install','hpddmbuild') | ||
- return self.installDir | ||
- else: | ||
- self.addMakeRule('hpddm-build','hpddmbuild') | ||
- self.addMakeRule('hpddm-install','') | ||
- return self.installDir | ||
+ if self.slepc.found: | ||
+ if self.checkSharedLibrariesEnabled(): | ||
+ slepcbuilddep = '' | ||
+ ldflags = ' '.join(self.setCompilers.sharedLibraryFlags) | ||
+ cxxflags += ' '+self.headers.toStringNoDupes(self.dinclude+[os.path.join(PETSC_DIR,'include'),os.path.join(PETSC_DIR,PETSC_ARCH,'include')]) | ||
+ ldflags += ' '+self.libraries.toStringNoDupes(self.dlib) | ||
+ slepcbuilddep = 'slepc-install slepc-build' | ||
+ oldFlags = self.compilers.CXXPPFLAGS | ||
+ self.compilers.CXXPPFLAGS += ' -I'+incDir | ||
+ self.checkVersion() | ||
+ self.compilers.CXXPPFLAGS = oldFlags | ||
+ # check for Windows-specific define | ||
+ if self.sharedLibraries.getMakeMacro('PETSC_DLL_EXPORTS'): | ||
+ cxxflags += ' -Dpetsc_EXPORTS' | ||
+ # need to explicitly link to PETSc and BLAS on Windows | ||
+ ldflags += ' '+self.libraries.toStringNoDupes([os.path.join(libDir,'libpetsc.'+self.setCompilers.sharedLibraryExt),self.libraries.toStringNoDupes(self.blasLapack.lib)]) | ||
+ self.addMakeRule('hpddmbuild',slepcbuilddep,\ | ||
+ ['@echo "*** Building and installing HPDDM ***"',\ | ||
+ '@${RM} -f ${PETSC_ARCH}/lib/petsc/conf/hpddm.errorflg',\ | ||
+ '@'+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\ | ||
+ (echo "**************************ERROR*************************************" && \\\n\ | ||
+ echo "Error building HPDDM. Check ${PETSC_ARCH}/lib/petsc/conf/hpddm.log" && \\\n\ | ||
+ echo "********************************************************************" && \\\n\ | ||
+ touch '+os.path.join('${PETSC_ARCH}','lib','petsc','conf','hpddm.errorflg')+' && \\\n\ | ||
+ exit 1)']) | ||
+ if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: | ||
+ self.addMakeRule('hpddm-build','') | ||
+ self.addMakeRule('hpddm-install','hpddmbuild') | ||
+ return self.installDir | ||
else: | ||
- self.logPrintBox('***** WARNING: Skipping PCHPDDM installation,\n\ | ||
-remove --with-shared-libraries=0 *****') | ||
+ self.addMakeRule('hpddm-build','hpddmbuild') | ||
+ self.addMakeRule('hpddm-install','') | ||
+ return self.installDir | ||
else: | ||
- self.logPrintBox('***** WARNING: Compiling HPDDM with MPI but no SLEPc,\n\ | ||
+ self.logPrintBox('***** WARNING: Skipping PCHPDDM installation,\n\ | ||
+remove --with-shared-libraries=0 *****') | ||
+ else: | ||
+ self.logPrintBox('***** WARNING: Compiling HPDDM without SLEPc,\n\ | ||
PCHPDDM won\'t be available, unless reconfiguring with --download-slepc *****') | ||
self.addMakeRule('hpddm-build','') | ||
self.addMakeRule('hpddm-install','') | ||
diff --git a/config/BuildSystem/config/packages/slepc.py b/config/BuildSystem/config/packages/slepc.py | ||
index bdf0bbe4be..ec77d1e06a 100644 | ||
--- a/config/BuildSystem/config/packages/slepc.py | ||
+++ b/config/BuildSystem/config/packages/slepc.py | ||
@@ -27,6 +27,9 @@ class Configure(config.package.Package): | ||
self.installdir = framework.require('PETSc.options.installDir',self) | ||
self.parch = framework.require('PETSc.options.arch',self) | ||
self.scalartypes = framework.require('PETSc.options.scalarTypes',self) | ||
+ self.cuda = framework.require('config.packages.cuda',self) | ||
+ self.thrust = framework.require('config.packages.thrust',self) | ||
+ self.odeps = [self.cuda,self.thrust] | ||
return | ||
|
||
def Install(self): | ||
@@ -51,6 +54,8 @@ class Configure(config.package.Package): | ||
else: | ||
configargs = '' | ||
|
||
+ self.include = [os.path.join(prefix,'include')] | ||
+ self.lib = [os.path.join(prefix,'lib','libslepc.'+self.setCompilers.sharedLibraryExt)] | ||
self.addDefine('HAVE_SLEPC',1) | ||
self.addMakeMacro('SLEPC','yes') | ||
self.addMakeRule('slepcbuild','', \ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.