[CPMD-list] Compilation Problem for 3.11.1

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Tue Apr 29 12:39:30 CET 2008


On Tue, 29 Apr 2008, Vladimir Stegailov wrote:

VS> Amos,
VS> 
VS> below I cite the configuration file that is ok in my case (Xeon cluster, 
VS> Intel Fortran 10.1, MKL 10.0).
VS> You can use it with mkconfig.sh in order to make a Makefile.
VS> 
VS> #INFO#
VS> IRAT=2
VS> CFLAGS='-c -O2 -Wall'
VS> CPP='/lib/cpp -P -C -traditional'
VS> CPPFLAGS='-D__Linux -D__PGI -DFFT_DEFAULT \
VS> -DPARALLEL -DMYRINET -DLINUX_IFC -DINTEL_MKL -DPOINTER8'
VS> FFLAGS='-O2 -unroll -pc64 -march=pentium3 -mtune=core2'
VS> LFLAGS='-L/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl_sequential -lmkl_lapack  
VS> -lmkl_em64t -lguide ­-lpthread'

vladimir,

those flags are almost complete nonsense. please read the
MKL docs. note, that when linking libraries order matters.
thus -lmkl_sequential has no effect. -lmkl_lapack is a dynamical
lib and -lmkl_em64t is a wrapper about static libraries that
do contain lapack, so using -lmkl_lapack is essentially hooking
up two different copies of parts of mkl into the same binary.
finally, --lpthread is wrong, it has to be -lpthread.

i strongly recommend to use the sequence that you quoted
below as otherwise your executable will be running multi-threaded
whenever MKL is executed and if you run MPI parallel this will
be detrimental to your performace or you have to force 
MKL to be single threaded by setting OMP_NUM_THREADS to 1
in your environment.

i've already run across quite a few people complaining about
bad parallel performance that could always be traced back to
this unreasonable threading behavior of MKL. the worst is
on ALTIX machines that appear as very large SMP machines and
without forcing MKL to go single-threaded performance degradation
of several orders of magnitude have been reported.

cheers,
   axel.


VS> FFLAGS_GROMOS=' $(FFLAGS)'
VS> if [ $debug ]; then
VS> FC='mpif77 -g'
VS> CC='mpicc -g'
VS> LD='mpif77 -g'
VS> else
VS> FC='mpif77 -c'
VS> CC='mpicc '
VS> LD='mpif77 -i-static'
VS> fi
VS> 
VS> As Axel has pointed out if you change to
VS> 
VS> LFLAGS= -L/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl_intel_lp64 -lmkl_sequential 
VS>  -lmkl_core
VS> 
VS> this will link with the non-openmp version of the libraries and thus 
VS> no -lpthread or -lguide should be needed.
VS> 
VS> best wishes,
VS> Vladimir
VS> 
VS> 
VS> ----- Original Message ----- 
VS> From: Amos Leffler
VS> To: cpmd-list at cpmd.org
VS> Sent: Tuesday, April 29, 2008 4:24 AM
VS> Subject: [CPMD-list] Compilation Problem for 3.11.1
VS> 
VS> 
VS> Dear Users,
VS> Below is given the input portion of the Makefile INTEL-XEON64 that was 
VS> adapted from the corresponding
VS> AMD file and the changes that Alex suggested in his messages to Vladimir 
VS> Stegailov and Oksana Ismailova.
VS> I am using openSuSE 10.2 and XEON Quadcore 5335 2.0 GHz.  Something is still 
VS> incorrect.
VS> 
VS> SHELL = /bin/sh
VS> #
VS> #--------------- Default Configuration for INTEL-XEON64 ---------------
VS> SRC  = .
VS> DEST = .
VS> BIN  = .
VS> #FFLAGS = -c -r8 -w95 -O2 -pc64 -tpp7 -unroll -cm -tune pn4 -arch pn4
VS> FFLAGS = -O2 -unroll -pc64 -march=pentium4 -mtune=core2
VS> LFLAGS 
VS> = -L/opt/intel/mkl/10.0.1.014/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
VS> CFLAGS = -c -O2 -Wall -m64
VS> CPP = /lib/cpp -P -C -traditional
VS> CPPFLAGS = -D__Linux -D__PGI -DLAPACK -DFFT_DEFAULT -DLINUX_IFC
VS> NOOPT_FLAG =
VS> CC = gcc
VS> FC = /opt/intel/fce/10.1.012/bin/ifort
VS> LD = /opt/intel/fce/10.1.012/bin/ifort -i-static
VS> AR = ar
VS> -------------------Output--------------------------------------------------------------------------------
VS> ]2;amos at leffler2:...CPMD-3.11.1/SOURCE]1;leffler2amos at leffler2:~/Desktop/CPMD-3.11.1/SOURCE> 
VS> make cpmd.x
VS> Makefile:3497: warning: overriding commands for target `znum_mat.o'
VS> Makefile:324: warning: ignoring old commands for target `znum_mat.o'
VS> rm -f timetag.f
VS> /lib/cpp -P -C -traditional -D__Linux -D__PGI -DLAPACK -DFFT_DEFAULT -DLINUX_IFC 
VS> ./timetag.F ./timetag.f
VS> /opt/intel/fce/10.1.012/bin/ifort  -O2 -unroll -pc64 -march=pentium4 -mtune=core2 
VS> ./timetag.f
VS> /opt/intel/fce/10.1.012/lib/for_main.o: In function `main':
VS> /export/users/nbtester/efi2linuxx86_nightly/branch-10_1/20080112_010000/libdev/frtl/src/libfor/for_main.c:(.text+0x26): 
VS> undefined reference to `MAIN__'
VS> make: *** [cpmd.x] Error 1
VS> ]2;amos at leffler2:...CPMD-3.11.1/SOURCE]1;leffler2amos at leffler2:~/Desktop/CPMD-3.11.1/SOURCE> 
VS> exit
VS> 
VS> Hopefully the problem is minor and yoour assistance would be much 
VS> appreciated.
VS> 
VS>          Amos Leffler
VS>          unaffiliated 
VS> 
VS> _______________________________________________
VS> CPMD-list mailing list
VS> CPMD-list at cpmd.org
VS> http://cpmd.org/mailman/listinfo/cpmd-list
VS> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.


More information about the CPMD-list mailing list