Hello,
I have the recent 2017 version of the Parallel Studio XE Composer Edition for Fortran Linux
In my program I am calling Lapack routines dsytrf and dsytri2 . I need to statically link the program
In my Makefile I have
$(COMPUTE_INVERSE): $(OBJS)
$(LNK) $(LDFLAGS) -o $@ $(OBJS) $(MKLPATH)/libmkl_lapack95_lp64.a $(MKLPATH)/libmkl_blas95_lp64.a -Wl,--start-group $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -Wl,--end-group $(LIBS) $(RLIBS)
I defined LDFLAGS = -static-intel -Bstatic -static-libgcc
I was unsure of what to use for MKLPATH. I initially used MKLROOT, which is set for me when i source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux in my .bashrc file. (If I echo $MKLROOT i get /opt/intel/compilers_and_libraries_2017.0.098/linux/mkl)
Then i noticed that the libraries such as libmkl_intel_lp64.a are in two places :
$(MKLROOT)/lib/intel64_lin_mic/libmkl_lapack95_lp64.a
$(MKLROOT)/lib/intel64_lin/libmkl_lapack95_lp64.a
My first question is what is the difference?
The first option (_lin_mic) seems to work better.
I still get a linking error though
ld: /opt/intel/compilers_and_libraries_2017.0.098/linux/mkl/lib/intel64_lin_mic/libmkl_intel_lp64.a(_dsytrf_lp64.o): Relocations in generic ELF (EM: 181)
/opt/intel/compilers_and_libraries_2017.0.098/linux/mkl/lib/intel64_lin_mic/libmkl_intel_lp64.a: could not read symbols: File in wrong format
Does anyone know what is going wrong ?
Regards,
Richard