Compilling problems

161 views
Skip to first unread message

rdela...@gmail.com

unread,
Feb 14, 2017, 7:11:16 AM2/14/17
to cp2k
Hello all.

I have been trying to compile and execute cp2k in my computer but i'm having problems.

I use a modified arch file including my routes to files and libreries. When I compile it works but wher runing the tests it fails in all the cases.

Could anyone help me with this? My computer is an intel i7-920 with 4 cores and 8 threadings. I have a CUDA capable graphic card so i like to enable it (I have installed the last version of the nvidia CUDA kit)
About the software i run ubuntu 16.04.4 with gfortran and gcc, both versions 5.4.0. Also I have installed the last version of the intel MKL library (aditionally i also have ACML). Finally I'd like to compile cp2k with libint, libxc and fftw. All three are compiled and installed in my computer

Any help for the creation of the appropiate arch file in wellcome.

That you all in advance.

Rafa

Jörg Saßmannshausen

unread,
Feb 14, 2017, 7:14:31 AM2/14/17
to cp...@googlegroups.com
Hi Refa,

could you send us your modified makefile please and what is the error message?

Without that information all we know is: it does not work!

All the best from a sunny London

Jörg
--
*************************************************************
Dr. Jörg Saßmannshausen, MRSC
University College London
Department of Chemistry
20 Gordon Street
London
WC1H 0AJ

email: j.sassma...@ucl.ac.uk
web: http://sassy.formativ.net

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
signature.asc

rdela...@gmail.com

unread,
Feb 14, 2017, 7:40:09 AM2/14/17
to cp2k
Hello and thank you Jörg

I compile the next arch file:

CC         = gcc
CPP        =
FC         = gfortran
LD         = gfortran
AR         = ar -r
ACML_INC   = /home/ralf/ACML/gfortran64_mp/include
ACML_LIB   = /home/ralf/ACML/gfortran64_mp/lib
FFTW_INC   = /usr/local/include/
FFTW_LIB   = /usr/local/lib/
LIBINT_INC = /usr/local/libint/1.1.4-stable/include
LIBINT_LIB = /usr/local/libint/1.1.4-stable/lib
LIBXC_INC  = /opt/etsf/include
LIBXC_LIB  = /opt/etsf/lib
DFLAGS     = -D__FFTW3 -D__LIBINT -D__LIBXC2\
             -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__MAX_CONTR=4
CPPFLAGS   =
FCFLAGS    = $(DFLAGS) -O2 -ffast-math -ffree-form -ffree-line-length-none\
             -fopenmp -ftree-vectorize -funroll-loops\
             -mtune=native\
             -I$(ACML_INC) -I$(FFTW_INC) -I$(LIBINT_INC) -I$(LIBXC_INC)
LDFLAGS    = $(FCFLAGS) -static-libgfortran
LIBS       = $(ACML_LIB)/libacml_mp.so\
             $(FFTW_LIB)/libfftw3.a\
             $(FFTW_LIB)/libfftw3_threads.a\
             $(LIBXC_LIB)/libxcf90.a\
             $(LIBXC_LIB)/libxc.a\
             $(LIBINT_LIB)/libderiv.a\
             $(LIBINT_LIB)/libint.a

And when I run the tests I obtain in all 2500 cases this kind of error

/home/ralf/cp2k-4.1/regtesting/make/ssmp/TEST-make-ssmp-2017-02-14_13-35-10/optimize_input/regtest-1/driver-stride.inp.out
/home/ralf/cp2k-4.1/regtesting/make/ssmp/../../..//exe/make/cp2k.ssmp: error while loading shared libraries: libacml_mp.so: cannot open shared object file: No such file or directory
EXIT CODE:  127  MEANING:  RUNTIME FAIL

I should use libacml_mp.a for the compilling but in my installation this file doesn appear

Rafa

Jörg Saßmannshausen

unread,
Feb 14, 2017, 7:50:05 AM2/14/17
to cp...@googlegroups.com
Hi Rafa,

there are two things:

a) why do you use ACML when you got an Intel CPU? ACML is for AMD Opterons and
I am not sure whether it makes sense to use a high performance BLAS library
which was tuned for a different chip family.
If you want to stay clear of proprietary BLAS libs I would suggest to use
OpenBLAS or ATLAS.

b) it appears that your library is not in the search path for the libraries.
There are three ways of fixing this.
- $ export LD_LIBRARY_PATH=/path/to/libacml_mp.so:$LD_LIBRARY_PATH
- add /path/to/libacml_mp.so in /etc/ld.so.conf and run ldconfig
- use -Wl,--rpath=/path/to/libacml_mp.so when you compile for the linking.

The first will only last for the current shell session and the second is a
global setting. The third means you hard-code the path into your binary file.

Like all things, there are pros and cons for all of that. ;-)

All the best

Jörg
signature.asc

rdela...@gmail.com

unread,
Feb 14, 2017, 8:03:46 AM2/14/17
to cp2k
I use ACML because i red that for using MKL ifort compiler is needed, and i don't have it.

Anyway I'm going to try ATLAS.

I'll tell you. Thank you

Rafa

Jörg Saßmannshausen

unread,
Feb 14, 2017, 8:43:49 AM2/14/17
to cp...@googlegroups.com
Hi Rafa,

that is not correct. You can use MKL with gfortran. You will need the
libmkl_gf* libs for that.

Good luck!

Jörg
> > email: j.sassma...@ucl.ac.uk <javascript:>
signature.asc
Reply all
Reply to author
Forward
0 new messages