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

Problems with LAPACK and BLAS

shivany
Beginner
1,207 Views
Hi,

I'm currently trying to optimize Bundler (http://phototour.cs.washington.edu/bundler/), a software using LAPACK and BLAS (I'm working with a Ubuntu 32-bit partition with a VM), so I downloaded MKL. However, once libraries have been changed and the whole project compiled, the result seems to be modified, in a wrong way. I wanted to know what could be the difference between the libraries included in the original source code and the MKL ones?

Thanks,

Allan.
0 Kudos
11 Replies
Gennady_F_Intel
Moderator
1,207 Views
Allan,
I am not sure that there is some difference.what MKL version Bundler uses?.
--Gennady
0 Kudos
shivany
Beginner
1,207 Views
Hi Gennady,

Bundler doesn't use MKL but directly lapack & blas libraries (clapack & cblas folders).
The MKL version I installed on my VM is 10.2.

Allan
0 Kudos
mecej4
Honored Contributor III
1,207 Views
Please present an example source code to demonstrate the finding that "the result seems to be modified, in a wrong way".

What do you mean by "in a wrong way"? How do you determine that the modification is of that kind?
0 Kudos
shivany
Beginner
1,207 Views
The result of the Bundler is a 3D reconstruction of an object in a set of images (as a point cloud) and it differs when I only switch libraries between original LAPACK & BLAS ones and MKL ones and in this case, some cameras are misplaced, that's why I'm saying the result is wrong. What I want to know is the reason why this difference occures, the source code and libs of Bundler are on their website.

I can't really show results here as the pictures I'm using are confidential.
0 Kudos
Artem_V_Intel
Employee
1,207 Views
Hello,

Could you please show how you specified LIB_PATH and BUNDLER_LIBS variables in the 'src/Makefile' ?

This KB article may be helpful for determining proper MKL link line.

Best regards,
Artem
0 Kudos
shivany
Beginner
1,207 Views
Hello Artem,

LIB_PATH : -L../lib -L../lib/ann_1.1_char/lib -L"/opt/mkl/lib/32"

BUNDLER_LIBS : -limage -lsfmdrv -lsba.v1.5 -lmatrix -lz -llapack -lblas -lcblas -lmkl_lapack95 -lmkl_blas95 -lmkl_core -lmkl_intel -lmkl_intel_thread -liomp5 -lpthread -lminpack -lm -l5point -ljpeg -lANN_char -lgfortran


Regards,

Allan
0 Kudos
shivany
Beginner
1,207 Views
Hi again,

My internship mentor thought that the probleme could come from the sba library, using also lapack, but there's obviously no link between this library and the lapack one as there's a sba_lapack.c file in the directory (bundler/lib/sba-1.5) where the libsba.v1.5.a is built. Just in case someone thought about the same thing :)

Regards,

Allan.
0 Kudos
Gennady_F_Intel
Moderator
1,207 Views
Allan, thanks for letting us know. It may be the cause of the problem, I hope using MKL's implementation LAPACK performs the correct result.
--Gennady
0 Kudos
shivany
Beginner
1,207 Views
Hi again,

While testing executables on another computer, we had troubles with a segmentation fault, and we found out that the initial libraries didn't work as well (nothing to do with the result difference, as the end of the program wasn't even reached) and we used the ldd command to check which libraries the executables actually used and we found out that the "good" executables were using the blas and lapack library from the "atlas" package, probably already installed on our systems.

Now, do you have an idea about the fact that libraries from atlas work, bundler ones lead to a segfault and that MKL ones' result is not the same as atlas ones?

Regards,

Allan.
0 Kudos
Artem_V_Intel
Employee
1,207 Views
Hi Allan,

Sorry, I didn't understand from your previous postwhat LAPACK implementation leads to the segfault: MKL or ATLAS one?

Best regards,
Artem
0 Kudos
shivany
Beginner
1,207 Views
Hi Artem :

On my computer/VM :

Default libraries in Bundler => Segfault
Using Atlas libraries => Good Result
Using MKL libraries => Wrong Result

We made some tests on another machine (64-bits this time) and we have a wrong result with atlas on Linux but it seems to work on Windows... I'm getting some serious headaches right now ^^'

Regards,

Allan
0 Kudos
Reply