Skip to content

Commit

Permalink
Merge pull request #173 from FreeFem/develop
Browse files Browse the repository at this point in the history
Version 4.9
  • Loading branch information
prj- authored Apr 19, 2021
2 parents a7d3089 + f6f8b7e commit 897a6ed
Show file tree
Hide file tree
Showing 80 changed files with 4,778 additions and 1,242 deletions.
1 change: 1 addition & 0 deletions 3rdparty/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ EXTRA_DIST= \
./scotch/Makefile-scotch.inc \
./scotch/scotch_6.0.4.patch \
./superlu/Makefile \
./superlu/patch-superlu-5.2.2 \
./superlu/make.inc \
./tetgen/Makefile \
./mmg/Makefile \
Expand Down
33 changes: 20 additions & 13 deletions 3rdparty/ff-petsc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ PETSC_OPENBLAS_C = $(PETSC_OPENBLAS)
endif
PETSC_DOWNLOAD_C := --with-metis-dir=$(DIR_INSTALL_REAL) \
--with-ptscotch-dir=$(DIR_INSTALL_REAL) \
--with-suitesparse-include='$(SUITESPARSE_INCLUDE)' --with-suitesparse-lib='$(SUITESPARSE_LIB)' \
--with-mmg-dir=$(DIR_INSTALL_REAL) \
--with-parmmg-dir=$(DIR_INSTALL_REAL) \
--with-superlu-dir=$(DIR_INSTALL_REAL) \
--with-suitesparse-dir=$(DIR_INSTALL_REAL) \
--with-parmetis-dir=$(DIR_INSTALL_REAL) \
--with-tetgen-dir=$(DIR_INSTALL_REAL)
ifeq ($(PETSC_PKG),yes)
Expand All @@ -66,16 +69,13 @@ endif
else
PETSC_DOWNLOAD := --download-metis --download-ptscotch \
--download-hypre --download-parmetis \
--download-mmg --download-parmmg \
--download-superlu --download-suitesparse --download-tetgen \
--download-slepc
--download-slepc --download-hpddm
ifeq ($(FFCMAKE),no)
PETSC_DOWNLOAD := $(PETSC_DOWNLOAD) --download-cmake
endif
PETSC_DOWNLOAD_C := $(PETSC_DOWNLOAD_C) --download-slepc
ifeq ($(WIN32DLLTARGET),)
PETSC_DOWNLOAD := $(PETSC_DOWNLOAD) --download-hpddm
PETSC_DOWNLOAD_C := $(PETSC_DOWNLOAD_C) --download-hpddm
endif
PETSC_DOWNLOAD_C := $(PETSC_DOWNLOAD_C) --download-slepc --download-hpddm
endif
ifeq ($(FF_generic_petsc), yes)
FLAGS_MTUNE := -mtune=generic
Expand All @@ -89,7 +89,7 @@ ifeq ($(MPICC)$(MPICXX)$(MPIFC),)
PETSC_DOWNLOAD += --with-cc='$(CC)' --with-cxx='$(CXX)' --download-mpich
PETSC_DOWNLOAD_C += --with-mpi-dir=$(DIR_INSTALL_REAL)
ifneq ($(FC),)
PETSC_DOWNLOAD += --with-fc='$(FC)' --download-scalapack --download-mumps --download-slepc-configure-arguments="--download-arpack=https://github.com/prj-/arpack-ng/archive/6d11c37b2dc9110f3f6a434029353ae1c5112227.tar.gz"
PETSC_DOWNLOAD += --with-fc='$(FC)' --download-scalapack --download-mumps --download-slepc-configure-arguments="--download-arpack=https://github.com/prj-/arpack-ng/archive/b64dccb.tar.gz"
PETSC_DOWNLOAD_C += --with-scalapack-dir=$(DIR_INSTALL_REAL) --with-mumps-dir=$(DIR_INSTALL_REAL) # --download-slepc-configure-arguments="--with-arpack-dir=$(DIR_INSTALL_REAL)"
else
COMMON_FLAGS += --with-fc=0
Expand All @@ -98,7 +98,7 @@ else
COMMON_FLAGS += --with-cc='$(MPICC)' --with-cxx='$(MPICXX)'
ifneq ($(MPIFC),)
COMMON_FLAGS += --with-fc='$(MPIFC)'
PETSC_DOWNLOAD += --download-scalapack --download-mumps --download-slepc-configure-arguments="--download-arpack=https://github.com/prj-/arpack-ng/archive/6d11c37b2dc9110f3f6a434029353ae1c5112227.tar.gz"
PETSC_DOWNLOAD += --download-scalapack --download-mumps --download-slepc-configure-arguments="--download-arpack=https://github.com/prj-/arpack-ng/archive/b64dccb.tar.gz"
PETSC_DOWNLOAD_C += --with-scalapack-dir=$(DIR_INSTALL_REAL) --with-mumps-dir=$(DIR_INSTALL_REAL) # --download-slepc-configure-arguments="--with-arpack-dir=$(DIR_INSTALL_REAL)"
else
COMMON_FLAGS += --with-fc=0
Expand All @@ -118,6 +118,8 @@ COMMON_FLAGS += --with-shared-libraries=0 \
--with-mpiexec='/C/Program\ Files/Microsoft\ MPI/Bin/mpiexec'
PETSC_DOWNLOAD += '--download-metis-cmake-arguments=-G "MSYS Makefiles"' \
'--download-parmetis-cmake-arguments=-G "MSYS Makefiles"' \
'--download-mmg-cmake-arguments=-G "MSYS Makefiles"' \
'--download-parmmg-cmake-arguments=-DMPI_GUESS_LIBRARY_NAME=MSMPI -G "MSYS Makefiles"' \
'--download-superlu-cmake-arguments=-G "MSYS Makefiles"' \
'--download-hypre-configure-arguments=--build=x86_64-linux-gnu --host=x86_64-linux-gnu'
ifneq ($(FC),)
Expand Down Expand Up @@ -146,9 +148,9 @@ all-local:
@echo " make petsc-slepc "

DIRPKG=../pkg
VERSION=3.14.2
VERSION_SLEPC=3.14.0
PACKAGE=../pkg/petsc-lite-$(VERSION).tar.gz
VERSION=3.15.0
VERSION_SLEPC=3.014.2
PACKAGE=../pkg/petsc-$(VERSION).tar.gz
SRCDIR=petsc-$(VERSION)
MPI_DIR:=$(shell dirname $(MPI_INC_DIR))
W_MPICC:=$(strip $(shell which mpicc))
Expand Down Expand Up @@ -223,7 +225,7 @@ $(SRCDIR)/tag-conf-real:$(SRCDIR)/tag-tar
touch $@
Make-petsc-download.mk:$(SRCDIR)/tag-install-real
test -e $(DIR_INSTALL_REAL)/lib/petsc/conf/petscvariables
egrep 'PETSC_LIB_BASIC|SCALAPACK_|METIS_|MUMPS_|HPDDM_|TETGEN_|SUPERLU_|PTSCOTCH_|SUITESPARSE_' $(DIR_INSTALL_REAL)/lib/petsc/conf/petscvariables | sed 's/-I/ /g'|sort >$@
egrep 'PETSC_LIB_BASIC|SCALAPACK_|METIS_|MUMPS_|HPDDM_|TETGEN_|SUPERLU_|MMG_|PTSCOTCH_|SUITESPARSE_' $(DIR_INSTALL_REAL)/lib/petsc/conf/petscvariables | sed 's/-I/ /g'|sort >$@
ifdef COMPLEX_CASE
# version COMPLEX.....
$(SRCDIR)/tag-conf-complex:$(SRCDIR)/tag-tar Make-petsc-download.mk
Expand Down Expand Up @@ -266,6 +268,10 @@ WHERE-all:Makefile WHERE WHERE-complex
test -z '$(MUMPS_INCLUDE)' || echo mumps INCLUDE -I$(MUMPS_INCLUDE) >>$@
test -z '$(SUPERLU_LIB)' || echo superlu LD $(SUPERLU_LIB) >>$@
test -z '$(SUPERLU_INCLUDE)' || echo superlu INCLUDE -I$(SUPERLU_INCLUDE) >>$@
test -z '$(MMG_LIB)' || echo mmg LD $(MMG_LIB) >>$@
test -z '$(MMG_INCLUDE)' || echo mmg INCLUDE -I$(MMG_INCLUDE) >>$@
test -z '$(PARMMG_LIB)' || echo parmmg LD $(PARMMG_LIB) >>$@
test -z '$(PARMMG_INCLUDE)' || echo parmmg INCLUDE -I$(PARMMG_INCLUDE) >>$@
test -z '$(PTSCOTCH_LIB)' || echo ptscotch LD $(PTSCOTCH_LIB) >>$@
test -z '$(PTSCOTCH_INCLUDE)' || echo ptscotch INCLUDE -I$(PTSCOTCH_INCLUDE) >>$@
test -z '$(TETGEN_LIB)' || echo tetgen LD $(TETGEN_LIB) >>$@
Expand Down Expand Up @@ -298,6 +304,7 @@ $(SRCDIR)/tag-tar:$(PACKAGE)
ifeq ($(WIN32DLLTARGET),)
cd petsc-$(VERSION) && patch -p1 < ../petsc-metis.patch && cd -
endif
cd petsc-$(VERSION) && patch -p1 < ../petsc-suitesparse.patch && cd -
touch $@
$(PACKAGE):
../getall -o PETSc -a
Expand Down
40 changes: 40 additions & 0 deletions 3rdparty/ff-petsc/petsc-suitesparse.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git b/config/BuildSystem/config/packages/SuiteSparse.py a/config/BuildSystem/config/packages/SuiteSparse.py
index e9c7c7d3b2..3de634af59 100644
--- b/config/BuildSystem/config/packages/SuiteSparse.py
+++ a/config/BuildSystem/config/packages/SuiteSparse.py
@@ -4,7 +4,7 @@ class Configure(config.package.Package):
def __init__(self, framework):
config.package.Package.__init__(self,framework)
self.minversion = '5.6.0'
- self.version = '5.8.1'
+ self.version = '5.7.1'
self.versioninclude = 'SuiteSparse_config.h'
self.versionname = 'SUITESPARSE_MAIN_VERSION.SUITESPARSE_SUB_VERSION.SUITESPARSE_SUBSUB_VERSION'
self.gitcommit = 'v'+self.version
@@ -59,7 +59,7 @@ class Configure(config.package.Package):
ldflags=self.getDynamicLinkerFlags()
else:
ldflags=''
- ldflags += ' '+self.setCompilers.LDFLAGS
+ ldflags+=self.setCompilers.LDFLAGS
# SuiteSparse 5.6.0 makefile has a bug in how it treats LDFLAGS (not using the override directive)
ldflags+=" -L\$(INSTALL_LIB)"
self.popLanguage()
@@ -81,9 +81,6 @@ class Configure(config.package.Package):
args.append('INSTALL_DOC='+self.installDir+'/share/doc/suitesparse')
args.append('BLAS="'+self.libraries.toString(self.blasLapack.dlib)+'"')
args.append('LAPACK="'+self.libraries.toString(self.blasLapack.dlib)+'"')
- # fix for bug in SuiteSparse
- if self.setCompilers.isDarwin(self.log):
- args.append('LDLIBS=""')
if self.blasLapack.mangling == 'underscore':
flg = ''
elif self.blasLapack.mangling == 'caps':
@@ -129,7 +126,6 @@ class Configure(config.package.Package):
args.append('CF="'+cflags+'"')
args.append('CHOLMOD_CONFIG="'+flg+'"')
args.append('CUDA=no')
- args.append('CUDA_PATH=')

args = ' '.join(args)
conffile = os.path.join(self.packageDir,self.package+'.petscconf')
53 changes: 21 additions & 32 deletions 3rdparty/getall
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,6 @@ download('OpenBLAS','https://github.com/xianyi/OpenBLAS/archive/v0.3.6.tar.gz',
'8a110a25b819a4b94e8a9580702b6495',
'BAD_CERT');

# downloading the binary package is required for Windows because
# compiling requires big amounts of RAM (more than 4GB). This is not a
# big package so we download it in any situation just in case an
# offline Windows compile follows.

download('OpenBLAS-Win64','http://downloads.sourceforge.net/project/openblas/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip',
'http://www.openblas.net/',
'OpenBLAS-v0.2.14-Win64-int64.zip',
'9f2d41076857a514b921bf0bf03b5d39');
download('OpenBLAS-Win32','http://downloads.sourceforge.net/project/openblas/v0.2.14/OpenBLAS-v0.2.14-Win32.zip',
'http://www.openblas.net/',
'OpenBLAS-v0.2.14-Win32.zip',
'eefdf170439620d78fabb3139b7aeb2f');

download('FFTW','http://www.fftw.org/fftw-3.3.8.tar.gz',
'http://www.fftw.org',
'fftw-3.3.8.tar.gz','8aac833c943d8e90d51b697b27d4384d');
Expand Down Expand Up @@ -153,23 +139,26 @@ download('NLopt','http://ab-initio.mit.edu/nlopt/nlopt-2.2.4.tar.gz',
'http://ab-initio.mit.edu/wiki/index.php/NLopt',
'nlopt-2.2.4.tar.gz',
'9c60c6380a10c6d2a06895f0e8756d4f');
download('ScaLAPACK','http://www.netlib.org/scalapack/scalapack-2.0.2.tgz',
download('ScaLAPACK','http://www.netlib.org/scalapack/scalapack-2.1.0.tgz',
'http://www.netlib.org/scalapack/',
'scalapack-2.0.2.tgz',
'2f75e600a2ba155ed9ce974a1c4b536f');
download('Scotch','https://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz',
'https://gforge.inria.fr/projects/scotch/',
'scotch_6.0.4.tar.gz',
'd58b825eb95e1db77efe8c6ff42d329f',
'BAD_CERT'); # web certificate from gforge.inria.fr is rejected
'scalapack-2.1.0.tgz',
'3b239ef80353c67354a0a62d54946fa8');
download('Scotch','https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.0/scotch-v6.1.0.tar.gz',
'https://gitlab.inria.fr/scotch/',
'scotch-v6.1.0.tar.gz',
'7bfad4aaa851af6815b2160da7ebe36a'); # web certificate from gforge.inria.fr is rejected
download('SuiteSparse','http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.4.tar.gz',
'http://faculty.cse.tamu.edu/davis/SuiteSparse/',
'SuiteSparse-4.4.4.tar.gz',
'e0af74476935c9ff6d971df8bb6b82fc') ;
download('SuperLU','https://github.com/xiaoyeli/superlu/archive/4f2da83a24c52641c1f7ab06f57c00b8954cf215.zip',
'https://github.com/xiaoyeli/superlu',
'superlu.zip',
'596927f39d28a7d6eb396764f46455b2');
#download('SuperLU','https://github.com/xiaoyeli/superlu/archive/4f2da83a24c52641c1f7ab06f57c00b8954cf215.zip',
# 'https://github.com/xiaoyeli/superlu',
# 'superlu.zip',
# '596927f39d28a7d6eb396764f46455b2');
download('SuperLU','https://github.com/xiaoyeli/superlu/archive/v5.2.2.zip',
'https://github.com/xiaoyeli/superlu',
'superlu-5.2.2.zip',
'6e24842b0aa07f457d929b162e09ca6c');
download('TetGen','http://www.tetgen.org/1.5/src/tetgen1.5.1-beta1.tar.gz',
'http://www.tetgen.org/1.5/src/',
'tetgen1.5.1-beta1.tar.gz',
Expand All @@ -182,21 +171,21 @@ download('parmmg','https://github.com/MmgTools/ParMmg/archive/f78f4e3e1019137787
'https://github.com/MmgTools',
'parmmg.zip',
'9a76fef6be1ab66af3a813409a0388c9');
download('PETSc','https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-lite-3.14.2.tar.gz',
download('PETSc','https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-3.15.0.tar.gz',
'https://www.mcs.anl.gov/petsc/mirror/release-snapshots/',
'petsc-lite-3.14.2.tar.gz',
'c3433f6f5f4ad8d5823ca69dd0c2f3e6');
'petsc-3.15.0.tar.gz',
'32cdb2a2aed1be52059f6221a41d2b18');

download('htool','https://github.com/htool-ddm/htool/archive/e008e87bded5626d73fa7655487aee48268e2149.zip',
'https://github.com/htool-ddm/',
'htool.zip',
'7ee614df188cf501c03c5f27d1569b1c');


download('hpddm','https://github.com/hpddm/hpddm/archive/882ec1041ed3e112237ceb6986ea0e79d335ade5.zip',
'https://github.com/hpddm',
download('hpddm','https://codeload.github.com/hpddm/hpddm/zip/e58205623814f59bf2aec2e2bab8eafcfbd22466',
'https://codeload.github.com/hpddm',
'hpddm.zip',
'490275da4e47760a86e4747abd0306e7');
'b7a4f9be6de2df302485c4689a6c8078');

download('bemtool','https://github.com/PierreMarchand20/BemTool/archive/d327ef63c5abe88b13197c433a019e0db10eb426.zip',
'https://github.com/PierreMarchand20/BemTool',
Expand Down
6 changes: 2 additions & 4 deletions 3rdparty/scalapack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ all-local: scalapack
# http://www.netlib.org/scalapack/
# Hips information
DIRPKG=../pkg
SRCDIR=scalapack-2.0.2
PACKAGE1=$(DIRPKG)/scalapack-2.0.2.tgz
SRCDIR=scalapack-2.1.0
PACKAGE1=$(DIRPKG)/scalapack-2.1.0.tgz
SERVER=http://www.netlib.org/scalapack/
INSTALL=../..

Expand Down Expand Up @@ -62,8 +62,6 @@ SLmake.inc: ../../config.status Makefile SLmake-scalapack.inc

$(SRCDIR)/tag-tar: $(PACKAGE1)
gunzip -c $(PACKAGE1) | tar xf -
# fto pach
patch -p0 <scalapack.patch
touch $(SRCDIR)/tag-tar

$(PACKAGE1):
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/scalapack/SLmake-scalapack.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NOOPT = -O0 @CNOFLAGS@
# FFCS - some return statements without value cause trouble on MacOS
# FFCS - add path to mpi.h (required for MacOS 10.8 + MacPorts OpenMPI)
# FFCS - added @CNOFLAGS@ according to upstream changes
CCFLAGS = -O3 -Wreturn-type @CFLAGS@ -I'@MPI_INC_DIR@' @CNOFLAGS@
CCFLAGS = -O3 -Wreturn-type @CFLAGS@ -I'@MPI_INC_DIR@' @CNOFLAGS@ -Wno-implicit-function-declaration
FCFLAGS = -O3 @CNOFLAGS@
FCLOADER = $(FC)
CCLOADER = $(CC)
Expand Down
121 changes: 0 additions & 121 deletions 3rdparty/scalapack/scalapack.patch

This file was deleted.

Loading

0 comments on commit 897a6ed

Please sign in to comment.