Skip to content

Commit cfa8758

Browse files
authored
Merge pull request #9 from firedrakeproject/connorjward/merge-upstream
Merge upstream
2 parents 1c45024 + 8414ebc commit cfa8758

File tree

41 files changed

+232
-297
lines changed

Some content is hidden

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

41 files changed

+232
-297
lines changed

.gitlab-ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -870,16 +870,16 @@ intel-c-int64-nompi-mkl:
870870
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'
871871
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme --download-arpack
872872

873-
#gnu-c-hip-complex: # TODO
874-
# extends:
875-
# - .stage-3
876-
# - .linux_test
877-
# tags:
878-
# - gpu:amd, name:satet
879-
# variables:
880-
# LOAD_MODULES: rocm
881-
# PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-hip
882-
# TEST_OPTS: -j1 -l6 query=requires queryval=hip
873+
gnu-c-hip-complex:
874+
extends:
875+
- .stage-3
876+
- .linux_test
877+
tags:
878+
- gpu:amd, name:satet
879+
variables:
880+
LOAD_MODULES: rocm
881+
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-hip
882+
TEST_OPTS: query=requires queryval=hip
883883

884884
gnu-c-hip-single:
885885
extends:

config/install.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,11 @@ def copyLib(self, src, dst):
520520
if os.path.splitext(dst)[1] == '.'+self.arLibSuffix:
521521
if not 'win32fe' in self.petscCC:
522522
(result, output) = subprocess.getstatusoutput(self.ranlib+' '+dst)
523-
if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'):
524-
(result, output) = subprocess.getstatusoutput('otool -D '+src)
525-
oldname = output[output.find("\n")+1:]
523+
if os.path.splitext(dst)[1] == '.dylib' and shutil.which('otool') and shutil.which('install_name_tool'):
524+
output = subprocess.check_output(['otool', '-D', src], universal_newlines=True)
525+
oldname = output.splitlines()[1]
526526
installName = oldname.replace(os.path.realpath(self.archDir), self.installDir)
527-
(result, output) = subprocess.getstatusoutput('/usr/bin/install_name_tool -id '+installName+' '+dst)
527+
subprocess.check_output(['install_name_tool', '-id', installName, dst])
528528
# preserve the original timestamps - so that the .a vs .so time order is preserved
529529
shutil.copystat(src,dst)
530530
return

config/packages/slepc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ def Process(self,slepcconf,slepcvars,slepcrules,slepc,petsc,archdir=''):
6464
slepcvars.write('SHLIBS = libslepc\n')
6565
slepcvars.write('LIBNAME = '+os.path.join('${INSTALL_LIB_DIR}','libslepc.${AR_LIB_SUFFIX}')+'\n')
6666
for module in ['SYS','EPS','SVD','PEP','NEP','MFN','LME']:
67-
slepcvars.write('SLEPC_'+module+'_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
68-
slepcvars.write('SLEPC_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
69-
else:
70-
slepcvars.write('SLEPC_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} ${SLEPC_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}\n')
67+
slepcvars.write('SLEPC_'+module+'_LIB_NOPETSC = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
68+
slepcvars.write('SLEPC_LIB_NOPETSC = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
7169

7270
def ShowInfo(self):
7371
self.log.Println('\nSLEPc directory:\n '+self.dir)

gmakefile.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ endef
231231

232232
# link line constructed differently for gmakefile vs gmakefile.test invocation
233233
#ifeq ($(libslepcall),)
234-
SLEPC_TEST_LIB = $(SLEPC_LIB) $(PETSC_SNES_LIB)
234+
SLEPC_TEST_LIB = $(SLEPC_LIB)
235235
#else
236236
#SLEPC_TEST_LIB = $(SLEPC_LIB)
237237
#SLEPC_TEST_LIB = $(C_SH_LIB_PATH) $(SLEPC_EXTERNAL_LIB_BASIC)
@@ -447,6 +447,7 @@ help-nontest:
447447
-@echo " slepc_libs - build (update) the SLEPc and related libraries"
448448
-@echo " check - run a basic check that the libraries are built correctly and can be used"
449449
-@echo " "
450+
-@echo " getversion_slepc - print the SLEPc version, or $$""SLEPC_DIR/lib/slepc/bin/petscversion"
450451
-@echo " getlinklibs_slepc - print the libraries that a SLEPc application must link against"
451452
-@echo " getincludedirs_slepc - print the include directories that a SLEPc application must be compiled against"
452453
-@echo " getcflags - print the C compiler flags PETSc is using"
@@ -458,7 +459,7 @@ help-nontest:
458459
-@echo " test - use \"make -f gmakefile.test help\" for help on running the extensive tests"
459460
-@echo
460461
-@echo "Developer rules:"
461-
-@echo " clean - delete libraries and Fortran module files (used in $SLEPC_DIR)"
462+
-@echo " clean - delete libraries and Fortran module files (used in $$""SLEPC_DIR)"
462463
-@echo " lint_slepc - run lint on the source code, including its embedded documentation"
463464
-@echo " delete compiled examples, .o and related files (used in tutorials or test directories)"
464465
-@echo " clang-tidy - run clang-tidy on the SLEPc C code"

include/slepccupmblas.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,17 @@
2121
/* complex single */
2222
#if defined(PETSC_USE_COMPLEX)
2323
#if defined(PETSC_USE_REAL_SINGLE)
24-
#define cublasXdotc(a,b,c,d,e,f,g) cublasCdotc((a),(b),(const cuComplex *)(c),(d),(const cuComplex *)(e),(f),(cuComplex *)(g))
2524
#define cublasXgetrfBatched(a,b,c,d,e,f,g) cublasCgetrfBatched((a),(b),(cuComplex**)(c),(d),(e),(f),(g))
2625
#define cublasXgetrsBatched(a,b,c,d,e,f,g,h,i,j,k) cublasCgetrsBatched((a),(b),(c),(d),(const cuComplex**)(e),(f),(g),(cuComplex**)(h),(i),(j),(k))
2726
#else /* complex double */
28-
#define cublasXdotc(a,b,c,d,e,f,g) cublasZdotc((a),(b),(const cuDoubleComplex *)(c),(d),(const cuDoubleComplex *)(e),(f),(cuDoubleComplex *)(g))
2927
#define cublasXgetrfBatched(a,b,c,d,e,f,g) cublasZgetrfBatched((a),(b),(cuDoubleComplex**)(c),(d),(e),(f),(g))
3028
#define cublasXgetrsBatched(a,b,c,d,e,f,g,h,i,j,k) cublasZgetrsBatched((a),(b),(c),(d),(const cuDoubleComplex**)(e),(f),(g),(cuDoubleComplex**)(h),(i),(j),(k))
3129
#endif
3230
#else /* real single */
3331
#if defined(PETSC_USE_REAL_SINGLE)
34-
#define cublasXdotc cublasSdot
3532
#define cublasXgetrfBatched cublasSgetrfBatched
3633
#define cublasXgetrsBatched cublasSgetrsBatched
3734
#else /* real double */
38-
#define cublasXdotc cublasDdot
3935
#define cublasXgetrfBatched cublasDgetrfBatched
4036
#define cublasXgetrsBatched cublasDgetrsBatched
4137
#endif
@@ -59,15 +55,11 @@
5955
/* complex single */
6056
#if defined(PETSC_USE_COMPLEX)
6157
#if defined(PETSC_USE_REAL_SINGLE)
62-
#define hipblasXdotc(a,b,c,d,e,f,g) hipblasCdotc((a),(b),(const hipComplex *)(c),(d),(const hipComplex *)(e),(f),(hipComplex *)(g))
6358
#else /* complex double */
64-
#define hipblasXdotc(a,b,c,d,e,f,g) hipblasZdotc((a),(b),(const hipDoubleComplex *)(c),(d),(const hipDoubleComplex *)(e),(f),(hipDoubleComplex *)(g))
6559
#endif
6660
#else /* real single */
6761
#if defined(PETSC_USE_REAL_SINGLE)
68-
#define hipblasXdotc hipblasSdot
6962
#else /* real double */
70-
#define hipblasXdotc hipblasDdot
7163
#endif
7264
#endif
7365

include/slepcversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define SLEPC_VERSION_RELEASE 1
1515
#define SLEPC_VERSION_MAJOR 3
1616
#define SLEPC_VERSION_MINOR 22
17-
#define SLEPC_VERSION_SUBMINOR 0
17+
#define SLEPC_VERSION_SUBMINOR 2
1818
#define SLEPC_RELEASE_DATE "September 29, 2024"
1919
#define SLEPC_VERSION_DATE "unknown"
2020

lib/slepc/bin/slepcversion

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/usr/bin/env sh
2+
3+
#
4+
# slepcversion <gt,lt,le,ge,eq> major.minor[.subminor]"
5+
# returns 1 on match else 0
6+
#
7+
# For example: slepcversion gt 3.22.1"
8+
9+
if [ "X${SLEPC_DIR}" = "X" ] ; then
10+
dir=$(dirname $0)
11+
dir=$(dirname $dir)
12+
dir=$(dirname $dir)
13+
SLEPC_DIR=$(dirname $dir)
14+
fi
15+
16+
file=${SLEPC_DIR}/include/slepcversion.h
17+
18+
if [ ! -f $file ]; then
19+
echo "Unable to find slepcversion.h; ensure the environmental variable SLEPC_DIR is set correctly"
20+
exit 1
21+
fi
22+
23+
major=`grep "#define SLEPC_VERSION_MAJOR" $file | tr -s ' ' | cut -d" " -f 3`
24+
minor=`grep "#define SLEPC_VERSION_MINOR" $file | tr -s ' ' | cut -d" " -f 3`
25+
subminor=`grep "#define SLEPC_VERSION_SUBMINOR" $file | tr -s ' ' | cut -d" " -f 3`
26+
release=`grep "#define SLEPC_VERSION_RELEASE" $file | tr -s ' ' | cut -d" " -f 3`
27+
28+
if [ $# -lt 1 ]; then
29+
echo ${major}.${minor}.${subminor}
30+
exit 0
31+
fi
32+
33+
t=$1
34+
v=$2
35+
36+
vmajor=`echo $v | cut -d"." -f 1`
37+
vminor=`echo $v | cut -d"." -f 2`
38+
vsubminor=`echo $v | cut -d"." -f 3`
39+
40+
if [ $# -lt 2 ]; then
41+
echo "Usage: slepcversion <gt,lt,le,ge,eq> version"
42+
echo "For example: slepcversion gt 3.22.1"
43+
exit 1
44+
fi
45+
46+
eq () {
47+
# if [ $release = 0 ]; then echo 0; exit 0; fi
48+
if [ $major != $vmajor ]; then echo 0; exit 0; fi
49+
if [ $minor != $vminor ]; then echo 0; exit 0; fi
50+
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
51+
if [ $subminor != $vsubminor ]; then echo 0; exit 0; fi
52+
echo 1
53+
}
54+
55+
lt () {
56+
# if [ $release = 0 ]; then echo 0; exit 0; fi
57+
if [ $major -lt $vmajor ]; then echo 1; exit 0; fi
58+
if [ $major -gt $vmajor ]; then echo 0; exit 0; fi
59+
if [ $minor -lt $vminor ]; then echo 1; exit 0; fi
60+
if [ $minor -gt $vminor ]; then echo 0; exit 0; fi
61+
if [ "${vsubminor}X" = "X" ]; then echo 0; exit 0; fi
62+
if [ $subminor -lt $vsubminor ]; then echo 1; exit 0; fi
63+
echo 0
64+
}
65+
66+
le () {
67+
# if [ $release = 0 ]; then echo 0; exit 0; fi
68+
if [ $major -lt $vmajor ]; then echo 1; exit 0; fi
69+
if [ $major -gt $vmajor ]; then echo 0; exit 0; fi
70+
if [ $minor -lt $vminor ]; then echo 1; exit 0; fi
71+
if [ $minor -gt $vminor ]; then echo 0; exit 0; fi
72+
if [ "${vsubminor}X" = "X" ]; then echo 0; exit 0; fi
73+
if [ $subminor -le $vsubminor ]; then echo 1; exit 0; fi
74+
echo 0
75+
}
76+
77+
gt () {
78+
if [ $major -gt $vmajor ]; then echo 1; exit 0; fi
79+
if [ $major -lt $vmajor ]; then echo 0; exit 0; fi
80+
if [ $minor -gt $vminor ]; then echo 1; exit 0; fi
81+
if [ $minor -lt $vminor ]; then echo 0; exit 0; fi
82+
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
83+
if [ $subminor -gt $vsubminor ]; then echo 1; exit 0; fi
84+
echo 0
85+
}
86+
87+
ge () {
88+
if [ $major -gt $vmajor ]; then echo 1; exit 0; fi
89+
if [ $major -lt $vmajor ]; then echo 0; exit 0; fi
90+
if [ $minor -gt $vminor ]; then echo 1; exit 0; fi
91+
if [ $minor -lt $vminor ]; then echo 0; exit 0; fi
92+
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
93+
if [ $subminor -ge $vsubminor ]; then echo 1; exit 0; fi
94+
echo 0
95+
}
96+
97+
${t}
98+

lib/slepc/conf/slepc_rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99
#
1010

11-
LDLIBS += $(SLEPC_LIB)
11+
LDLIBS += $(SLEPC_LIB_NOPETSC)
1212

1313
include ${PETSC_DIR}/lib/petsc/conf/rules
1414
include ${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepcrules

lib/slepc/conf/slepc_variables

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,29 @@ CUDACPPFLAGS = ${SLEPC_CUDACPPFLAGS} ${PETSC_CUDACPPFLAGS}
3636
SLEPC_SYS_LIB_BASIC = -lslepcsys
3737
SLEPC_MFN_LIB_BASIC = -lslepcmfn ${SLEPC_SYS_LIB_BASIC}
3838
SLEPC_LME_LIB_BASIC = -lslepclme ${SLEPC_SYS_LIB_BASIC}
39-
SLEPC_EPS_LIB_BASIC = -lslepceps ${SLEPC_SYS_LIB_BASIC}
39+
SLEPC_EPS_LIB_BASIC = -lslepceps ${SLEPC_LME_LIB_BASIC}
4040
SLEPC_SVD_LIB_BASIC = -lslepcsvd ${SLEPC_EPS_LIB_BASIC}
4141
SLEPC_PEP_LIB_BASIC = -lslepcpep ${SLEPC_EPS_LIB_BASIC}
4242
SLEPC_NEP_LIB_BASIC = -lslepcnep ${SLEPC_PEP_LIB_BASIC}
4343
SLEPC_LIB_BASIC = -lslepcnep -lslepcpep -lslepcsvd -lslepceps -lslepcmfn -lslepclme -lslepcsys
4444

45-
SLEPC_SYS_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SYS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
46-
SLEPC_MFN_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_MFN_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
47-
SLEPC_LME_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LME_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
48-
SLEPC_EPS_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_EPS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
49-
SLEPC_SVD_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SVD_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
50-
SLEPC_PEP_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_PEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
51-
SLEPC_NEP_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_NEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
45+
SLEPC_SYS_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SYS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
46+
SLEPC_MFN_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_MFN_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
47+
SLEPC_LME_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LME_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
48+
SLEPC_EPS_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_EPS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
49+
SLEPC_SVD_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SVD_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
50+
SLEPC_PEP_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_PEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
51+
SLEPC_NEP_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_NEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
52+
SLEPC_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
53+
54+
SLEPC_SYS_LIB = ${SLEPC_SYS_LIB_NOPETSC} ${PETSC_SNES_LIB}
55+
SLEPC_MFN_LIB = ${SLEPC_MFN_LIB_NOPETSC} ${PETSC_SNES_LIB}
56+
SLEPC_LME_LIB = ${SLEPC_LME_LIB_NOPETSC} ${PETSC_SNES_LIB}
57+
SLEPC_EPS_LIB = ${SLEPC_EPS_LIB_NOPETSC} ${PETSC_SNES_LIB}
58+
SLEPC_SVD_LIB = ${SLEPC_SVD_LIB_NOPETSC} ${PETSC_SNES_LIB}
59+
SLEPC_PEP_LIB = ${SLEPC_PEP_LIB_NOPETSC} ${PETSC_SNES_LIB}
60+
SLEPC_NEP_LIB = ${SLEPC_NEP_LIB_NOPETSC} ${PETSC_SNES_LIB}
61+
SLEPC_LIB = ${SLEPC_LIB_NOPETSC} ${PETSC_SNES_LIB}
5262

5363
# Redefine variable used to build shared libraries
5464
SHLIBS = libslepcsys libslepcmfn libslepclme libslepceps libslepcsvd libslepcpep libslepcnep

makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ clean:: allclean
222222

223223
#********* Rules for printing library properties useful for building applications **********************
224224

225+
getversion_slepc:
226+
-@${SLEPC_DIR}/lib/slepc/bin/slepcversion
227+
225228
getlinklibs_slepc:
226229
-@${OMAKE} -f gmakefile gmakegetlinklibs_slepc
227230

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@
3838
import shlex
3939
import shutil
4040
from setuptools import setup
41-
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
4241
from setuptools.command.install import install as _install
42+
try:
43+
from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel
44+
except ImportError:
45+
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
4346
from distutils import log
4447

4548
init_py = """\

src/binding/slepc4py/CHANGES.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@ CHANGES: SLEPc for Python
55
:Author: Lisandro Dalcin
66
:Contact: dalcinl@gmail.com
77

8-
Development
9-
===========
108

11-
- In slepc4py now `EPS.getEigenpair()` and `EPS.getEigenvalue()` will return a real value
12-
instead of a complex, if the problem is of Hermitian or generalized Hermitian type.
9+
Release 3.22.2
10+
==============
11+
12+
- Update to SLEPc 3.22.2.
13+
14+
15+
Release 3.22.1
16+
==============
17+
18+
- Update to SLEPc 3.22.1.
1319

1420

1521
Release 3.22.0
1622
==============
1723

1824
- Update to SLEPc 3.22.0.
25+
- In slepc4py now `EPS.getEigenpair()` and `EPS.getEigenvalue()` will return a real value
26+
instead of a complex, if the problem is of Hermitian or generalized Hermitian type.
1927

2028

2129
Release 3.21.2

src/binding/slepc4py/setup.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def requires(pkgname, major, minor, release=True):
215215
return "%s>=%s,<%s" % (pkgname, vmin, vmax)
216216

217217
def run_setup():
218+
is_sdist = 'sdist' in sys.argv
218219
setup_args = metadata.copy()
219220
vstr = setup_args['version'].split('.')[:2]
220221
x, y = tuple(map(int, vstr))
@@ -223,12 +224,15 @@ def run_setup():
223224
setup_args['version'] = "%d.%d.0.dev0" %(x, y+1)
224225
if setuptools:
225226
setup_args['zip_safe'] = False
226-
try:
227-
import numpy
228-
major = int(numpy.__version__.partition('.')[0])
229-
numpy_pin = 'numpy>=1.19' if major >= 2 else 'numpy<2'
230-
except ImportError:
231-
numpy_pin = 'numpy'
227+
numpy_pin = 'numpy'
228+
if not is_sdist:
229+
try:
230+
import numpy
231+
232+
major = int(numpy.__version__.partition('.')[0])
233+
numpy_pin = 'numpy>=1.19' if major >= 2 else 'numpy<2'
234+
except ImportError:
235+
pass
232236
setup_args['setup_requires'] = ['numpy']
233237
setup_args['install_requires'] = [numpy_pin]
234238
for pkg in map(str.lower, PLIST):

src/binding/slepc4py/src/slepc4py/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"""
2222

2323
__author__ = 'Lisandro Dalcin'
24-
__version__ = '3.22.0'
24+
__version__ = '3.22.2'
2525
__credits__ = 'SLEPc Team <slepc-maint@upv.es>'
2626

2727
# -----------------------------------------------------------------------------

src/eps/impls/external/feast/feast.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,22 @@ static PetscErrorCode EPSSolve_FEAST(EPS eps)
9393
#endif
9494

9595
PetscFunctionBegin;
96+
#if !defined(PETSC_HAVE_64BIT_BLAS_INDICES)
97+
PetscCall(PetscBLASIntCast(eps->ncv,&ncv));
98+
PetscCall(PetscBLASIntCast(eps->nloc,&n));
99+
#else
96100
ncv = eps->ncv;
97101
n = eps->nloc;
102+
#endif
98103

99104
/* parameters */
100105
feastinit(fpm);
101106
fpm[0] = (eps->numbermonitors>0)? 1: 0; /* runtime comments */
102-
fpm[1] = ctx->npoints; /* contour points */
107+
fpm[1] = (MKL_INT)ctx->npoints; /* contour points */
103108
#if !defined(PETSC_USE_REAL_SINGLE)
104109
fpm[2] = -PetscLog10Real(eps->tol); /* tolerance for trace */
105110
#endif
106-
fpm[3] = eps->max_it; /* refinement loops */
111+
fpm[3] = (MKL_INT)eps->max_it; /* refinement loops */
107112
fpm[5] = 1; /* second stopping criterion */
108113
#if defined(PETSC_USE_REAL_SINGLE)
109114
fpm[6] = -PetscLog10Real(eps->tol); /* tolerance for trace */

0 commit comments

Comments
 (0)