Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rudaho
Beginner
83 Views

icpc -Wl,--start-group -Wl, --end-group doen't find all reference for MKL lib ?

Hi~

I'm using icpc to static link the application with MKL library. I used ~/intel/cc/10.1.011/bin/icpc

icpc xxx.o ... $(MKLPATH)/libmkl_solver.a -Wl,--start-group $(MKLPATH)/libmkl_intel.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -Wl,--end-group -openmp -lpthread

However, it still doesn't find all the cross reference between these three libraries. To work around, I just type these three libraries repeatedly until all undefined references are found. It's like $(MKLPATH)/libmkl_intel.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a ...

Is there any idea about why --start-group --end-group doesn't work for my case?

Thanks a lot...

Best Regards

Yi-Ju
0 Kudos
1 Reply
TimP
Black Belt
83 Views

There's a serious bug in the link script creation step for that version of the compiler, which we reported right away. We use 10.1.021.
For the work-around to avoid dependence on correct passage of --begin-group ... --end-group, I found that putting libmkl_intel_thread (or sequential) last in the group requires one less explicit repetition of the group.
Reply