Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/FreeFem/FreeFem-sources
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
frederichecht committed Aug 26, 2019
2 parents 2bdbfaf + 9b015c4 commit c95ca04
Show file tree
Hide file tree
Showing 49 changed files with 412 additions and 788 deletions.
67 changes: 33 additions & 34 deletions 3rdparty/ff-petsc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PYTHON2?=python2.7
include Makefile.inc
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
dir3rdparty := $(abspath $(dir $(mkfile_path))/..)

W_SUDO:=$(SHELL mkdir -p "$(DESTDIR)$(FF_prefix_petsc)" && test -w "$(DESTDIR)$(FF_prefix_petsc) || echo sudo)
W_SUDO1=$(SHELL ls )
ifeq ($(FF_generic_petsc), yes)
Expand All @@ -39,22 +39,22 @@ ifeq ($(WIN32DLLTARGET),)
## Not on windows ....
FFWINDOWS=false
WITH_SLEPC=yes
FLAGS_CONF_PETSC_REAL= --with-debugging=no \
FLAGS_CONF_PETSC_REAL= --with-debugging=no \
--with-cc='$(MPICC)' --with-cxx='$(MPICXX)' --with-fc='$(MPIFC)' \
COPTFLAGS='-O3 $(FLAGS_MTUNE)' \
CXXOPTFLAGS='-O3 $(FLAGS_MTUNE)' \
FOPTFLAGS='-O3 $(FLAGS_MTUNE)' \
CFLAGS=' $(FLAGS_MTUNE)' \
CXXFLAGS='$(FLAGS_MTUNE)' \
FFLAGS='$(FLAGS_MTUNE)' \
--with-ssl=0 --with-x=0 --with-fortran-bindings=0 \
--with-ssl=0 --with-x=0 --with-fortran-bindings=0 \
--with-scalar-type=real $(WITH_MPI_DIR) $(PETSC_ADDCONF) \
--with-blas-lapack-lib='$(BLAS_LAPACK_LIBS)' \
--download-scalapack --download-metis --download-ptscotch \
--download-mumps --download-ml --download-hypre --download-parmetis \
--download-superlu --download-suitesparse --download-fftw --download-slepc

FLAGS_CONF_PETSC_COMPLEX= --with-debugging=no \
FLAGS_CONF_PETSC_COMPLEX= --with-debugging=no \
--with-cc='$(MPICC)' --with-cxx='$(MPICXX)' --with-fc='$(MPIFC)' \
COPTFLAGS='-O3 $(FLAGS_MTUNE)' \
CXXOPTFLAGS='-O3 $(FLAGS_MTUNE)' \
Expand Down Expand Up @@ -93,34 +93,33 @@ else
--with-ssl=0 --with-x=0 --with-debugging=0 \
--with-mpiexec='/C/Program\ Files/Microsoft\ MPI/Bin/mpiexec' \
--download-f2cblaslapack
#--download-slepc
# --with-blas-lapack-lib='/mingw64/lib/libopenblas.a' \
#--download-slepc
#--with-blas-lapack-lib='/mingw64/lib/libopenblas.a' \


FLAGS_CONF_PETSC_COMPLEX= --with-python-exec=/usr/bin/python2 --with-shared-libraries=0 --with-debugging=no \
--with-cc='$(CC)' --with-cxx='$(CXX)' --with-fc=0 \
COPTFLAGS='-O3 $(FLAGS_MTUNE) -D__int64=long\ long' \
CXXOPTFLAGS='-O3 $(FLAGS_MTUNE) -D__int64=long\ long' \
CFLAGS=' $(FLAGS_MTUNE) -D__int64=long\ long' \
CXXFLAGS='$(FLAGS_MTUNE) -D__int64=long\ long' \
--with-scalar-type=complex \
--with-mpi-lib='$(MPI_LIB)' \
--with-mpi-lib='$(MPI_LIB)' \
--with-mpi-include='$(MPI_INC_DIR)' \
--with-metis-lib=$(dir3rdparty)/lib/parmetis/libmetis.a \
--with-metis-include=$(dir3rdparty)/include/parmetis \
--download-suitesparse \
--with-ssl=0 --with-x=0 --with-debugging=0 \
--with-ssl=0 --with-x=0 --with-debugging=0 \
--with-mpiexec='/C/Program\ Files/Microsoft\ MPI/Bin/mpiexec' \
--download-f2cblaslapack
# --download-slepc

# --download-slepc
# --with-suitesparse-include=$(dir3rdparty)/include \
# --with-suitesparse-lib='[$(dir3rdparty)/lib/libumfpack.a,$(dir3rdparty)/lib/libcholmod.a,$(dir3rdparty)/lib/libcolamd.a,$(dir3rdparty)/lib/libamd.a,$(dir3rdparty)/lib/libsuitesparseconfig.a]' \ --with-suitesparse-lib='[$(dir3rdparty)/lib/libumfpack.a,$(dir3rdparty)/lib/libcolmod.a,$(dir3rdparty)/lib/libcholamd.a,$(dir3rdparty)/lib/libamd.a,$(dir3rdparty)/lib/libsuitesparseconfig.a]' \

endif
all-local:
@echo make ..
@echo make ..
@echo " # To build petsc and slepc do $ make petsc-slepc"
@echo " # warning you have no write acces in $(DESTDIR)$(FF_prefix_petsc)"
@echo " # need sudo if '$(W_SUDO)' == 'sudo' .." $(W_SUDO1)
Expand All @@ -134,7 +133,7 @@ all-local:
# -------------------------------

DIRPKG=../pkg
VERSION=3.11.2
VERSION=3.11.3
VERSION_SLEPC=3.11.0
PACKAGE=../pkg/petsc-lite-$(VERSION).tar.gz
SRCDIR=petsc-$(VERSION)
Expand Down Expand Up @@ -269,28 +268,28 @@ endif
## need include include Make-petsc-download.mk
WHERE-all:Makefile WHERE WHERE-complex
echo >$@
test -z '$(SCALAPACK_LIB)' || echo scalapack LD $(SCALAPACK_LIB) >>$@
test -z '$(SCALAPACK_INCLUDE)' || echo scalapack INCLUDE -I$(SCALAPACK_INCLUDE) >>$@
test -z '$(METIS_LIB)' || echo metis LD $(METIS_LIB) >>$@
test -z '$(METIS_INCLUDE)' || echo metis INCLUDE -I$(METIS_INCLUDE) >>$@
test -z '$(MUMPS_LIB)' || echo mumps LD $(MUMPS_LIB) >>$@
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 '$(FFTW_LIB)' || echo fftw LD $(FFTW_LIB) >>$@
test -z '$(FFTW_INCLUDE)' || echo fftw INCLUDE -I$(FFTW_INCLUDE) >>$@
test -z '$(PTSCOTCH_LIB)' || echo ptscotch LD $(PTSCOTCH_LIB) >>$@
test -z '$(PTSCOTCH_INCLUDE)' || echo ptscotch INCLUDE -I$(PTSCOTCH_INCLUDE) >>$@
test -z '$(PARMETIS_LIB)' || echo parmetis LD $(PARMETIS_LIB) >>$@
test -z '$(PARMETIS_INCLUDE)' || echo parmetis INCLUDE -I$(PARMETIS_INCLUDE) >>$@
test -z '$(SCALAPACK_LIB)' || echo scalapack LD $(SCALAPACK_LIB) >>$@
test -z '$(SCALAPACK_INCLUDE)' || echo scalapack INCLUDE -I$(SCALAPACK_INCLUDE) >>$@
test -z '$(METIS_LIB)' || echo metis LD $(METIS_LIB) >>$@
test -z '$(METIS_INCLUDE)' || echo metis INCLUDE -I$(METIS_INCLUDE) >>$@
test -z '$(MUMPS_LIB)' || echo mumps LD $(MUMPS_LIB) >>$@
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 '$(FFTW_LIB)' || echo fftw LD $(FFTW_LIB) >>$@
test -z '$(FFTW_INCLUDE)' || echo fftw INCLUDE -I$(FFTW_INCLUDE) >>$@
test -z '$(PTSCOTCH_LIB)' || echo ptscotch LD $(PTSCOTCH_LIB) >>$@
test -z '$(PTSCOTCH_INCLUDE)' || echo ptscotch INCLUDE -I$(PTSCOTCH_INCLUDE) >>$@
test -z '$(PARMETIS_LIB)' || echo parmetis LD $(PARMETIS_LIB) >>$@
test -z '$(PARMETIS_INCLUDE)' || echo parmetis INCLUDE -I$(PARMETIS_INCLUDE) >>$@
echo 'petsc LD -Wl,-rpath,"$(DIR_INSTALL_REAL)/lib" -L"$(DIR_INSTALL_REAL)/lib" -lpetsc' >>$@
echo 'petsc INCLUDE -I"$(DIR_INSTALL_REAL)/include"' >>$@
echo 'petsccomplex LD -Wl,-rpath,"$(DIR_INSTALL_COMPLEX)/lib" -L"$(DIR_INSTALL_COMPLEX)/lib" -lpetsc' >>$@
echo 'petsccomplex INCLUDE -I"$(DIR_INSTALL_COMPLEX)/include"' >> $@
test '$(WITH_SLEPC)' = yes || echo 'slepc LD -Wl,-rpath,"$(DIR_INSTALL_REAL)/lib" -L"$(DIR_INSTALL_REAL)/lib" -lslepc' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepc INCLUDE -I"$(DIR_INSTALL_REAL)/include"' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepccomplex LD -Wl,-rpath,"$(DIR_INSTALL_COMPLEX)/lib" -L"$(DIR_INSTALL_COMPLEX)/lib" -lslepc' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepccomplex INCLUDE -I"$(DIR_INSTALL_COMPLEX)/include"' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepc LD -Wl,-rpath,"$(DIR_INSTALL_REAL)/lib" -L"$(DIR_INSTALL_REAL)/lib" -lslepc' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepc INCLUDE -I"$(DIR_INSTALL_REAL)/include"' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepccomplex LD -Wl,-rpath,"$(DIR_INSTALL_COMPLEX)/lib" -L"$(DIR_INSTALL_COMPLEX)/lib" -lslepc' >>$@
test '$(WITH_SLEPC)' = yes || echo 'slepccomplex INCLUDE -I"$(DIR_INSTALL_COMPLEX)/include"' >>$@

#
else
Expand All @@ -304,7 +303,7 @@ WHERE-all:Makefile Make-petsc-download.mk
endif
$(SRCDIR)/tag-tar:$(PACKAGE)
tar xvzf $(PACKAGE)
patch -p1 < petsc-3.11.2.patch
patch -p1 < petsc-metis.patch
touch $@
$(PACKAGE):
../getall -o PETSc -a
Expand Down Expand Up @@ -335,7 +334,7 @@ ifeq ($(WITH_SLEPC),yes)
echo 'slepc LD -Wl,-rpath,"$(DIR_INSTALL_REAL)/lib" -L"$(DIR_INSTALL_REAL)/lib" -lslepc' > $@
echo 'slepc INCLUDE -I"$(DIR_INSTALL_REAL)/include"' >> $@
else
echo "sorry no SLEPC"
echo "sorry no SLEPC"
endif

clean:clean-local
Expand Down
66 changes: 0 additions & 66 deletions 3rdparty/ff-petsc/petsc-3.11.2.patch

This file was deleted.

12 changes: 12 additions & 0 deletions 3rdparty/ff-petsc/petsc-metis.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/petsc-3.11.3/config/BuildSystem/config/packages/metis.py b/petsc-3.11.3/config/BuildSystem/config/packages/metis.py
index 136526da05..2d1c4d3271 100644
--- a/petsc-3.11.3/config/BuildSystem/config/packages/metis.py
+++ b/petsc-3.11.3/config/BuildSystem/config/packages/metis.py
@@ -42,6 +42,7 @@ 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)+'"')
+ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER'])
return args

def configureLibrary(self):
6 changes: 3 additions & 3 deletions 3rdparty/getall
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ download('TetGen','http://www.tetgen.org/1.5/src/tetgen1.5.1-beta1.tar.gz',
'tetgen1.5.1-beta1.tar.gz',
'3d55c197bcbfc611b7ced6f343643756');

download('PETSc','http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.11.2.tar.gz',
download('PETSc','http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.11.3.tar.gz',
'http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/',
'petsc-lite-3.11.2.tar.gz',
'ccd4f1e07edc453a74b52fd9a0c52a1c');
'petsc-lite-3.11.3.tar.gz',
'e04cbb1aaccde4a33c8843e75a1fba15');

download('htool','https://github.com/PierreMarchand20/htool/archive/4af73fa94bd9ac7c81aba8191cb5da31da5f767a.zip',
'https://github.com/PierreMarchand20/',
Expand Down
11 changes: 4 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ m4_define([AC_FF_PETSC_WHERELIB],
[
ff_$2=`AC_FF_PETSC_AWK($2,$4)`
ff_$3=`AC_FF_PETSC_AWK($3,$4)`
if test -n "$5" ; then
ff_$2="[$]ff_$2 `AC_FF_PETSC_AWK($5,$4)`"
fi
if test -n "[$]ff_$2"; then
ff_$1_ok=yes;
AC_FF_ADDWHERELIB($1,[$]ff_$2,[$]ff_$3)
Expand Down Expand Up @@ -989,8 +986,8 @@ if test "$with_petsc" != no -a $ff_mpi = yes; then
test "$PETSC_SCALAR" = "real" && test "$ff_win32" = yes -o "$PETSC_MPIRUN" = "$MPIRUN" || cmp -s "$WPETSC_MPIRUN" "$WMPIRUN"
if test "$?" -eq 0 ; then
AC_FF_PETSC_WHERELIB_BASIC(petsc,$ffconfpetsc)
AC_FF_PETSC_WHERELIB(parmetis,PARMETIS_LIB,PARMETIS_INCLUDE,$ffconfpetsc,METIS_LIB)
dnl AC_FF_PETSC_WHERELIB(metis,METIS_LIB,METIS_INCLUDE,$ffconfpetsc)
AC_FF_PETSC_WHERELIB(parmetis,PARMETIS_LIB,PARMETIS_INCLUDE,$ffconfpetsc)
AC_FF_PETSC_WHERELIB(metis,METIS_LIB,METIS_INCLUDE,$ffconfpetsc)
AC_FF_PETSC_WHERELIB(ptscotch,PTSCOTCH_LIB,PTSCOTCH_INCLUDE,$ffconfpetsc)
ff_SCOTCH_INCLUDE=$ff_PTSCOTCH_INCLUDE
ff_SCOTCH_LIB=`echo $ff_PTSCOTCH_LIB | sed -e 's/@<:@^ @:>@*ptscotch@<:@^ @:>@*//g' | sed -e 's/@<:@^ @:>@*ptes@<:@^ @:>@*//g'`
Expand Down Expand Up @@ -1047,8 +1044,8 @@ if test "$with_petsc_complex" != no -a $ff_mpi = yes; then
test "$PETSC_COMPLEX_SCALAR" = "complex" && test "$ff_win32" = yes -o "$PETSC_COMPLEX_MPIRUN" = "$MPIRUN" || cmp -s `which "$PETSC_COMPLEX_MPIRUN"` `which "$MPIRUN"`
if test "$?" -eq 0 ; then
AC_FF_PETSC_WHERELIB_BASIC(petsccomplex,$ffconfpetscc)
AC_FF_PETSC_WHERELIB(parmetis,PARMETIS_LIB,PARMETIS_INCLUDE,$ffconfpetscc,METIS_LIB)
dnl AC_FF_PETSC_WHERELIB(metis,METIS_LIB,METIS_INCLUDE,$ffconfpetscc)
AC_FF_PETSC_WHERELIB(parmetis,PARMETIS_LIB,PARMETIS_INCLUDE,$ffconfpetscc)
AC_FF_PETSC_WHERELIB(metis,METIS_LIB,METIS_INCLUDE,$ffconfpetscc)
AC_FF_PETSC_WHERELIB(ptscotch,PTSCOTCH_LIB,PTSCOTCH_INCLUDE,$ffconfpetscc)
ff_SCOTCH_INCLUDE=$ff_PTSCOTCH_INCLUDE
ff_SCOTCH_LIB=`echo $ff_PTSCOTCH_LIB | sed -e 's/@<:@^ @:>@*ptscotch@<:@^ @:>@*//g' | sed -e 's/@<:@^ @:>@*ptes@<:@^ @:>@*//g'`
Expand Down
2 changes: 0 additions & 2 deletions idp/ffddm.idp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ IFMACRO(WITHHPDDM)
load "hpddm"
ENDIFMACRO

load "thresholdings"

include "ffddm_partitioning.idp"

include "ffddm_coarsemeshCS.idp"
Expand Down
1 change: 0 additions & 1 deletion idp/macro_ddm.idp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load "thresholdings"
include "getARGV.idp"
IFMACRO(!partitioner)
macro partitioner()metis// EOM
Expand Down
Loading

0 comments on commit c95ca04

Please sign in to comment.