Bonjour Guillaume,
several options:
- either you make your own liblapack.a, for this you
- You might want to use MKL if you have on your system (it's the Intel LAPACK optimized and precompiled library). Or any precompiler LAPACK library.
I see that your main is in Fortran 90, be careful when you call LAPACK or BLAS routines. If you call for example:
DGESV( N, NRHS, A, LDA, ... ) then there is lots of chance that your compiler makes a copy of A before calling DGESV. (I do not know specifically about ifort but let's be cautious.)
There is no much way to avoid this if you want to be compatible with the Fortran standard, however you can make some assumptions on the compiler and use a little trick to avoid the copy.
To avoid the copy, just call:
DGESV( N, NRHS, A(1,1), LDA, ... ) . The compiler is not going to make any copy in that case.
The problem is that the latter approach (
DGESV( N, NRHS, A(1,1), LDA, ... ) ) assumes that A is stored in a contiguous piece of memory. And this is not necessarily guarantee by
allocate. However this has always worked for me in practice.
Julien