-
Notifications
You must be signed in to change notification settings - Fork 27
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
Compile error with DLBFoam STANDALONE Lapack #21
Comments
Are you testing the standalone installation on your cluster or personal laptop? If former, I'd advise to stick to the intel-mkl or openblas packages pre-installed in the cluster by your IT team and avoid using a standalone LAPACKinstallation. If you're on your PC, try: (sudo) apt-get install liblapacke-dev to install the lapacke-dev package, which at the moment works very well on my ubuntu 22.04 desktop. |
I fully agree with blttkgl, first, test this on your own machine and on cluster, use the system installation of MKL or OpenBlas instead of your own installation of Lapack. In that way you get the best performance and less problems. Based on the error message I would make a wild guess that your lapack compilation or its linking has some issues. The error message states that "too few arguments to function ‘void dgetrs_" and if I recall correctly, this may result in case you are linking via fortran interface of lapack library instead of the traditional c interface (The difference is in number of arguments). So perhaps your compilation environment on cluster was not consistent between compiling lapack, openfoam and dlbfoam? |
On my Ubuntu machine the DLBFoam could be compiled! On the supercomputer system I have these two option: 1. OpenFOAM/8 (gcc, compilation by IT) + STANDALONE (compilation by myself) Currently I am trying this on 1. Issue #20 is option 2. On the supercomputer @kahilah you were right. Maybe I compiled Lapack (fortran) only. Not LAPACKE (for C). Now, the compilation succeeded! However, there is an error at the PSRTest.
I will also try the tutorial later |
Error message states: "undefined symbol: dgetrf_", in which dgetr_ is a lapack function and when symbol is undefined, it suggests that the library linking is not succesfull. Most probably Lapack paths are wrong, or not set in the PATH environmental variable so your system can't find the right library. Another option is that the lapack compilation has not been succesfull so dlbfoam finds the header files but the library file is not working. When you compile / run dlbfoam, are you sure that your environment in the shell is well defined? So when you compile something, you know which compiler is activated and that you know that if you have many versions of same library like lapack, you refer to the right one etc.? I recommend to compile the lapack test and tutorial files (available in lapack sources) so you know that your lapack is functioning as expected. |
I got some reports from different people and was able to reproduce the issue myself on Ubuntu 22.04. It is caused by the change of the Perhaps, it can be fixed in a similar way to this fix in OpenCV library. |
This is known issue, I discussed this with @moreff a month ago maybe. |
Yes, I feel at this point standalone installation does not need to be supported if devs think it's too big of a hassle. Couple of notes why it exists in the first place to my knowledge: 1- Intel-mkl was not directly included in the package manager until Ubuntu 20.04. You could still install it, but you needed to jump through some hoops. Having a standalone version made things easier for a user with limited experience on Unix. 2- There were benchmarks all around showing Intel explicitly throttling the efficiency of MKL libraries on non-intel architectures (e.g., AMD). This is the reason why we have an OpenBLAS option as well, because CSC's Mahti have AMD processors and using OpenBLAS is much faster over there. |
I have the same issue with compiling.
Still have exactly the same issue as @kazumamatata Do I need to compile as root? I compile it in my run directory. |
Hey @mactone , please check the response by Ilya in #21 (comment), and proposed temporary fix by Hasan in #21 (comment) . You can use intel-MKL instead of Standalone LAPACK until the issue is fixed. Bulut |
Thank you Bulut.
I check my $MKLROOT is /usr/include/mkl/ There is kml_lapack.h in this path. |
I tested using virtual machine and at least in my system mkl header files end up in that folder. One way that you may check is where libmkl-dev is installed along with intel-mkl package. So, may you try |
As users seem to have issues with these paths, we should probably extend the Allwmake MKL/openblas checks to not only look at whether the variable exists but if correct files are located in the path. |
What is your gcc version and what is your operating system? |
I am using Ubuntu 22.04 LTS with gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 |
Though I can't have the DLBfoam built on my Ubuntu workstation. But it is built smoothly on windows openfoam 9. |
I tried remove openfoam9 libapacke-dev and reinstall them. I wonder how @kazumamatata solved the issue?! |
Dear mactone, What I feel that the problem you are having is not related to DLBFoam, so I feel like you should be able to use DLBFoam but I haven't tested it myself. What I get from your error message,
However like I said, this may not be the correct approach and you might miss some tests, I haven't checked anything myself. You may try and maybe we should investigate this in another issue. Regards |
@drhcelik On my previous trial make with MKL as the platform. It seems that I've built the c_pyjac_test, can I use DLBFoam without finishing the whole Allwmake process? Using the tricks you mentioned, I need to change catch.hpp file as you suggested? |
I don't have access to Ubuntu 22.04 right now, so I am not able to test it but if you have DLBFoam case already, you may test it or you may use one of the cases in this repository to test it. I feel like you are able to compile libraries but you fail at the tests. Yes, you may try to modify those lines in catch.hpp. The problem occurs at these lines I think: DLBFoam/tests/unittests/catch.hpp Line 11257 in 546f27a
DLBFoam/tests/unittests/catch.hpp Line 11317 in 546f27a
This problem is not related to MKL or DLBFoam, I think this is something related to Catch2. But like I said, this probably is not the most elegant way to do this, just modify them to test if it works or not. |
Thank you @drhcelik, I finally resolved the issue through your instruction. |
Perhaps we could itemize the action needed to be taken to close this issue, and assign it to someone before this thread spirals out of control? @moreff @kahilah any suggestions where to start? I am in favor of removing the STANDALONE option if MKL's performance on AMD is now comparable to that of Intel architectures. |
I think there are two questions here:
See example I just put together quickly:
|
As I remember, |
I think we need to decide how much hand-holding we want to provide to the user. In most cases MKL comes preinstalled and MKLROOT is available if the compilation is on a cluster, and the assumption should be that user knows basic UNIX and/or they have access to their IT if they are attempting to compile this on a cluster. As for personal computer usage we could just provide a simple standalone compilation with the stock library. We can even consider shipping the standalone version with a dynamic lapack library, since the performance is not a concern for a PC installation using standalone. |
I agree with @blttkgl , one should not start building this based on how things are looking on certain distros. Compilation scripts should utilise $MKLROOT variable and then README should state that it is user responsibility to set this in their shell correctly. Then we can give examples for that. |
Hello again,
I wanted to report other issue I encounter when compiling DLBFoam v1.1_OF8.
To avoid intel MKL or other compilation problem , now I am trying to compile DLBFoam v1.1 with the STANDALONE lapack.
I am running OpenFOAM 8 provided by the supercomputer center, which uses gcc compiler and intelMPI. (That should be compiled properly and also validated).
However, there are some error message regarding the lapack.
I assume that is, caused by the wrong Lapack version. So my question: Can I ask you which lapack version you have tested?
My version is 3.10, downloaded from: http://www.netlib.org/lapack/
Here is the error message: What do you think?
The text was updated successfully, but these errors were encountered: