[CPMD-list] Memory allocation error for the Intel Fortran Compiler on Fedora 1
Yun Liu
liuy04 at vt.edu
Wed Sep 22 16:07:29 CEST 2004
Dear CPMD users and developers,
I have some troubles to compile the CPMD under RedHat Linux (or
Fedora core 1). My working platform are: 5 Dell dual Xeon 2.4 GHz
workstations and 4 Pentium4 2.8 GHz PCs. Each of them has 2GB memory.
Dell workstations are running RedHat 9.0(other softwares only can be run
under RedHat9.0). PCs are running Fedora 1.
First, I have compiled the CPMD 7.2 once by using a very old PGI
compiler. It produced a very small size executable code( I guess it is
dynamically linking many libraries) but can be transferred and running
very well on my new Fedora 1 PCs. However, it is very slow compared with
the test jobs. For example, the /CPMD-test/std/wat32/inp-1 job. I need 1
hour 15 minutes to finish it on my P4 2.8 GHz dual memory channel PC400
PC. The CPMD developers finished it about 2 minutes. Hence, I naturally
doubt the slow running is caused by bad compiling.
I installed the new Intel Fortran compiler 8.1. Following by the
instructions given by Dr. Alex Kohlmeyer's CPMD-Linux website. I am
using the libatlas-p4.a library and BOCHUM-P4 configuration file as
suggested. I can produce a cpmd.x executable with warnings in the
compiling:
-------------------------------------------------------
Wrccfl.o sysdepend.o -L. -latlas -lsvml -Vaxlib -static
/opt/intel_fc_80/lib/libifcoremt.a(for_open_proc.o)(.text+0x3c56): In
function 'for_compute_filename':
:Warning: Using 'getpwnam' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/opt/intel_fc_80/lib/libifcoremt.a(for_open_proc.o)(.text+0x3d39): In
function 'for_compute_filename':
:Warning: Using 'getpwuid' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
-------------------------------------------------------
The cpmd.x executable now is much larger than my previous PGI
compiled one (3 times bigger). However, this statically linked code can
not be run without the "memory allocation error" problem no matter how
small your job is. I found many people had such problem before (search
"memory allocation" will find > 100 messages) and seems no one can
rescue us.
I checked the Intel Compiler 8.1 release notes. It said in its "Known
Limitations" section:
----------------------------------------
Segmentation Violation with static link to libpthreads
Applications built with libpthreads.a statically linked, (libpthreads.a
is used by default when -static is used), may fail with a segmentation
violation on some versions of Linux when the applications use more than
2MB of stack space. This is a known limitation of Linuxthreads. If you
encounter this problem, link libpthreads dynamically. As an alternative,
on Red Hat Linux 9 and Red Hat Enterprise Linux 3.0, you can install the
nptl-devel package and pass "-I/usr/include/nptl -L/usr/lib/nptl" on the
ifort command line. This will create a statically-linked binary which
will run under nptl only, but which does not have the stack size
limitation.
-----------------------------------------
My Fedora 1 has the nptl package in it and a very new glibc version, so
I tried adding the -I/usr/include/nptl -L/usr/lib/nptl in the FFLAGS in
the BOCHUM-P4 configuration file. But the compiled result was exactly
the same as before.
Could anyone help me on this?
Thanks
Allen Liu
More information about the CPMD-list
mailing list