Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6981 Discussions

Solve Arnoldi problem failed using Arpack+Intel MKL

roderick2021
Beginner
1,898 Views

I compiled Arpack-ng 3.8.0 + Intel MKL(ver. 2020.0.166), all build and checks OK. When I build an example come from Arpackpp, it alway report error Arpack error in Eupp and can not resolve the given Arnoldi problem.

The Arpack build configuration:

configure:30261: result:
--------------------------------------------------
Configuration summary for ARPACK-NG 3.8.0
--------------------------------------------------
Installation prefix : /meda_home/roderick/tools/arpack
MPI enabled         : no
ICB enabled         : yes
INTERFACE64         : 1
F77                 : /meda_home/toolchain/tool/gnu/5.4.0/bin/gfortran
FFLAGS              : -DMKL_ILP64 -I/meda_home/toolchain/library/mkl/2020.0.166/include -fdefault-integer-8
FC                  : /meda_home/toolchain/tool/gnu/5.4.0/bin/gfortran
FCFLAGS             : -DMKL_ILP64 -I/meda_home/toolchain/library/mkl/2020.0.166/include -fdefault-integer-8
CC                  : /meda_home/toolchain/tool/gnu/5.4.0/bin/gcc
CFLAGS              : -g -O2
CXX                 : /meda_home/toolchain/tool/gnu/5.4.0/bin/g++ -std=gnu++11
CXXFLAGS            : -g -O2
CPPFLAGS            : 
MPI_Fortran_LIBS    : 
MPI_C_LIBS          : 
MPI_CXX_LIBS        : 
BLAS                : -lmkl_gf_ilp64
LAPACK              : -lmkl_gf_ilp64
EIGEN               : -I/meda_home/toolchain/library/eigen/3.3.7/include/eigen3
LIBS                : -Wl,--no-as-needed -L/meda_home/toolchain/library/mkl/2020.0.166/lib/intel64_lin -lmkl_sequential -lmkl_core -lpthread -lm -ldl -lgfortran
LDADD               : 
--------------------------------------------------
Configuration OK
--------------------------------------------------

make all check, all checks passed.

Result of ldd libarpack.so:

linux-vdso.so.1 =>  (0x00007ffdeb156000)
libmkl_gf_ilp64.so => /meda_home/toolchain/library/mkl/2020.0.166/lib/intel64_lin/libmkl_gf_ilp64.so (0x00007f8315cf4000)
libmkl_sequential.so => /meda_home/toolchain/library/mkl/2020.0.166/lib/intel64_lin/libmkl_sequential.so (0x00007f83146dc000)
libmkl_core.so => /meda_home/toolchain/library/mkl/2020.0.166/lib/intel64_lin/libmkl_core.so (0x00007f83103bb000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8310188000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f830ff84000)
libgfortran.so.3 => /meda_home/toolchain/tool/gnu/5.4.0/lib/../lib64/libgfortran.so.3 (0x00007f830fc62000)
libquadmath.so.0 => /meda_home/toolchain/tool/gnu/5.4.0/lib/../lib64/libquadmath.so.0 (0x00007f830fa23000)
libm.so.6 => /lib64/libm.so.6 (0x00007f830f721000)
libgcc_s.so.1 => /meda_home/toolchain/tool/gnu/5.4.0/lib/../lib64/libgcc_s.so.1 (0x00007f830f509000)
libc.so.6 => /lib64/libc.so.6 (0x00007f830f13b000)
/lib64/ld-linux-x86-64.so.2 (0x00005617e57cf000)

 

Then I create an example to test arpack+MKL (The example run OK using arpack+lapack):

cmake_minimum_required(VERSION 3.1.0)
project(popkins)

include(/meda_home/toolchain/toolchain.cmake) # establish vars e.g. TOOLCHAIN_LIB_PATH

set(CMAKE_C_COMPILER "${GCC_BIN_DIR}/gcc")
set(CMAKE_CXX_COMPILER "${GCC_BIN_DIR}/g++")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/libs)

# to specify MKL or LAPACK
set(ARPACK_NG "MKL")
#set(ARPACK_NG "LAPACK")

if(CMAKE_VERSION VERSION_LESS "3.7.0")
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()


set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS "-Wno-unused-local-typedefs -Werror -Wall -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-Wno-unused-local-typedefs -Wall -g")

add_definitions(-DEIGEN_FFTW_DEFAULT)

# Begin: add for new toolchain
include_directories(SYSTEM ${EIGEN_INC_DIR})
include_directories(SYSTEM ${EIGEN_UNSUPPORTED_INC})
include_directories(SYSTEM /meda_home/roderick/temp/arpackpp-2.3.0/include)
include_directories(SYSTEM /meda_home/roderick/temp/arpackpp-2.3.0/examples/matprod)
include_directories(SYSTEM /meda_home/roderick/temp/arpackpp-2.3.0/examples/matprod/complex)
include_directories(SYSTEM /meda_home/roderick/temp/arpackpp-2.3.0/examples/reverse/complex)
include_directories(SYSTEM /meda_home/roderick/tools/arpack/include)
# End: add for new toolchain

# Begin: add for new toolchain
link_directories(/meda_home/roderick/tools/arpack/lib)  # arpack+mkl
#link_directories(/meda_home/roderick/tools/arpack_roy)  # arpack+lapack
link_directories(/meda_home/roderick/tools/usr/local/lib64)
link_directories(/meda_home/toolchain/tool/gnu/5.4.0/lib64)
# End: add for new toolchain

add_definitions(-DEIGEN_FFTW_DEFAULT)
link_libraries(
    #blas lapack
    gfortran
    arpack
)

if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    add_definitions(-DEIGEN_USE_MKL_ALL)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMKL_ILP64 -m64")
    link_libraries(mkl_gf_ilp64 mkl_sequential mkl_core mkl_avx512 m dl pthread)
    include_directories(SYSTEM ${MKL_INC_DIR})
    link_directories(${MKL_LIB_DIR}/intel64)
endif()

add_subdirectory(src)

Run the example and solve failed:

Arpack error in Eupp.
-> Error in ARPACK Eupd fortran code.
Arpack error in FindEigenvectors.
-> Could not find any eigenvector.

I doubt how to configure the build for arpack+Intel MKL?

1, One difference I found at Intel community: Ohters compile arpack+MKL using Intel's fortran compiler ifort. But there's no ifort in the server I used.

2, I found some error message in arpack's config.log file.

configure:3395: /meda_home/toolchain/tool/gnu/5.4.0/bin/gfortran -V >&5
gfortran: error: unrecognized command line option '-V'
gfortran: fatal error: no input files
compilation terminated.
0 Kudos
7 Replies
mecej4
Honored Contributor III
1,875 Views

Others compile arpack+MKL using Intel's fortran compiler ifort. But there's no ifort in the server I used.

You may obtain and use Intel Fortran and MKL on your Linux system free of cost now. From the download site, obtain the installer for the OneAPI HPC Toolkit (for the Fortran compiler) and the OneAPI Base Toolkit (MKL is part of this). You may purchase a support contract, if you wish.

----

The problem that you describe is too far removed from the topic of this forum and involves too many packages and dependencies to make it likely that someone here will undertake to troubleshoot the issues.

I downloaded the sources from the Github repository and searched for the string "Could not find any eigenvector" in the unpacked source files. No file matched, so the string must be in the sources for the example that you built and ran, and you probably did not tell us where to find the example sources. The second link that you gave, "arpackpp", has the same target as the first link, "Arpack-ng 3.8.0".

It would be best if you could isolate the problem to a specific failure of the MKL version of a Lapack routine.

0 Kudos
roderick2021
Beginner
1,857 Views

Hi mecej4, thanks for your kind help!

1, The libraries called path(bottom -> top): Intel MKL -> arpack-ng -> arpackpp -> test_example.

2, The error message come from arpackpp, which is a CPP wrap for arpack-ng. (It is also a github project like arpack-ng)

3, The test example attached. It run OK if I compile the arpack with lapack.(Then the call path are: lapack -> arpack-ng -> arpackpp -> test_example)

0 Kudos
mecej4
Honored Contributor III
1,846 Views

The file test_eigen.cpp depends on a number of header files that are not included in your attachment, arpack_test.tar.gz. I suppose that they are obtainable from https://github.com/m-reuter/arpackpp/ or another fork of the same, but at this point the overhead of all the interface codes, header files, Cmake scripts, 4-byte and 8-byte integers, etc., makes this task horribly complex and distasteful for me. I doubt that the Intel MKL staff would find this a worthwhile undertaking.

I use C often, Fortran most of the time, but almost no C++. So, sorry, I am not interested in trying to find bugs in the C++ wrappers.

As far as I can see, all that your example does is to use Arpack to obtain the eigenvalues and eigenvectors of a (100 X 100 ?) matrix A of double precision reals.  If you state the formula for the values of the elements of that matrix, or provide a data file with the values (in other words, define the test problem in English rather than C++), I am willing to try to obtain the solution using Arpack in combination with (i) Lapack and (ii) MKL.

I have access to two other versions of Arpack, so I could try those as well.

0 Kudos
RahulV_intel
Moderator
1,823 Views

Hi,


Thanks for reporting your issues. I have forwarded your query to the MKL experts. They will get back to you.


Regards,

Rahul


0 Kudos
Gennady_F_Intel
Moderator
1,821 Views

on top of this forum, we have published "How to post in the Intel oneAPI Math Kernel Library forum" topic which describes what we expect to see when the runtime/perf related queries are submitted. In this case, we expect to see the standalone example as smaller as possible. W/o this, I am afraid, we couldn't help You with this issue.


0 Kudos
roderick2021
Beginner
1,807 Views

Thanks for your tips, so how to close this topic if neccessary?

0 Kudos
Gennady_F_Intel
Moderator
1,800 Views

The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.



0 Kudos
Reply