[Pw_forum] example01 errors;conjugate-gradient algorithm;changing code functionals

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Wed May 30 18:26:23 CEST 2007


On Wed, 30 May 2007, Helen wrote:

helen,

HE> Hi,
HE> I've been working a few days on the problem and have found that it occurs 
HE> when ZGEMM is called in the ccalbec.f90 routine in the PW directory. The 
HE> routine is called while calculating force_us_k. When the routine is called I 
HE> get the error message:
HE> forrtl: severe (174): SIGSEGV, segmentation fault occurred
HE> 
HE> Stack trace terminated abnormally.

HE> I've checked all the input variables and they all seem to be the correct 
HE> size and type, apart from perhaps npw which I thought should equal npwx? 
HE> However I also tried running with npwx instead of npw in ZGEMM, whcih 
HE> doesn't solve the problem. I've also checked that ZGEMM works on a little 
HE> test routine I created so the ZGEMM is present and in principle works.
HE> 
HE> Any ideas what is causing this segmentation fault, maybe a memory leak?

this looks like you might be running out of stack space.
since you seem to be using the intel compiler, you'll have
to enlarge the stack space user limit. the default setting
on many installations is too small. try setting it to the
maximum via either: ulimit -s unlimited (if you are using a
bourne shell, e.g. bash) or: limit stacksize unlimited
(if you are running in a c-shell, e.g. tcsh).


HE> A different question: the program is compiling and running on one computer, 
HE> I tried running on a different computer and I get the error message
HE> 
HE> error while loading shared libraries: libguide.so: cannot open shared object 
HE> file: No such file or directory

this is due to dynamicsally linking libguide (which is
provided by both your compiler and mkl).

HE> I tried to stop (unsuccessfully) dynamic linking by writing
HE> 
HE> ./configure FFLAGS='-i-static'

FFLAGS is not a good place for that as it may also disable
optimization, LDFLAGS would be. it is probably easier to
edit your make.sys file manually. linux machines are so
unpredictably installed, that configure has a really hard
time to get it perfect. to trick the intel compiler into
linking libguide statically, i use:
LDFLAGS="-i-static -openmp"

here are my settings to compile QE with intel and intel MKL
(on x86_64, for i386 just replace lib/em64t with lib/32 and
-lmkl_em64t with -lmkl_ia32 ).

DFLAGS         =  -D__INTEL -D__FFTW -D__MPI -D__PARA
MPIF90         = mpif90
#F90           = ifort
CC             = icc
F77            = ifort
CPP            = cpp
CPPFLAGS       = -P -traditional $(DFLAGS) $(IFLAGS)
CFLAGS         = -O3 $(DFLAGS) $(IFLAGS)
F90FLAGS       = $(FFLAGS) -nomodule -fpp $(FDFLAGS) $(IFLAGS) 
$(MODFLAGS)
FFLAGS         = -O2 -assume byterecl -tpp6 -pc64 -unroll
FFLAGS_NOOPT   = -O0 -assume byterecl
LD             = mpif90
LDFLAGS        = -i-static -openmp
BLAS_LIBS      = -L/opt/intel/mkl/9.0/lib/em64t -lmkl_em64t 
LAPACK_LIBS    = -L/opt/intel/mkl/9.0/lib/em64t -lmkl_lapack
FFT_LIBS       =  -lfftw 

n.b. this is for parallel. in serial, you have to drop -D__PARA -D__MPI
and use ifort instead of mpif90.

HE> 
HE> 
HE> or by writing
HE> 
HE> ./configure FFLAGS='-static'

using fully static linking is no longer a good idea,
particularly not on linux machines, since the resulting
executables are usually _less_ portable than semi-statically
linked executables.

hope that helps,

  axel.

HE> 
HE> Any ideas of how to fix this problem?
HE> 
HE> Thnks for your help,
HE> 
HE> Helen
HE> 
HE> 

-- 
=======================================================================
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 users mailing list