Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ifx fortran compiler from Intel 2024 oneapi gives errors during configure step #455

Open
feacluster opened this issue May 5, 2024 · 3 comments

Comments

@feacluster
Copy link

feacluster commented May 5, 2024

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.

@fghoussen
Copy link
Collaborator

Does ifx implements the Fortran 2003 standard that defines ICB?
Did you try without ICB? (no Fortran standard required)
Did you try with `cmake?

@feacluster
Copy link
Author

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_

@fghoussen
Copy link
Collaborator

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:

./configure --enable-icb --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64
make all
make check
env:
FFLAGS: "-DMKL_ILP64 -I/usr/include/mkl"
FCFLAGS: "-DMKL_ILP64 -I/usr/include/mkl"
LIBS: "-Wl,--no-as-needed -L/usr/lib/x86_64-linux-gnu -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
INTERFACE64: "1"

INTERFACE64="1" ... ./configure ...
strange thing is cheeve_ does seem to be in the openblas

- As this can not be automated, you need to make sure that the BLAS/LAPACK libraries you pass to `arpack-ng`:

#452 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants