arpack-ng
arpack-ng copied to clipboard
Using ifx fortran compiler from Intel 2024 oneapi gives errors during configure step
I can successfully build arpack-ng with blas and lapack using this comand:
CXX=icx CC=icx FC=ifort F77=ifort ./configure --with-blas=/home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a --with-lapack=/home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a --enable-icb --enable-static --disable-shared --prefix=/home/feacluster/arpack-ng/build
But if I replace ifort with ifx I get:
checking for dummy main to link with Fortran 77 libraries... unknown
configure: error: in `/home/feacluster/arpack-ng':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details
The config.log shows this error:
configure:5784: icx -o conftest -O2 conftest.c -loopopt=1 -L/opt/intel/oneapi/tbb/2021.12/env/../lib/intel64/gcc4.8 -L/opt/intel/oneapi/m>
/usr/bin/ld: cannot find -loopopt=1
icx: error: linker command failed with exit code 1 (use -v to see invocation)
configure:5784: $? = 1
configure: failed program was:
Next if I try and just omit the F77=ifx, with:
INTERFACE64="1" CXX=icx CC=icx FC=ifx ./configure --with-blas=/home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a --with-lapack=/home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a --enable-icb --enable-static --disable-shared --prefix=/home/feacluster/arpack-ng/build
I get:
checking for sgemm_ in /home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a... yes
checking for cheev_ in /home/feacluster/OpenBLAS/build/lib/libopenblas_sapphirerapids-r0.3.27.dev.a... no
checking for cheev_... no
checking for cheev_ in -llapack... no
checking for cheev_ in -llapack_rs6k... no
configure: error: cannot find LAPACK libraries
Which is strange because it finds it ok with I use ifort instead of ifx. The library is in the same folder as where I am running config.
Does ifx implements the Fortran 2003 standard that defines ICB?
Did you try without ICB? (no Fortran standard required)
Did you try with `cmake?
Thanks for the quick reply! From AI answers:
Yes, the Intel Fortran Compiler (ifx) implements Fortran 2003, but not parameterized derived types.
I tried without ICB but got the same error. The strange thing is cheeve_ does seem to be in the openblas library:
checking for sgemm_ in /home/feacluster/OpenBLAS/build/lib/libopenblas.a... yes
checking for cheev_ in /home/feacluster/OpenBLAS/build/lib/libopenblas.a... no
checking for cheev_... no
checking for cheev_ in -llapack... no
checking for cheev_ in -llapack_rs6k... no
configure: error: cannot find LAPACK libraries
[feacluster@intel arpack-ng]$ strings /home/feacluster/OpenBLAS/build/lib/libopenblas.a | grep cheev_
cheev_
cheev_2stage_
LAPACKE_cheev_work
LAPACKE_cheev_2stage
LAPACKE_cheev_2stage_work
lapacke_cheev_work.o/
lapacke_cheev_2stage.o/
lapacke_cheev_2stage_work.o/
cheev_
Have you double-checked these the following things? If so, you'll need support from Intel, not from here.
Using ifx fortran compiler from Intel 2024 oneapi
OneAPI = new name for MKL: https://github.com/opencollab/arpack-ng?tab=readme-ov-file#using-mkl-instead-of-blas--lapack
Did you make sure the build system you use end up exactly with what's Intel libraries expect: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.8i3omj
Example: https://github.com/opencollab/arpack-ng/blob/4caa8f4c703c6408b05b878f376e5df762d9a0e9/.github/workflows/jobs.yml#L156-L163
INTERFACE64="1" ... ./configure ... strange thing is cheeve_ does seem to be in the openblas
https://github.com/opencollab/arpack-ng/blob/4caa8f4c703c6408b05b878f376e5df762d9a0e9/README.md?plain=1#L45
https://github.com/opencollab/arpack-ng/issues/452#issuecomment-2030183407
I need only the lib, no tests and examples and I patched arpack not to search for blas (here MKL) in that case.
Then arpack compiles without issues for me with ifx on Linux (2025.0) and Windows (2024)
@Fabian188 I am trying to compile in Windows (2025) but I am not able. It says that configuration requires compiler support for the platform, but it is not installed. What changes have you done in the sln? If I go to Tools > Options > Intel Compilers and Libraries > IFX Intel Fortran > Compilers it shows my current version of Intel Fortran Compiler, but in IFORT Intel Fortran Classic > Compilers it is empty, since I do not have it.
I managed to change the compiler by right click in the proyect in the solution explorer and in the drop down menu Intel Compiler > IFX Intel Fortran. But now, I am getting two errors:
[error](error: undefined symbol: ccdotc_) [error](error: undefined symbol: zzdotc_)