arpack-ng icon indicating copy to clipboard operation
arpack-ng copied to clipboard

arpack ng install problem on windows with intel

Open ChrisNabold opened this issue 5 years ago • 5 comments

I tried to install arpack ng (with latest download) using cmake -D EXAMPLES=ON -D MPI=ON -D BUILD_SHARED_LIBS=ON .. CMakeError.log CMakeOutput.log How can I manage that cmake is using intel mkl with sgem .. Thank you for your help

ChrisNabold avatar Aug 09 '19 15:08 ChrisNabold

Did you try export BLA_VENDOR=Intel but running cmake ? (restart from scratch) https://cmake.org/cmake/help/v3.14/module/FindBLAS.html

fghoussen avatar Aug 09 '19 16:08 fghoussen

Dear Frank

Thank you for your info, I appreciate your help.

I tried it but I still get the same error message.

How can I pass the address of the intel MKL library somewhere in the arpack library? Do I have to set any parameters beore call ing cmake?

Thank you for your help

Best regards

Chris Nabold

From: Franck HOUSSEN [email protected] Sent: Friday, 9 August 2019 18:44 To: opencollab/arpack-ng [email protected] Cc: ChrisNabold [email protected]; Author [email protected] Subject: Re: [opencollab/arpack-ng] arpack ng install problem on windows with intel (#226)

Did you try export BLA_VENDOR=Intel but running cmake ? (restart from scratch) https://cmake.org/cmake/help/v3.14/module/FindBLAS.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opencollab/arpack-ng/issues/226?email_source=notifications&email_token=AEIE3ZD6V6CUQ4SKMGB4NUTQDWNGJA5CNFSM4IKVHQ32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD37F3KI#issuecomment-519986601 , or mute the thread https://github.com/notifications/unsubscribe-auth/AEIE3ZCMS7IQ6D73LG6SZALQDWNGJANCNFSM4IKVHQ3Q . https://github.com/notifications/beacon/AEIE3ZCUYIKDSEU6P3EGAELQDWNGJA5CNFSM4IKVHQ32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD37F3KI.gif

ChrisNabold avatar Aug 09 '19 19:08 ChrisNabold

You may give a try to ICB as the problem seems to occur at linking time :

testFortranCompiler.obj : error LNK2019: unresolved external symbol _SGEMM referenced in function MAIN

Fortran compiler may produce symbols like _SGEMM or SGEMM_ or SGEMM__ : Fortran norm does not specify this, so, nobody knows how to figure out... ICB is meant to deal with that (and other interoperability related problems).

If you want to use cmake, you may try:

~/BUILD> BLA_VENDOR=Intel_64lp cmake -DICB=ON .. (run from scratch - I suppose you want lp, not ilp)

If this does not work you should open an issue to cmake : this is a cmake problem or a cmake misuse (which may imply to change arpack-ng/CMakeLists.txt).

If you need a back-up solution, you may give a try to autotools :

  • check out "test arpack with sequential ILP64 MKL assuming you use gnu compilers" in README.md

  • check out : https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

  • finally you would end up with something like (I suppose you want lp64, not ilp64 and using intel compilers - not tested : just the spirit of it - you may try with and without ICB)

LIBS='-Wl,--no-as-needed -lmkl_sequential -lmkl_core -lpthread -lm -ldl' ./configure --with-blas=mkl_intel_lp64 --with-lapack=mkl_intel_lp64 --enable-icb

Finally, it seems you want multi-threaded lp64 : you need to have installed pthread.h which seems not to be found. So you need before all to install it. Something like this should do it:

sudo apt-get install libc-dev (debian)

If you don't want multi-threaded, use lp64_seq instead of lp64 (as intel link advisor will tell you).

fghoussen avatar Aug 10 '19 09:08 fghoussen

possible alternative : #303

fghoussen avatar Mar 27 '21 18:03 fghoussen

@ChrisNabold I think you have been misleaded by the CMake error log: it's completely normal to have sgemm test failing on Intel MKL libraries; you do not have to worry about that. It's just a check: your CMake is running just fine.

What you have to do is to set up the proper environmental variables for Intel MKL and to do that the best way is to use the Intel oneApi command prompt for Intel x64 for Visual Studio (or whatever other custom command prompt your MKL version is offering to you).

Please give a look at my answer at issue #283 to have a brief guide. It works also with ICB.

dariomangoni avatar Jun 15 '21 22:06 dariomangoni

Documentation has been provided here: https://github.com/opencollab/arpack-ng#windows-support

fghoussen avatar May 27 '23 20:05 fghoussen