[CPMD-list] Compilation with latest intel compiler(v8.1) and mkl lib(v7.2)

Axel Kohlmeyer axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Fri May 13 09:09:55 CEST 2005


On Thu, 12 May 2005, Yun Wang wrote:

YW> Dear All,

dear yun wang,

thanks for your report.

YW>   I just compiled CPMD with latest IFORT(v8.1)
YW> compiler and MKL(v7.2) lib. You may have known how to
YW> do it. I still want to share my experience.
YW> 
YW>   Firstly, I have changed the LFLAGS in Makefile
YW> according to the guide of Dr. Axel;
YW> 
YW> LFLAGS = -static-libcxa -Xlinker -Bstatic -lsvml\
YW>          -L/opt/intel/mkl721/lib/32 -lmkl_lapack
YW> -lmkl_ia32 -lguide\
YW>          -Vaxlib -Vaxlib -Xlinker -Bdynamic -lpthread
YW> $(QMMM_LIBS)

if you have a recent update of the intel compiler 
(e.g. 8.1-025) and mkl (e.g. 7.2.1p-3), the linker 
line should better be something like:

LFLAGS = -L/opt/intel/mkl721/lib/32/ -lmkl_lapack -lmkl_ia32 \
	/opt/intel/mkl721/lib/32/libguide.a -lpthread
LD = ifort -i-static

so you don't have any dynamic library requirements from
the intel compiler and libraries and thus you can run
your binary, even if there is no (matching) intel runtime.

you have to register for premier support to get those
updates, but it is free for a year even for the 
non-commercial license.


YW>   Then, change the util.F file around line 550 from:
YW> 
YW> #if   !(defined(__SGI)) && !(defined(__HP)) &&
YW> !(defined(LINUX_IA64_INTEL))
YW> 
YW> to:
YW> 
YW> #if   !(defined(__SGI)) && !(defined(__HP)) &&
YW> !(defined(LINUX_IFC))

nope, this is not such a good idea. the requirement for
this change is not due to the intel compiler, but due to
MKL. so the line shoud be changed into 

#if   !(defined(__SGI)) && !(defined(__HP)) && !(defined(INTEL_MKL))

and then you add -DINTEL_MKL to CPPFLAGS if you want to use MKL.


it is quite annoying, that intel keeps changing the command
line flags and the amount of shared libraries permanently, even
during updates(!). if this keeps going on, we need to have a
database with the sets of flags for each combination of compiler
and library versions. but then again, at least we _can_ use the 
compiler...

best regards,
	axel.

YW>   After these changes, everything should be OK.
YW> 
YW>   Best wishes.
YW> 
YW> Yun Wang
YW> 
YW> 
YW> 		
YW> Yahoo! Mail
YW> Stay connected, organized, and protected. Take the tour:
YW> http://tour.mail.yahoo.com/mailtour.html
YW> 
YW> _______________________________________________
YW> CPMD-list mailing list
YW> CPMD-list at cpmd.org
YW> http://cpmd.org/mailman/listinfo/cpmd-list
YW> 
YW> 

-- 

=======================================================================
Dr. Axel Kohlmeyer   e-mail: axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.




More information about the CPMD-list mailing list