[CP2K:1846] Re: segmentation fault on a water example

Marius Retegan marius.s... at gmail.com
Tue Mar 10 14:12:26 UTC 2009


Hello again,
I've followed Fawzi's advice and reduced the level of optimizations
for ifort. Apparently the code works with -O1, but fails with -O2
The machine is an Itanium 2 and this is the compile "script":
============================================
CC       = cc
CPP      = cpp
FC       = ifort
LD       = ifort
AR       = ar -r
DFLAGS   = -D__INTEL -D__FFTSG -D__FFTW3
-I/fougeron/home/mretegan/intel/mkl/9.0/include
-I/fougeron/home/mretegan/software/fftw3/include
CPPFLAGS = -traditional -C $(DFLAGS) -P
FCFLAGS  = -O2 (or -O1)
LDFLAGS  = -i-static $(FCFLAGS)
-L/fougeron/home/mretegan/intel/mkl/9.0/lib/64/
-L/fougeron/home/mretegan/software/fftw3/lib
LIBS     =  -lmkl_lapack -lmkl_ipf -lguide -lfftw3

OBJECTS_ARCHITECTURE = machine_intel.o
============================================

For compiling the fftw libs I've used the folowing flags:
============================================
#!/bin/sh
export CC='icc'
export CXX='icc'
export F77='ifort'
export FFLAGS='-O2 -mtune=itanium2'
export CFLAGS='-O2 -mtune=itanium2'
export CXXFLAGS='-O2 -mtune=itanium2'
# single precision
./configure --enable-float --enable-threads
--prefix=/fougeron/home/mretegan/software/fftw3
# double precision
#./configure --enable-threads --prefix=/fougeron/home/mretegan/software/fftw3
============================================

Any ideas on what should be changed in order to get cp2k compile with
"stronger" optimizations and without changing the compiler? (maybe I'm
asking for to much).
If not I'm going to try what standing on one foot as Teodoro suggested :).

Thanks a lot
Marius


On Mon, Mar 9, 2009 at 8:19 PM, Axel <akoh... at gmail.com> wrote:
>
>
>
> On Mar 9, 1:10 pm, "Santo K. P." <sant... at gmail.com> wrote:
>> Hi
>>
>> Have you checked whether your program requires RAM more than available on
>> your computer?
>
> regtest inputs are miniscule by design. so memory is
> not an issue.
>
> for the record. it works fine for me using
> intel 10.1 with these settings.
>
> DFLAGS   = -D__INTEL -D__FFTSGL -D__FFTSG -D__FFTW3 -D__LIBINT #-
> DCODATA_VERSION=1998
> CPPFLAGS = -traditional -C $(DFLAGS) -P
> FCFLAGS  = $(DFLAGS) -O2 -unroll -march=pentium3 -mtune=core2 -pc64 -
> fpp -heap-arrays 64
> LDFLAGS  = -i-static $(FCFLAGS) -L/opt/intel/mkl/10.0.1.014/lib/em64t -
> L$(HOME)/libint/lib
> LIBS     = -Wl,-Bstatic,--start-group,-lmkl_intel_lp64,-
> lmkl_sequential,-lmkl_core,--end-group,-lfftw3,-lfftw3f,-Bdynamic  \
>        ../../../libint_tools/libint_cpp_wrapper.o -lderiv -lint -lstdc
> ++
>
> cheers,
>   axel.
>
>>
>> Santo
>>
>>
>>
>> On Mon, Mar 9, 2009 at 11:03 AM, Fawzi Mohamed <fa... at gmx.ch> wrote:
>>
>> > If you have problems with a regtest that the web shows should work,
>> >        http://cp2k.berlios.de/regtest.html
>> > that is normally a good indication that you miscompiled something.
>> > The problem is probably your compiler, or your libraries.
>>
>> > Fawzi
>>
>> > On 9-mar-09, at 17:58, Marius Retegan wrote:
>>
>> > > I've forgot to say that the older version worked, even though I've got
>> > > some strange results  :-).
>>
>> > > On Mon, Mar 9, 2009 at 5:48 PM, Marius Retegan
>> > > <marius.s... at gmail.com> wrote:
>> > >> Hello,
>>
>> > >> I'm having some trouble running the cp2k/tests/QMMM/SE/regtest/
>> > >> water_3.inp test.
>> > >> With a version compiled this afternoon from CVS i get the following
>> > >> output (I posted only the beginning and the error message)
>>
>> > >> ==============================================================
>> > >>  mretegan at fougeron has created process
>> > >> number                        0     27382
>>
>> > >>  **** **** ******  **  PROGRAM STARTED AT              Mon Mar  9
>> > >> 17:41:14 2009
>> > >>  ***** ** ***  *** **   PROGRAM STARTED
>> > >> ON                              fougeron
>> > >>  **    ****   ******    PROGRAM STARTED
>> > >> BY                              mretegan
>> > >>  ***** **    ** ** **   PROGRAM PROCESS
>> > >> ID                                 27382
>> > >>  **** **  *******  **  PROGRAM STARTED IN /fougeron/home/mretegan/
>> > >> software/cp2k
>> > >>                                           /tests/QMMM/SE/regtest
>>
>> > >>  CP2K| version string:                  CP2K version 2.0.1
>> > >> (Development Version)
>> > >>  CP2K| is freely available from
>> >http://cp2k.berlios.de/
>> > >>  CP2K| Program compiled at                          Mon Mar  9
>> > >> 15:25:57 CET 2009
>> > >>  CP2K| Program compiled
>> > >> on                                              fougeron
>> > >>  CP2K| Program compiled for
>> > >> Linux-ia64-intel
>> > >>  CP2K| Last CVS
>> > >> entry                                                     /lib//
>> > >>  CP2K| Input file
>> > >> name                                               water_3.inp
>> > >> .
>> > >> .
>> > >> .
>> > >>  ********************** begin of velocity initialization
>> > >> ***********************
>> > >>  Initial
>> > >> Temperature
>> > >> 298.00 K
>> > >>  COM velocity:            0.000000000000      0.000000000000
>> > >> 0.000000000000
>> > >>  *********************** end of velocity initialization
>> > >> ************************
>>
>> > >>  Translating the system in order to center the QM fragment in the
>> > >> QM box.
>> > >>  QMMM| Information on the QM/MM Electrostatic Potential:
>>
>> > >>  DISTRIBUTION OF THE NEIGHBOR LISTS
>>
>> > >>  Total number of particle pairs:                            6
>> > >>  Total number of matrix elements:                          27
>> > >>  Average number of particle pairs:                          6
>> > >>  Maximum number of particle pairs:                          6
>> > >>  Average number of matrix element:                         27
>> > >>  Maximum number of matrix elements:                        27
>>
>> > >>  DISTRIBUTION OF THE OVERLAP
>>
>> > >>  Number  of non-zero blocks:                                6
>> > >>  Percentage non-zero blocks:                           100.00
>> > >>  Average number of blocks per CPU:                          6
>> > >>  Maximum number of blocks per CPU:                          6
>> > >>  Average number of matrix elements per CPU:                27
>> > >>  Maximum number of matrix elements per CPU:                27
>> > >>  QMMM| No QM/MM Electrostatic coupling. Just Mechanical Coupling!
>> > >> forrtl: severe (174): SIGSEGV, segmentation fault occurred
>> > >> Image              PC                Routine            Line
>> > >> Source
>> > >> cp2k.sopt          400000000268CF50  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000002687C50  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          40000000000B7BF0  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000000065F50  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          40000000005A1CC0  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          400000000059F980  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          40000000021EB680  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000001890170  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          400000000010C3C0  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          40000000000FD220  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          400000000010BCE0  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000000401B40  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000000400220  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          400000000000FD70  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          400000000000D390  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000000008200  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          40000000000072C0  Unknown               Unknown
>> > >> Unknown
>> > >> libc.so.6.1        2000000000555C50  Unknown               Unknown
>> > >> Unknown
>> > >> cp2k.sopt          4000000000007000  Unknown               Unknown
>> > >> Unknown
>> > >> ==============================================================
>>
>> > >> My first guess was that the program was miscompiled, and I've tried
>> > >> an
>> > >> older version compiled also from CVS on the 4 Feb 2009.
>> > >> ==============================================================
>> > >>  mretegan at fougeron has created process
>> > >> number                        0     27441
>>
>> > >>  **** **** ******  **  PROGRAM STARTED AT              Mon Mar  9
>> > >> 17:47:02 2009
>> > >>  ***** ** ***  *** **   PROGRAM STARTED
>> > >> ON                              fougeron
>> > >>  **    ****   ******    PROGRAM STARTED
>> > >> BY                              mretegan
>> > >>  ***** **    ** ** **   PROGRAM PROCESS
>> > >> ID                                 27441
>> > >>  **** **  *******  **  PROGRAM STARTED IN /fougeron/home/mretegan/
>> > >> software/cp2k
>> > >>                                           /tests/QMMM/SE/regtest
>>
>> > >>  CP2K| version string:                  CP2K version 2.0.1
>> > >> (Development Version)
>> > >>  CP2K| is freely available from
>> >http://cp2k.berlios.de/
>> > >>  CP2K| Program compiled at                          Mon Mar  9
>> > >> 17:07:32 CET 2009
>> > >>  CP2K| Program compiled
>> > >> on                                              fougeron
>> > >>  CP2K| Program compiled for
>> > >> Linux-ia64-intel
>> > >>  CP2K| Last CVS entry           xray_diffraction.F/1.25/Wed Feb  4
>> > >> 08:44:19 2009
>> > >>  CP2K| Input file
>> > >> name                                               water_3.inp
>> > >>  ==============================================================
>> > >> The same flags where used to compile both versions.
>>
>> > >> Does anybody have an idea on how to solve this?
>>
>> > >> Thanks,
>> > >> Marius
>>
>> --
>>
>> Dr. K. P. Santo
>> Post doctoral fellow
>> Department of Mechanical Engineering and
>> National Institute of  Nano Technology
>> University of Alberta
>> Edmonton, Canadahttp://www.cein.ualberta.ca/research/nint/theory-modeling-group/peopl...
> >
>



More information about the CP2K-user mailing list