Using MKL on Linux for IA-32:
I need myprog.f90 to be statically linked; it makes a call to the LAPACK subroutine gels() using the LAPACK95 interface.
I have spent a lot of time looking at documentation, examples and similar questions on this forum; but after much experimentation I still can't get this to compile. So I appologize but I must go ahead and ask again.
My best attempt based on Intel's Link Advisor:
ifort -L/opt/intel/mkl/10.2.1.017/lib/32 -lmkl_blas95 -lmkl_lapack95 -lmkl_intel -lmkl_core -lmkl_sequential -lpthread -static myprog.f90
/tmp/ifortJnhkQs.o: In function `MAIN__':
myprog.f90:(.text+0x375): undefined reference to `sgels1_mkl95_'
I have built the interface *.mod and *.a files for LAPACK95.
Do I have the wrong compiler command?
I can compile from the MKL LAPACK95 included examples (using the makefile) so I guess the problem is not some environmental variable. I don't know enough to extract the technique from the example makefile.