[CPMD-list] Compiling cpmd.x for CPMD-3.11.1
Axel Kohlmeyer
akohlmey at cmm.chem.upenn.edu
Tue Apr 29 00:56:06 CET 2008
On Tue, 29 Apr 2008, Ari P Seitsonen wrote:
AS>
AS> Dear Amos,
AS>
AS> I fully agree with Axel's comment on the formatted file. I try to decrypt
AS> some lines:
AS>
AS> On Mon, 28 Apr 2008, Amos Leffler wrote:
AS>
AS> > #FFLAGS = -c -r8 -w95 -O2 -pc64 -tpp7 -unroll -cm -tune pn4 -arch pn4
AS> > FFLAGS = -O2 -unroll -pc64 -march=pentium4 -mtune=core2
AS> >
AS> > /lib/cpp -P -C -traditional -D__Linux -D__PGI -DLAPACK -DFFT_DEFAULT
AS> > -DLINUX_IFC ./timetag.F ./timetag.f/opt/intel/fce/10.1.012/bin/ifort
AS> > -O2 -unroll -pc64 -march=pentium4 -mtune=core2
AS> > ./timetag.f/opt/intel/fce/10.1.012/lib/for_main.o: In function
AS> > `main':/export/users/nbtester/efi2linuxx86_nightly/branch-10_1/20080112_010000/libdev/frtl/src/libfor/for_main.c:(.text+0x26):
AS> > undefined reference to `MAIN__'make: *** [cpmd.x] Error
AS>
AS> It is not very wise to leave out the '-c' flag from the options for the
AS> fortran compiler - CPMD requires many more files to link the executable than
AS> just the 'timetag.f'. ;)
without -c CPMD will try to generate an individual executable (name
a.out) for each source file, unless you add it to the FC definition.
different CPMD configure templates (those are in desperate need for
cleaning up and updating, BTW) have one or the other convention.
if you mix-and-match CPMD configure files you may end up with
something that does not work.
AS> No idea about the subsequent problems; did you try to use the 'icc'
AS> compiler instead of 'gcc', in case that should cause a problem?
that is actually _not_ a good idea. any "non-system" compiler should
be avoided unless there is a specific reason to do so. intel compilers
pull in a large quantity of unneeded shared libraries and that can
cause some bad surprises. gcc is only half as bad.
if you don't believe me, have a look at, e.g.,:
http://pages.cs.wisc.edu/~psilord/blog/2.html
http://pages.cs.wisc.edu/~psilord/blog/3.html
and remember that when using intel c/c++, fortran and mkl
you tend to have up to three (3!) different versions of the
'same' libraries around, particularly if you don't have
"synchronized" patchlevels... and -i-static is curing only
half of the problem... ugh.
cheers,
axel.
p.s.: intel 10.1.012 is pretty buggy (not as bad as 10.1.008).
if you get an unexpected segfault in phfac() you need to update.
AS>
AS> Greetings from home,
AS>
AS> apsi
AS>
AS>
--
=======================================================================
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