Skip to content

Commit

Permalink
Merge pull request #9 from firedrakeproject/connorjward/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
connorjward authored Dec 4, 2024
2 parents 1c45024 + 8414ebc commit cfa8758
Show file tree
Hide file tree
Showing 41 changed files with 232 additions and 297 deletions.
20 changes: 10 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -870,16 +870,16 @@ intel-c-int64-nompi-mkl:
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'
SLEPC_CONFIG_OPTS: --DATAFILESPATH=/var/local --with-packages-download-dir=/var/local/downloads --download-primme --download-arpack

#gnu-c-hip-complex: # TODO
# extends:
# - .stage-3
# - .linux_test
# tags:
# - gpu:amd, name:satet
# variables:
# LOAD_MODULES: rocm
# PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-hip
# TEST_OPTS: -j1 -l6 query=requires queryval=hip
gnu-c-hip-complex:
extends:
- .stage-3
- .linux_test
tags:
- gpu:amd, name:satet
variables:
LOAD_MODULES: rocm
PETSC_CONFIG_OPTS: --with-scalar-type=complex --with-hip
TEST_OPTS: query=requires queryval=hip

gnu-c-hip-single:
extends:
Expand Down
8 changes: 4 additions & 4 deletions config/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,11 @@ def copyLib(self, src, dst):
if os.path.splitext(dst)[1] == '.'+self.arLibSuffix:
if not 'win32fe' in self.petscCC:
(result, output) = subprocess.getstatusoutput(self.ranlib+' '+dst)
if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'):
(result, output) = subprocess.getstatusoutput('otool -D '+src)
oldname = output[output.find("\n")+1:]
if os.path.splitext(dst)[1] == '.dylib' and shutil.which('otool') and shutil.which('install_name_tool'):
output = subprocess.check_output(['otool', '-D', src], universal_newlines=True)
oldname = output.splitlines()[1]
installName = oldname.replace(os.path.realpath(self.archDir), self.installDir)
(result, output) = subprocess.getstatusoutput('/usr/bin/install_name_tool -id '+installName+' '+dst)
subprocess.check_output(['install_name_tool', '-id', installName, dst])
# preserve the original timestamps - so that the .a vs .so time order is preserved
shutil.copystat(src,dst)
return
Expand Down
6 changes: 2 additions & 4 deletions config/packages/slepc.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ def Process(self,slepcconf,slepcvars,slepcrules,slepc,petsc,archdir=''):
slepcvars.write('SHLIBS = libslepc\n')
slepcvars.write('LIBNAME = '+os.path.join('${INSTALL_LIB_DIR}','libslepc.${AR_LIB_SUFFIX}')+'\n')
for module in ['SYS','EPS','SVD','PEP','NEP','MFN','LME']:
slepcvars.write('SLEPC_'+module+'_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
slepcvars.write('SLEPC_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
else:
slepcvars.write('SLEPC_LIB = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} ${SLEPC_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}\n')
slepcvars.write('SLEPC_'+module+'_LIB_NOPETSC = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')
slepcvars.write('SLEPC_LIB_NOPETSC = ${CC_LINKER_SLFLAG}${SLEPC_LIB_DIR} -L${SLEPC_LIB_DIR} -lslepc ${SLEPC_EXTERNAL_LIB}\n')

def ShowInfo(self):
self.log.Println('\nSLEPc directory:\n '+self.dir)
Expand Down
5 changes: 3 additions & 2 deletions gmakefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ endef

# link line constructed differently for gmakefile vs gmakefile.test invocation
#ifeq ($(libslepcall),)
SLEPC_TEST_LIB = $(SLEPC_LIB) $(PETSC_SNES_LIB)
SLEPC_TEST_LIB = $(SLEPC_LIB)
#else
#SLEPC_TEST_LIB = $(SLEPC_LIB)
#SLEPC_TEST_LIB = $(C_SH_LIB_PATH) $(SLEPC_EXTERNAL_LIB_BASIC)
Expand Down Expand Up @@ -447,6 +447,7 @@ help-nontest:
-@echo " slepc_libs - build (update) the SLEPc and related libraries"
-@echo " check - run a basic check that the libraries are built correctly and can be used"
-@echo " "
-@echo " getversion_slepc - print the SLEPc version, or $$""SLEPC_DIR/lib/slepc/bin/petscversion"
-@echo " getlinklibs_slepc - print the libraries that a SLEPc application must link against"
-@echo " getincludedirs_slepc - print the include directories that a SLEPc application must be compiled against"
-@echo " getcflags - print the C compiler flags PETSc is using"
Expand All @@ -458,7 +459,7 @@ help-nontest:
-@echo " test - use \"make -f gmakefile.test help\" for help on running the extensive tests"
-@echo
-@echo "Developer rules:"
-@echo " clean - delete libraries and Fortran module files (used in $SLEPC_DIR)"
-@echo " clean - delete libraries and Fortran module files (used in $$""SLEPC_DIR)"
-@echo " lint_slepc - run lint on the source code, including its embedded documentation"
-@echo " delete compiled examples, .o and related files (used in tutorials or test directories)"
-@echo " clang-tidy - run clang-tidy on the SLEPc C code"
Expand Down
8 changes: 0 additions & 8 deletions include/slepccupmblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@
/* complex single */
#if defined(PETSC_USE_COMPLEX)
#if defined(PETSC_USE_REAL_SINGLE)
#define cublasXdotc(a,b,c,d,e,f,g) cublasCdotc((a),(b),(const cuComplex *)(c),(d),(const cuComplex *)(e),(f),(cuComplex *)(g))
#define cublasXgetrfBatched(a,b,c,d,e,f,g) cublasCgetrfBatched((a),(b),(cuComplex**)(c),(d),(e),(f),(g))
#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))
#else /* complex double */
#define cublasXdotc(a,b,c,d,e,f,g) cublasZdotc((a),(b),(const cuDoubleComplex *)(c),(d),(const cuDoubleComplex *)(e),(f),(cuDoubleComplex *)(g))
#define cublasXgetrfBatched(a,b,c,d,e,f,g) cublasZgetrfBatched((a),(b),(cuDoubleComplex**)(c),(d),(e),(f),(g))
#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))
#endif
#else /* real single */
#if defined(PETSC_USE_REAL_SINGLE)
#define cublasXdotc cublasSdot
#define cublasXgetrfBatched cublasSgetrfBatched
#define cublasXgetrsBatched cublasSgetrsBatched
#else /* real double */
#define cublasXdotc cublasDdot
#define cublasXgetrfBatched cublasDgetrfBatched
#define cublasXgetrsBatched cublasDgetrsBatched
#endif
Expand All @@ -59,15 +55,11 @@
/* complex single */
#if defined(PETSC_USE_COMPLEX)
#if defined(PETSC_USE_REAL_SINGLE)
#define hipblasXdotc(a,b,c,d,e,f,g) hipblasCdotc((a),(b),(const hipComplex *)(c),(d),(const hipComplex *)(e),(f),(hipComplex *)(g))
#else /* complex double */
#define hipblasXdotc(a,b,c,d,e,f,g) hipblasZdotc((a),(b),(const hipDoubleComplex *)(c),(d),(const hipDoubleComplex *)(e),(f),(hipDoubleComplex *)(g))
#endif
#else /* real single */
#if defined(PETSC_USE_REAL_SINGLE)
#define hipblasXdotc hipblasSdot
#else /* real double */
#define hipblasXdotc hipblasDdot
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion include/slepcversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define SLEPC_VERSION_RELEASE 1
#define SLEPC_VERSION_MAJOR 3
#define SLEPC_VERSION_MINOR 22
#define SLEPC_VERSION_SUBMINOR 0
#define SLEPC_VERSION_SUBMINOR 2
#define SLEPC_RELEASE_DATE "September 29, 2024"
#define SLEPC_VERSION_DATE "unknown"

Expand Down
98 changes: 98 additions & 0 deletions lib/slepc/bin/slepcversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/usr/bin/env sh

#
# slepcversion <gt,lt,le,ge,eq> major.minor[.subminor]"
# returns 1 on match else 0
#
# For example: slepcversion gt 3.22.1"

if [ "X${SLEPC_DIR}" = "X" ] ; then
dir=$(dirname $0)
dir=$(dirname $dir)
dir=$(dirname $dir)
SLEPC_DIR=$(dirname $dir)
fi

file=${SLEPC_DIR}/include/slepcversion.h

if [ ! -f $file ]; then
echo "Unable to find slepcversion.h; ensure the environmental variable SLEPC_DIR is set correctly"
exit 1
fi

major=`grep "#define SLEPC_VERSION_MAJOR" $file | tr -s ' ' | cut -d" " -f 3`
minor=`grep "#define SLEPC_VERSION_MINOR" $file | tr -s ' ' | cut -d" " -f 3`
subminor=`grep "#define SLEPC_VERSION_SUBMINOR" $file | tr -s ' ' | cut -d" " -f 3`
release=`grep "#define SLEPC_VERSION_RELEASE" $file | tr -s ' ' | cut -d" " -f 3`

if [ $# -lt 1 ]; then
echo ${major}.${minor}.${subminor}
exit 0
fi

t=$1
v=$2

vmajor=`echo $v | cut -d"." -f 1`
vminor=`echo $v | cut -d"." -f 2`
vsubminor=`echo $v | cut -d"." -f 3`

if [ $# -lt 2 ]; then
echo "Usage: slepcversion <gt,lt,le,ge,eq> version"
echo "For example: slepcversion gt 3.22.1"
exit 1
fi

eq () {
# if [ $release = 0 ]; then echo 0; exit 0; fi
if [ $major != $vmajor ]; then echo 0; exit 0; fi
if [ $minor != $vminor ]; then echo 0; exit 0; fi
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
if [ $subminor != $vsubminor ]; then echo 0; exit 0; fi
echo 1
}

lt () {
# if [ $release = 0 ]; then echo 0; exit 0; fi
if [ $major -lt $vmajor ]; then echo 1; exit 0; fi
if [ $major -gt $vmajor ]; then echo 0; exit 0; fi
if [ $minor -lt $vminor ]; then echo 1; exit 0; fi
if [ $minor -gt $vminor ]; then echo 0; exit 0; fi
if [ "${vsubminor}X" = "X" ]; then echo 0; exit 0; fi
if [ $subminor -lt $vsubminor ]; then echo 1; exit 0; fi
echo 0
}

le () {
# if [ $release = 0 ]; then echo 0; exit 0; fi
if [ $major -lt $vmajor ]; then echo 1; exit 0; fi
if [ $major -gt $vmajor ]; then echo 0; exit 0; fi
if [ $minor -lt $vminor ]; then echo 1; exit 0; fi
if [ $minor -gt $vminor ]; then echo 0; exit 0; fi
if [ "${vsubminor}X" = "X" ]; then echo 0; exit 0; fi
if [ $subminor -le $vsubminor ]; then echo 1; exit 0; fi
echo 0
}

gt () {
if [ $major -gt $vmajor ]; then echo 1; exit 0; fi
if [ $major -lt $vmajor ]; then echo 0; exit 0; fi
if [ $minor -gt $vminor ]; then echo 1; exit 0; fi
if [ $minor -lt $vminor ]; then echo 0; exit 0; fi
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
if [ $subminor -gt $vsubminor ]; then echo 1; exit 0; fi
echo 0
}

ge () {
if [ $major -gt $vmajor ]; then echo 1; exit 0; fi
if [ $major -lt $vmajor ]; then echo 0; exit 0; fi
if [ $minor -gt $vminor ]; then echo 1; exit 0; fi
if [ $minor -lt $vminor ]; then echo 0; exit 0; fi
if [ "${vsubminor}X" = "X" ]; then echo 1; exit 0; fi
if [ $subminor -ge $vsubminor ]; then echo 1; exit 0; fi
echo 0
}

${t}

2 changes: 1 addition & 1 deletion lib/slepc/conf/slepc_rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#

LDLIBS += $(SLEPC_LIB)
LDLIBS += $(SLEPC_LIB_NOPETSC)

include ${PETSC_DIR}/lib/petsc/conf/rules
include ${SLEPC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepcrules
26 changes: 18 additions & 8 deletions lib/slepc/conf/slepc_variables
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,29 @@ CUDACPPFLAGS = ${SLEPC_CUDACPPFLAGS} ${PETSC_CUDACPPFLAGS}
SLEPC_SYS_LIB_BASIC = -lslepcsys
SLEPC_MFN_LIB_BASIC = -lslepcmfn ${SLEPC_SYS_LIB_BASIC}
SLEPC_LME_LIB_BASIC = -lslepclme ${SLEPC_SYS_LIB_BASIC}
SLEPC_EPS_LIB_BASIC = -lslepceps ${SLEPC_SYS_LIB_BASIC}
SLEPC_EPS_LIB_BASIC = -lslepceps ${SLEPC_LME_LIB_BASIC}
SLEPC_SVD_LIB_BASIC = -lslepcsvd ${SLEPC_EPS_LIB_BASIC}
SLEPC_PEP_LIB_BASIC = -lslepcpep ${SLEPC_EPS_LIB_BASIC}
SLEPC_NEP_LIB_BASIC = -lslepcnep ${SLEPC_PEP_LIB_BASIC}
SLEPC_LIB_BASIC = -lslepcnep -lslepcpep -lslepcsvd -lslepceps -lslepcmfn -lslepclme -lslepcsys

SLEPC_SYS_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SYS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_MFN_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_MFN_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_LME_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LME_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_EPS_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_EPS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_SVD_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SVD_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_PEP_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_PEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_NEP_LIB = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_NEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB} ${PETSC_SNES_LIB}
SLEPC_SYS_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SYS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_MFN_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_MFN_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_LME_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LME_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_EPS_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_EPS_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_SVD_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_SVD_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_PEP_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_PEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_NEP_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_NEP_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}
SLEPC_LIB_NOPETSC = ${SLEPC_C_SH_LIB_PATH} -L${SLEPC_LIB_DIR} ${SLEPC_LIB_BASIC} ${SLEPC_EXTERNAL_LIB}

SLEPC_SYS_LIB = ${SLEPC_SYS_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_MFN_LIB = ${SLEPC_MFN_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_LME_LIB = ${SLEPC_LME_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_EPS_LIB = ${SLEPC_EPS_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_SVD_LIB = ${SLEPC_SVD_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_PEP_LIB = ${SLEPC_PEP_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_NEP_LIB = ${SLEPC_NEP_LIB_NOPETSC} ${PETSC_SNES_LIB}
SLEPC_LIB = ${SLEPC_LIB_NOPETSC} ${PETSC_SNES_LIB}

# Redefine variable used to build shared libraries
SHLIBS = libslepcsys libslepcmfn libslepclme libslepceps libslepcsvd libslepcpep libslepcnep
Expand Down
3 changes: 3 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ clean:: allclean

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

getversion_slepc:
-@${SLEPC_DIR}/lib/slepc/bin/slepcversion

getlinklibs_slepc:
-@${OMAKE} -f gmakefile gmakegetlinklibs_slepc

Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
import shlex
import shutil
from setuptools import setup
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
from setuptools.command.install import install as _install
try:
from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel
except ImportError:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
from distutils import log

init_py = """\
Expand Down
16 changes: 12 additions & 4 deletions src/binding/slepc4py/CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@ CHANGES: SLEPc for Python
:Author: Lisandro Dalcin
:Contact: [email protected]

Development
===========

- In slepc4py now `EPS.getEigenpair()` and `EPS.getEigenvalue()` will return a real value
instead of a complex, if the problem is of Hermitian or generalized Hermitian type.
Release 3.22.2
==============

- Update to SLEPc 3.22.2.


Release 3.22.1
==============

- Update to SLEPc 3.22.1.


Release 3.22.0
==============

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


Release 3.21.2
Expand Down
16 changes: 10 additions & 6 deletions src/binding/slepc4py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def requires(pkgname, major, minor, release=True):
return "%s>=%s,<%s" % (pkgname, vmin, vmax)

def run_setup():
is_sdist = 'sdist' in sys.argv
setup_args = metadata.copy()
vstr = setup_args['version'].split('.')[:2]
x, y = tuple(map(int, vstr))
Expand All @@ -223,12 +224,15 @@ def run_setup():
setup_args['version'] = "%d.%d.0.dev0" %(x, y+1)
if setuptools:
setup_args['zip_safe'] = False
try:
import numpy
major = int(numpy.__version__.partition('.')[0])
numpy_pin = 'numpy>=1.19' if major >= 2 else 'numpy<2'
except ImportError:
numpy_pin = 'numpy'
numpy_pin = 'numpy'
if not is_sdist:
try:
import numpy

major = int(numpy.__version__.partition('.')[0])
numpy_pin = 'numpy>=1.19' if major >= 2 else 'numpy<2'
except ImportError:
pass
setup_args['setup_requires'] = ['numpy']
setup_args['install_requires'] = [numpy_pin]
for pkg in map(str.lower, PLIST):
Expand Down
2 changes: 1 addition & 1 deletion src/binding/slepc4py/src/slepc4py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"""

__author__ = 'Lisandro Dalcin'
__version__ = '3.22.0'
__version__ = '3.22.2'
__credits__ = 'SLEPc Team <[email protected]>'

# -----------------------------------------------------------------------------
Expand Down
9 changes: 7 additions & 2 deletions src/eps/impls/external/feast/feast.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,22 @@ static PetscErrorCode EPSSolve_FEAST(EPS eps)
#endif

PetscFunctionBegin;
#if !defined(PETSC_HAVE_64BIT_BLAS_INDICES)
PetscCall(PetscBLASIntCast(eps->ncv,&ncv));
PetscCall(PetscBLASIntCast(eps->nloc,&n));
#else
ncv = eps->ncv;
n = eps->nloc;
#endif

/* parameters */
feastinit(fpm);
fpm[0] = (eps->numbermonitors>0)? 1: 0; /* runtime comments */
fpm[1] = ctx->npoints; /* contour points */
fpm[1] = (MKL_INT)ctx->npoints; /* contour points */
#if !defined(PETSC_USE_REAL_SINGLE)
fpm[2] = -PetscLog10Real(eps->tol); /* tolerance for trace */
#endif
fpm[3] = eps->max_it; /* refinement loops */
fpm[3] = (MKL_INT)eps->max_it; /* refinement loops */
fpm[5] = 1; /* second stopping criterion */
#if defined(PETSC_USE_REAL_SINGLE)
fpm[6] = -PetscLog10Real(eps->tol); /* tolerance for trace */
Expand Down
Loading

0 comments on commit cfa8758

Please sign in to comment.