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

Limit problem with mkl

amical
Beginner
1,013 Views
Hi,

I'm using mkl to get the inverse of a general matrix
with lapack in Fortran. I can't get this to work
for a 20x20 matrix, even if everything seems fine
for a 15x15 matrix. I got a seg fault when reaching 20x20.
I don't understand.

Any clue ?

thanks,

Antoine.
0 Kudos
6 Replies
amical
Beginner
1,013 Views
I may have problems linking everything.

When I use
ifort -L/opt/intel/mkl721/lib/32/ -lmkl_ia32 -lguide -lpthread

it can't find the routines for double precision.

With the -static flag, then -lpthread can't be found.

The compilation is successfull only with
-lmkl -lmkl_lapack64 -lguide -lpthread

But then, I can't have the inverse of a matrix greater than
16x16

I usually succeed in solving my problems alone, but this time...

Antoine.
0 Kudos
TimP
Honored Contributor III
1,013 Views
You didn't specify enough information to comment effectively. If you are running Red Hat 9, the static pthreads libraries are provided only in a patch, not in the full release. If you are running a supported version of linux, those libraries should be present in the distribution, and would normally be installed as part of the gcc development section.
0 Kudos
amical
Beginner
1,013 Views
In fact, I'm using a Mandrake Linux Distribution, and
now I guess this may be the source of the problem.
I can't verify now, cause I don't have access to my
computer. Since what is really required is not clear in the requirements I thought that the libpthread was the one
in the convenient lib directory. If I get it right, the lib
is provided with gcc ? What is there in the patch exactly,
in case where I would need one too ? Is there a more detailled
documentation on the subject anywhere to help me fix this
problem ?

Many questions as you see. Anyway, thanks for your answer...
0 Kudos
amical
Beginner
1,013 Views
Still, there is something that puzzles me.

Even if I don't have the correct pthread librairy to link
statically, why is there this limit when I use dynamic
librairies ? I don't get it.
0 Kudos
TimP
Honored Contributor III
1,013 Views
You didn't make it clear whether you have read up on the shell commands for increasing stack limit. I'm not prepared to research the historical reasons for defaults being set as low as they are.
0 Kudos
amical
Beginner
1,013 Views
Hi,

Thanks for your patience.

First, everything works fine now. I found the libpthread.a
library in a rpm named "glibc-static-devel" everything
is ok now.

But for the dynamic libraries I still have the same problem,
which may be due to my programs eventually, but not to a stack
size limit : ulimit returns "unlimited".

I'll use the static libraries, and everything will be ok.
I have a friend which has the same problems with my programs,
I'll tell you if we find anything which could explain this.
0 Kudos
Reply