Skip to content

Commit 6b65b3a

Browse files
authored
Merge pull request #3 from firedrakeproject/ksagiyam/merge_upstream
Ksagiyam/merge upstream
2 parents e438e49 + 91c97c5 commit 6b65b3a

File tree

337 files changed

+2722
-2098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+2722
-2098
lines changed

.gitlab-ci.yml

Lines changed: 98 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ variables:
4747
- nproc
4848
- lscpu
4949
- ccache --zero-stats
50+
- if [ ! -z ${LOAD_MODULES+x} ]; then module load ${LOAD_MODULES}; module list; fi
5051
- printf "PYTHON:${PYTHON}\n"
5152
script:
5253
- printf "PETSC_CONFIG_OPTS:${PETSC_CONFIG_OPTS}\n"
@@ -122,8 +123,9 @@ variables:
122123
gnu-c-single-nofort:
123124
extends: .stage-1
124125
tags:
125-
- linux-ubuntu, name:hapy
126+
- name:hapy
126127
variables:
128+
LOAD_MODULES: mpi
127129
PETSC_CONFIG_OPTS: --with-fc=0 --with-precision=single
128130
TEST_SEARCH: eps_tests-test10_1
129131

@@ -212,15 +214,15 @@ gnu-lint:
212214
- bash -c "${PYTHON} ./configure ${SLEPC_CONFIG_OPTS}"
213215
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}"
214216
- if [ ! -z ${INSTALL+x} ]; then make install; SLEPC_DIR=$INSTALL_DIR; fi
215-
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check
217+
- if [ -z ${DISABLE_TESTS+x} ]; then make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check; fi
216218
- if [ ! -z ${PKG_CONFIG+x} ]; then make check_usermakefile PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig; fi
217-
- if [ ! -z ${BUILD_DOCS+x} ]; then make alldoc LOC=$SLEPC_DIR; tar czf ${CI_JOB_NAME}-docs.tar.gz --exclude "*.out" --exclude "makefile*" --exclude "ftn-*" --exclude slepc4py docs include src; fi
219+
- if [ ! -z ${BUILD_DOCS+x} ]; then make alldoc LOC=$SLEPC_DIR; tar czf ${CI_JOB_NAME}-docs.tar.gz --exclude "*.out" --exclude "makefile*" --exclude "ftn-auto*" --exclude slepc4py docs include src; fi
218220
- if [ ! -z ${BUILD_DOCS+x} ] && [ ! -z ${SLEPC4PY+x} ]; then make -C src/binding/slepc4py rst2html sphinx-html sphinx-pdf PYTHON=${PYTHON}; tar czf ${CI_JOB_NAME}-docs-py.tar.gz -C src/binding/slepc4py docs; fi
219221
- echo -e "section_end:`date +%s`:build_slepc\r\e[0K"
220222
- echo -e "section_start:`date +%s`:tests_slepc\r\e[0KSLEPc test suite"
221223
- if [ ! -z ${SLEPC4PY+x} ]; then make slepc4pytest; make -C src/binding/slepc4py/demo PYTHON=${PYTHON}; fi
222224
- if [ -z ${DISABLE_TESTS+x} ]; then make cleantest; make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" allgtests-tap TIMEOUT=${TIMEOUT} ${TEST_OPTS}; fi
223-
- if [ ! -z ${COVERAGE+x} ]; then lcov --capture --exclude "/usr/*" --directory $SLEPC_DIR --output-file coverage.info; genhtml coverage.info --legend --title SLEPc --output-directory coverage; tar czf ${CI_JOB_NAME}-cov.tar.gz coverage; fi
225+
- if [ ! -z ${COVERAGE+x} -a -z ${DISABLE_TESTS+x} ]; then lcov --capture --exclude "/usr/*" --directory $SLEPC_DIR --output-file coverage.info; genhtml coverage.info --legend --title SLEPc --output-directory coverage; tar czf ${CI_JOB_NAME}-cov.tar.gz coverage; fi
224226
- echo -e "section_end:`date +%s`:tests_slepc\r\e[0K"
225227
artifacts:
226228
reports:
@@ -364,8 +366,9 @@ gnu-c-cuda:
364366
- .stage-2
365367
- .linux_test
366368
tags:
367-
- linux-ubuntu, gpu:nvidia, name:hapy
369+
- gpu:nvidia, name:hapy
368370
variables:
371+
LOAD_MODULES: mpi
369372
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-cuda --download-mumps --download-scalapack --download-metis --download-parmetis --download-suitesparse --with-magma-dir=/usr/local/opt/magma-2.7.1
370373

371374
clang-c:
@@ -385,8 +388,8 @@ gnu-c-complex-multilib:
385388
tags:
386389
- linux-ubuntu, name:maat
387390
variables:
388-
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-single-library=0 --download-elemental --download-metis --download-parmetis --download-scalapack
389-
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-elpa
391+
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-single-library=0 --download-metis --download-parmetis --download-scalapack --with-cxx-dialect=17
392+
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-elpa --with-fortran-bindings-inplace
390393

391394
intel-c-complex-mkl:
392395
extends:
@@ -407,7 +410,7 @@ gnu-c-libs:
407410
- linux-suse, name:igai
408411
variables:
409412
PETSC_CONFIG_OPTS: --with-single-library=0 --download-scalapack
410-
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-arpack --download-evsl --download-primme --download-blopex --download-trlan --with-packages-download-dir=/var/local/downloads
413+
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --download-arpack --download-evsl --download-primme --download-blopex --download-trlan --download-slicot --with-packages-download-dir=/var/local/downloads
411414

412415
gnu-cxx-int64:
413416
extends:
@@ -443,7 +446,7 @@ pip-install:
443446
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' include/slepcversion.h) == 1 ]; then
444447
pip install --user .;
445448
pip install --user src/binding/slepc4py;
446-
make -C src/binding/slepc4py/demo run_ex1; # run only one test until pip-petsc4py is patched
449+
make -C src/binding/slepc4py/demo;
447450
else
448451
slepc=$PWD;
449452
cd ..;
@@ -458,7 +461,7 @@ pip-install:
458461
python -m venv /tmp/env;
459462
source /tmp/env/bin/activate;
460463
set -x;
461-
pip install -U pip;
464+
python -m pip install -U pip==23.0.1 # pin version due to issue with pip 23.1
462465
pip install numpy;
463466
pip install $petsc;
464467
pip install $petsc/src/binding/petsc4py;
@@ -469,6 +472,72 @@ pip-install:
469472
after_script:
470473
- date
471474

475+
#
476+
# Special job in stage-3 to check DESTDIR install (only in scheduled pipelines).
477+
#
478+
479+
destdir-install:
480+
extends:
481+
- .stage-3-sched
482+
- .linux_test
483+
tags:
484+
- name:hapy
485+
before_script:
486+
- date
487+
- hostname
488+
- grep PRETTY_NAME /etc/os-release
489+
- nproc
490+
- lscpu
491+
script:
492+
- printf "PETSC_CONFIG_OPTS:${PETSC_CONFIG_OPTS}\n"
493+
- export SLEPC_DIR=$PWD
494+
- echo -e "section_start:`date +%s`:build_petsc\r\e[0KPETSc configure and make"
495+
- cd ..
496+
- export DESTDIR=${PWD}/destdir
497+
- export PREFIX=${PWD}/prefix
498+
- rm -rf ${DESTDIR} ${PREFIX}
499+
- if [ ! -d petsc ]; then git clone https://gitlab.com/petsc/petsc.git; fi
500+
- cd petsc
501+
- git clean ${GIT_CLEAN_FLAGS}
502+
- git fetch
503+
- |
504+
if [ -z ${PETSC_BRANCH+x} ]; then
505+
if [ $(awk '/define SLEPC_VERSION_RELEASE/{print $3}' $SLEPC_DIR/include/slepcversion.h) == 1 ];
506+
then git checkout origin/release;
507+
else git checkout origin/main;
508+
fi
509+
else
510+
echo "Using PETSC_BRANCH=" $PETSC_BRANCH
511+
git checkout origin/$PETSC_BRANCH
512+
fi
513+
- export PETSC_DIR=$PWD
514+
- export PETSC_ARCH=arch-$CI_JOB_NAME
515+
- bash -c "${PYTHON} ./configure --with-debugging=0 --with-mpi=0 --prefix=${PREFIX} COPTFLAGS=-O CXXOPTFLAGS=-O FOPTFLAGS=-O CUDAOPTFLAGS=-O1 ${PETSC_CONFIG_OPTS}"
516+
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}"
517+
- make install-lib DESTDIR=${DESTDIR}; cp -r ${DESTDIR}${PREFIX} ..; PETSC_DIR=${PREFIX}; unset PETSC_ARCH
518+
- echo -e "section_end:`date +%s`:build_petsc\r\e[0K"
519+
- echo -e "section_start:`date +%s`:build_slepc\r\e[0KSLEPc configure and make"
520+
- cd $SLEPC_DIR
521+
- ${PYTHON} ./configure --prefix=${PREFIX}
522+
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}"
523+
- make install-lib DESTDIR=${DESTDIR}; cp -r ${DESTDIR}${PREFIX} ..; SLEPC_DIR=${PREFIX}
524+
- make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check
525+
- echo -e "section_end:`date +%s`:build_slepc\r\e[0K"
526+
variables:
527+
PYTHON: python3
528+
MAKE_CFLAGS: -Werror
529+
MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant
530+
MAKE_FFLAGS: -Werror
531+
after_script:
532+
- date
533+
artifacts:
534+
name: "$CI_JOB_NAME"
535+
when: always
536+
paths:
537+
- arch-*/lib/slepc/conf/*.log
538+
- arch-*/lib/slepc/conf/slepc*
539+
expire_in: 4 days
540+
472541
#
473542
# The following tests run as part of stage-3.
474543
#
@@ -478,8 +547,9 @@ gnu-c-cuda-complex:
478547
- .stage-3
479548
- .linux_test
480549
tags:
481-
- linux-ubuntu, gpu:nvidia, name:hapy
550+
- gpu:nvidia, name:hapy
482551
variables:
552+
LOAD_MODULES: mpi
483553
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
484554
TEST_OPTS: -j1 -l6 query=requires queryval=cuda
485555

@@ -488,8 +558,9 @@ gnu-c-cuda-single:
488558
- .stage-3
489559
- .linux_test
490560
tags:
491-
- linux-ubuntu, gpu:nvidia, name:hapy
561+
- gpu:nvidia, name:hapy
492562
variables:
563+
LOAD_MODULES: mpi
493564
PETSC_CONFIG_OPTS: --with-precision=single --with-single-library=0 --with-cuda
494565
TEST_OPTS: -j1 -l6 query=requires queryval=cuda
495566

@@ -626,10 +697,11 @@ gnu-c-complex-coverage:
626697
- .stage-3
627698
- .linux_test
628699
tags:
629-
- linux-ubuntu, name:hapy
700+
- name:hapy
630701
variables:
702+
LOAD_MODULES: mpi
631703
PETSC_CONFIG_OPTS: --with-fortran-bindings=0 --with-scalar-type=complex --with-debugging=1 --with-coverage=1
632-
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-arpack-dir=/usr/local/opt/arpack-ng-3.8.0 --with-primme-dir=/usr/local/opt/primme-3.2 --download-blopex --download-hpddm
704+
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --with-arpack-dir=/usr/local/opt/arpack-ng-3.9.0 --with-primme-dir=/usr/local/opt/primme-3.2 --download-blopex --download-hpddm
633705
COVERAGE: 1
634706

635707
intel-c-complex-int64-mkl:
@@ -648,7 +720,7 @@ nvidia-c-nompi:
648720
- .stage-3
649721
- .linux_test_noflags
650722
tags:
651-
- linux-ubuntu, compiler:nvidia, name:hapy
723+
- compiler:nvidia, name:hapy
652724
variables:
653725
LOAD_MODULES: nvhpc-nompi
654726
PETSC_CONFIG_OPTS: --with-cc=nvc --with-fc=nvfortran --with-cxx=nvc++ --with-mpi=0 --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
@@ -681,10 +753,10 @@ nvidia-c-complex-nompi:
681753
- .stage-3
682754
- .linux_test_noflags
683755
tags:
684-
- linux-ubuntu, compiler:nvidia, name:hapy
756+
- compiler:nvidia, name:hapy
685757
variables:
686758
LOAD_MODULES: nvhpc-nompi
687-
PETSC_CONFIG_OPTS: --with-cc=nvc --with-fc=nvfortran --with-cxx=nvc++ --with-scalar-type=complex --with-mpi=0 --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
759+
PETSC_CONFIG_OPTS: --with-cc=nvc --with-fc=nvfortran --with-cxx=nvc++ --with-scalar-type=complex --with-mpi=0 --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1-nvidia
688760
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-blopex --download-primme --download-arpack
689761
TEST_OPTS: -j4 -l12
690762

@@ -693,10 +765,10 @@ nvidia-cxx-mpi:
693765
- .stage-3
694766
- .linux_test_noflags
695767
tags:
696-
- linux-ubuntu, compiler:nvidia, name:hapy
768+
- compiler:nvidia, name:hapy
697769
variables:
698770
LOAD_MODULES: nvhpc
699-
PETSC_CONFIG_OPTS: --with-cc=mpicc --with-fc=mpifort --with-cxx=mpicxx --with-clanguage=c++ --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1
771+
PETSC_CONFIG_OPTS: --with-cc=mpicc --with-fc=mpifort --with-cxx=mpicxx --with-clanguage=c++ --with-cuda --with-magma-dir=/usr/local/opt/magma-2.7.1-nvidia
700772
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-blopex --download-primme --download-arpack
701773
TEST_OPTS: -j4 -l12
702774

@@ -737,8 +809,9 @@ gnu-c-cuda-int64:
737809
- .stage-3
738810
- .linux_test
739811
tags:
740-
- linux-ubuntu, gpu:nvidia, name:hapy
812+
- gpu:nvidia, name:hapy
741813
variables:
814+
LOAD_MODULES: mpi
742815
PETSC_CONFIG_OPTS: --with-cuda --with-64-bit-indices --with-magma-dir=/usr/local/opt/magma-2.7.1
743816
TEST_OPTS: -j2 -l6 query=requires queryval=cuda
744817
MAKE_CUDAFLAGS: --compiler-options -Wall,-Wunused-parameter,-Wno-deprecated-declarations,-Werror
@@ -758,8 +831,9 @@ gnu-c-complex128:
758831
- .stage-3
759832
- .linux_test
760833
tags:
761-
- linux-debian, name:sejmet
834+
- name:hapy
762835
variables:
836+
LOAD_MODULES: mpi
763837
PETSC_CONFIG_OPTS: --with-scalar-type=complex --download-f2cblaslapack --with-precision=__float128 --with-clanguage=c++
764838
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local
765839

@@ -768,9 +842,9 @@ intel-c-int64-nompi-mkl:
768842
- .stage-3
769843
- .linux_test_nofflags
770844
tags:
771-
- compiler:intel, name:igai
845+
- compiler:intel, name:jepri
772846
variables:
773-
LOAD_MODULES: icc mpi mkl
774-
PETSC_CONFIG_OPTS: --with-cc=icc --with-fc=ifort --with-cxx=icpc --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-64-bit-indices --with-64-bit-blas-indices --with-mpi=0
847+
LOAD_MODULES: compiler mpi mkl
848+
PETSC_CONFIG_OPTS: --with-cc=icx --with-fc=ifx --with-cxx=icpx --with-blaslapack-dir=/opt/intel/oneapi/mkl/latest --with-64-bit-indices --with-64-bit-blas-indices --with-mpi=0 --COPTFLAGS='-O -g -fp-model=precise' --CXXOPTFLAGS='-O -g -fp-model=precise' --FOPTFLAGS='-O -g -fp-model=precise'
775849
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme --download-arpack
776850

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ The development of SLEPc has been partially supported by the following grants:
6262
- Ministerio de Economia y Competitividad, TIN2013-41049-P.
6363
- Agencia Estatal de Investigacion, TIN2016-75985-P.
6464
- Agencia Estatal de Investigacion, PID2019-107379RB-I00.
65+
- Agencia Estatal de Investigacion, PID2022-139568NB-I00.
6566

config/configure.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,19 @@ def fixLang(lang):
265265
for pkg in petscpackages + externalpackages:
266266
if hasattr(pkg,'havepackage') and pkg.havepackage: slepcconf.write(pkg.packagename+':')
267267
slepcconf.write('"\n#endif\n')
268+
libflags = []
269+
includeflags = []
270+
for pkg in externalwithdeps:
271+
if hasattr(pkg,'havepackage') and pkg.havepackage:
272+
for entry in pkg.libflags.split():
273+
if entry not in libflags:
274+
libflags.append(entry)
275+
if hasattr(pkg,'includeflags'):
276+
for entry in pkg.includeflags.split():
277+
if entry not in includeflags:
278+
includeflags.append(entry)
279+
slepcvars.write('SLEPC_EXTERNAL_LIB = '+' '.join(libflags)+'\n')
280+
slepcvars.write('SLEPC_EXTERNAL_INCLUDES = '+' '.join(includeflags)+'\n')
268281

269282
log.NewSection('Writing various configuration files...')
270283

@@ -283,8 +296,9 @@ def fixLang(lang):
283296
# Write pkg-config configuration file
284297
pkgconfdir = slepc.CreateDir(libdir,'pkgconfig')
285298
log.write('pkg-config file in '+pkgconfdir)
286-
with slepc.CreateFile(pkgconfdir,'slepc.pc') as pkgconfig:
287-
WritePkgconfigFile(pkgconfig,slepc.lversion,petsc.version,slepc.dir,slepc.isinstall,slepc.prefixdir,petsc.singlelib)
299+
for pkfile in ['SLEPc.pc','slepc.pc']:
300+
with slepc.CreateFile(pkgconfdir,pkfile) as pkgconfig:
301+
WritePkgconfigFile(pkgconfig,slepc.lversion,petsc.version,slepc.dir,slepc.isinstall,slepc.prefixdir,petsc.singlelib)
288302

289303
# Write reconfigure file
290304
if not slepc.isinstall:

config/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def fixConfFile(self, src):
277277

278278
def fixConf(self):
279279
import shutil
280-
for file in ['slepc_rules', 'slepc_rules.doc', 'slepc_variables', 'slepcrules', 'slepcvariables']:
280+
for file in ['slepc_rules', 'slepc_rules.doc', 'slepc_rules.utils', 'slepc_variables', 'slepcrules', 'slepcvariables']:
281281
self.fixConfFile(os.path.join(self.destConfDir,file))
282282
self.fixConfFile(os.path.join(self.destLibDir,'pkgconfig','slepc.pc'))
283283
self.fixConfFile(os.path.join(self.destIncludeDir,'slepcconf.h'))

config/package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ def FortranLib(self,slepcconf,slepcvars,dirs,libs,functions,callbacks = []):
491491

492492
slepcconf.write('#define SLEPC_HAVE_' + name + ' 1\n#define SLEPC_' + name + '_HAVE_'+mangling+' 1\n')
493493
slepcvars.write(name + '_LIB = '+flags+'\n')
494+
self.libflags = flags
494495
self.havepackage = True
495496
self.packageflags = flags
496497

config/packages/arpack.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ def DownloadAndInstall(self,slepcconf,slepcvars,slepc,petsc,archdir,prefixdir):
9191
confopt = ['-DCMAKE_INSTALL_PREFIX='+prefixdir, '-DCMAKE_INSTALL_NAME_DIR:STRING="'+os.path.join(prefixdir,'lib')+'"', '-DCMAKE_INSTALL_LIBDIR:STRING="lib"', '-DCMAKE_C_COMPILER="'+petsc.cc+'"', '-DCMAKE_C_FLAGS:STRING="'+petsc.getCFlags()+'"', '-DCMAKE_Fortran_COMPILER="'+petsc.fc+'"', '-DCMAKE_Fortran_FLAGS:STRING="'+petsc.getFFlags()+'"', '-DBLAS_LIBRARIES="'+petsc.blaslapack_lib+'"']
9292
if not petsc.mpiuni and not petsc.msmpi:
9393
confopt = confopt + ['-DMPI=ON', '-DMPI_C_COMPILER="'+petsc.cc+'"', '-DMPI_Fortran_COMPILER="'+petsc.fc+'"']
94-
confopt = confopt + ['-DCMAKE_BUILD_TYPE='+ ('Debug' if petsc.debug else 'Release')]
94+
confopt.append('-DCMAKE_BUILD_TYPE='+('Debug' if petsc.debug else 'Release'))
9595
if petsc.buildsharedlib:
9696
confopt = confopt + ['-DBUILD_SHARED_LIBS=ON', '-DCMAKE_INSTALL_RPATH:PATH='+os.path.join(prefixdir,'lib')]
9797
else:
98-
confopt = confopt + ['-DBUILD_SHARED_LIBS=OFF']
98+
confopt.append('-DBUILD_SHARED_LIBS=OFF')
9999
if petsc.ind64:
100-
confopt = confopt + ['-DINTERFACE64=1']
100+
confopt.append('-DINTERFACE64=1')
101101
if 'MSYSTEM' in os.environ:
102-
confopt = confopt + ['-G "MSYS Makefiles"']
102+
confopt.append('-G "MSYS Makefiles"')
103103
(result,output) = self.RunCommand('cd '+builddir+' && '+petsc.cmake+' '+' '.join(confopt)+' '+self.buildflags+' .. && '+petsc.make+' -j'+petsc.make_np+' && '+petsc.make+' install')
104104

105105
else: # Build with autoreconf
@@ -112,9 +112,9 @@ def DownloadAndInstall(self,slepcconf,slepcvars,slepc,petsc,archdir,prefixdir):
112112
if not petsc.mpiuni and not petsc.msmpi:
113113
confopt = confopt + ['--enable-mpi MPICC="'+petsc.cc+'"', 'MPIF77="'+petsc.fc+'"', 'MPIFC="'+petsc.fc+'"']
114114
if not petsc.buildsharedlib:
115-
confopt = confopt + ['--disable-shared']
115+
confopt.append('--disable-shared')
116116
if petsc.ind64:
117-
confopt = confopt + ['INTERFACE64=1']
117+
confopt.append('INTERFACE64=1')
118118
(result,output) = self.RunCommand('cd '+builddir+'&& sh bootstrap && ./configure '+' '.join(confopt)+' && '+petsc.make+' -j'+petsc.make_np+' && '+petsc.make+' install')
119119

120120
if result:

config/packages/blopex.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ def Check(self,slepcconf,slepcvars,petsc,archdir):
6464
f = ['-I' + includes[0]]
6565
(result, output) = self.Link([],[],' '.join(l+f),code,' '.join(f),petsc.language)
6666
if result:
67+
self.libflags = ' '.join(l)
68+
self.includeflags = ' '.join(f)
6769
slepcconf.write('#define SLEPC_HAVE_BLOPEX 1\n')
68-
slepcvars.write('BLOPEX_LIB = ' + ' '.join(l) + '\n')
69-
slepcvars.write('BLOPEX_INCLUDE = ' + ' '.join(f) + '\n')
70+
slepcvars.write('BLOPEX_LIB = ' + self.libflags + '\n')
71+
slepcvars.write('BLOPEX_INCLUDE = ' + self.includeflags + '\n')
7072
self.havepackage = True
7173
self.packageflags = ' '.join(l+f)
7274
return
@@ -113,9 +115,11 @@ def DownloadAndInstall(self,slepcconf,slepcvars,slepc,petsc,archdir,prefixdir):
113115
self.log.Exit('Unable to link with downloaded BLOPEX')
114116

115117
# Write configuration files
118+
self.libflags = l
119+
self.includeflags = f
116120
slepcconf.write('#define SLEPC_HAVE_BLOPEX 1\n')
117-
slepcvars.write('BLOPEX_LIB = ' + l + '\n')
118-
slepcvars.write('BLOPEX_INCLUDE = ' + f + '\n')
121+
slepcvars.write('BLOPEX_LIB = ' + self.libflags + '\n')
122+
slepcvars.write('BLOPEX_INCLUDE = ' + self.includeflags + '\n')
119123

120124
self.havepackage = True
121125
self.packageflags = l+' '+f

0 commit comments

Comments
 (0)