I need to call a subroutine from lapack, my source file is H0.f90 and I use the command as follows:
ifort H0.f90 -L /opt/intel/mkl/10.0.1.014/lib/32 -lmkl_lapack -lguide -lmkl
and get this error:
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/32/libmkl_lapack.so when searching for -lmkl_lapack
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/32/libmkl_intel.a when searching for libmkl_intel.a
ld: cannot find libmkl_intel.a
Also, I tried this command:
ifort H0.f90 -L /opt/intel/mkl/10.0.1.014/lib/64 -lmkl_lapack -lguide -lmkl
and got this error:
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/64/libmkl_lapack.so when searching for -lmkl_lapack
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/64/libmkl_intel_lp64.a when searching for libmkl_intel_lp64.a
ld: cannot find libmkl_intel_lp64.a
So, at last I used
ifort H0.f90 -L /opt/intel/mkl/10.0.1.014/lib/em64t -lmkl_lapack -lguide -lmkl
but got:
/opt/intel/mkl/10.0.1.014/lib/em64t/libguide.so: undefined reference to `pthread_atfork'
Because I have three folders 32, 64 and em64t in mkl and I don't know which one to choose, so I tried all of them, but none of them works. Besides, when I want to use the command:
export LD_LIBRARY_PATH=/opt/intel/mkl/10.0.1.014/lib/32
it always says:
export: Command not found.
So what should I do to call the subroutines from lapack of mkl, need help, thanks.

