-
Notifications
You must be signed in to change notification settings - Fork 124
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
Failed to compile wannier_tools with arpack-ng on Ubuntu 20.04. #307
Comments
|
@RyanBernX Thanks a lot. Based on your valuable instructions, I found out the following workable linking libraries setting in
or
But I still can't figure out why
Regards, |
Intel tool chain can not be tested here : it's not open source. Line 229 in 0a655d9
As a starting point, did you compile OK with gnu compilers ? |
Yes, see following:
|
So it's Intel and/or MKL specific problem. Following exactly https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl/link-line-advisor.html may help. You may try with |
It generated the following link line and compiler options: Use this link line:
Compiler options:
So, I tried with the following configurations:
And the above method can also compile arpack-ng successfully. But I still need
At the bottom, |
|
@hongyi-zhao
I believe there is an issue with BTW, You can verify the compilation with |
Wonderful analysis. It does the trick. The detailed configuration results are shown below:
Why don't you use the following option suggested by the MKL Link Line Advisor:
How to enable it, and should I enable it or not?
Yep. As shown below:
|
I use lmod to manage the env, and the corresponding env setting for intel toolchain is generated from the intel official shipped script. So, it's unlikely that this will cause the problem for my case. |
Add
It depends on other libs in your projects. ARPACK supports both LP64 (32-bit integer) and ILP64 (64-bit integer) version of BLAS/LAPACK. However, some libraries may only support one of them. Either version can be used as long as it is consistent across your project. |
@RyanBernX Thank you very much for your in-depth explanation. Based on my rough intuition, if we use ILP64, then does it mean that LP64 will also be supported? |
Not sure what you are asking. As long as the BLAS/LAPACK functions are declared properly, it is OK to pass 32-bit integers to the ILP64 interface (but you are still using ILP64, not LP64. The compiler will perform implicit conversion for you). What you can't do is to declare an ILP64 function in your header and link with an LP64 library. See this link for more details about LP64/ILP64. |
I mean the backward compatibility, i.e., in this scenario, ILP64 should be compatible with LP64. It seems that LP64/ILP64 belong to 64-bit data models. But I still can't figure out what terms they're abbreviated from. |
I tried to compile with
|
Even so, I don't think the compiler options below should trigger any errors, rather, they can be added to avoid errors in case they are needed. For
For
|
Again, it depends on how you compile and link your program. Consider the following function:
In ILP64 model,
If you by mistake link with Libraries such as ARPACK require an external BLAS/LAPACK implementation. However, they have no idea what implementation you are providing (e.g. MKL, openblas, atlas, etc). Fortunately, all BLAS/LAPACK implementations have the same interface except the integer model. Therefore, for C programs, your can provide your own declarations of BLAS/LAPACK functions in your header, as long as they are consistent with the actual libraries used for linking. I don't know much about FORTRAN. But I guess there will be similar issues.
I think you probably mean this:
The above program can compile and run correctly, as long as you provide an ILP64 model of BLAS. Hope this will answer your question. |
Again, thank you very much for clarifying any misunderstanding or conceptual confusion I may have had.
Just an additional/complementary note excerpted from the intel's developer guide mentioned by you in previously post:
|
In my opinion, selecting and using the tool chain in a consistency manner, e.g., intel® oneAPI Toolkits, can greatly improve development efficiency and reduce debugging complexity. |
If you want to use MKL, whatever build system or Makefile you use, you need to make sure that when typing |
Thank you very much for this tip. |
On Ubuntu 20.04, I try to compile git master version of wannier_tools which requires arpack library for cooperation with the intel MPI and mkl. I tried with the following steps but failed:
Then I try to use either of the above generated static library to compile wannier_tools, but failed with the following info:
When using libparpack.a:
When using libarpack.a:
Any hints for solving this problem will be highly appreciated.
Regards,
HY
The text was updated successfully, but these errors were encountered: