undefined reference to

777 views
Skip to first unread message

carlos.qu...@gmail.com

unread,
Oct 9, 2014, 10:14:48 AM10/9/14
to plumed...@googlegroups.com
Dear Plumed users, 

The following error occurred when install the Plumed program:

------------------------------------------------------------//------------------------------------------------------------

/home1/03137/tg824360/opt/lib/liblapack.a(dtrtri.f.o): In function `dtrtri_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dtrtri.f:(.text+0x1f5): undefined reference to `for_concat'

/home1/03137/tg824360/opt/lib/liblapack.a(ilaenv.f.o): In function `ilaenv_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/ilaenv.f:(.text+0x11f): undefined reference to `for_cpystr'

/home1/03137/tg824360/opt/lib/liblapack.a(iparmq.f.o): In function `iparmq_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/iparmq.f:(.text+0xd0): undefined reference to `f_lanint_val'

/home1/03137/tg824360/opt/lib/liblapack.a(xerbla.f.o): In function `xerbla_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/xerbla.f:(.text+0x10): undefined reference to `for_len_trim'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/xerbla.f:(.text+0x55): undefined reference to `for_write_seq_fmt'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/xerbla.f:(.text+0x6e): undefined reference to `for_write_seq_fmt_xmit'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/xerbla.f:(.text+0x8b): undefined reference to `for_stop_core'

/home1/03137/tg824360/opt/lib/liblapack.a(dormtr.f.o): In function `dormtr_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormtr.f:(.text+0x293): undefined reference to `for_concat'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormtr.f:(.text+0x360): undefined reference to `for_concat'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormtr.f:(.text+0x435): undefined reference to `for_concat'

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormtr.f:(.text+0x502): undefined reference to `for_concat'

/home1/03137/tg824360/opt/lib/liblapack.a(dormql.f.o): In function `dormql_':

/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormql.f:(.text+0x235): undefined reference to `for_concat'

/home1/03137/tg824360/opt/lib/liblapack.a(dormql.f.o):/home1/03137/tg824360/programs/lapack-3.5.0/SRC/dormql.f:(.text+0x3a3): more undefined references to `for_concat' follow

/usr/bin/ld: link errors found, deleting executable `plumed'

make[5]: *** [plumed] Error 1

make[5]: Leaving directory `/home1/03137/tg824360/programs/plumed-2.0.2/src/lib'

make[4]: *** [all-static] Error 2

make[4]: Leaving directory `/home1/03137/tg824360/programs/plumed-2.0.2/src/lib'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home1/03137/tg824360/programs/plumed-2.0.2/src/lib'

make[2]: *** [lib] Error 2

make[2]: Leaving directory `/home1/03137/tg824360/programs/plumed-2.0.2/src'

make[1]: *** [lib] Error 2

make[1]: Leaving directory `/home1/03137/tg824360/programs/plumed-2.0.2'

make: *** [all] Error 2


------------------------------------------------------------//------------------------------------------------------------


In this case, i edited the makefile.conf to:


------------------------------------------------------------//------------------------------------------------------------


#CHECK_BOUNDARIES=-D_GLIBCXX_DEBUG

LIBS=-ldl


DYNAMIC_LIBS=-L/usr/lib -lstdc++ -L/<DIRECTORY OF LAPACK LIBRARY>/lib -llapack -L/<DIRECTORY OF LAPACK LIBRARY>/lib -lblas

DOUBLEPRECISION=-r8


CPPFLAGS=-D__PLUMED_HAS_DLOPEN $(CHECK_BOUNDARIES) -I. $(PLUMED_INCLUDE)

CXXFLAGS=-O -fPIC -Wall -wd981,383,1418


CFLAGS=-O -fPIC -Wall

LDFLAGS=-rdynamic


SOEXT=so

LDSO=icc -shared $(CFLAGS)

LD=icpc

LDF90=ifort

CXX=icpc

CC=icc

FC=ifort

GCCDEP=g++


------------------------------------------------------------//------------------------------------------------------------


Please, someone could help me solve this problem?


Thanks,

Carlos

davide branduardi

unread,
Oct 9, 2014, 11:24:13 AM10/9/14
to plumed...@googlegroups.com
Hi!

It seems some problem coming from Lapack/Blas configuration.
I would try
1) Swap the Lapack/Blas ordering in the line DYNAMIC_LIBS library and check that they point to the right libraries and they are the right version (you should probably have a .so )
2) Redownload/Recompile Lapack+blas

D

Giovanni Bussi

unread,
Oct 9, 2014, 11:28:40 AM10/9/14
to plumed...@googlegroups.com
Another possibility is that you have to add fortran libraries.

I assume you already read the manual and tried this:
"First of all, the DYNAMIC_LIB variable in the configuration file should contain the flag necessary to load these libraries (typically -llapack -lblas, in some case followed by -lgfortran but full path specification with -L should be necessary depending on your system configuration)."

Giovanni


--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/CAEHxBqmkt_-JbrgOK%2BcBnCG9WhZOgG6%2BENhUkb6qHPVa5t560A%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

carlos.qu...@gmail.com

unread,
Oct 9, 2014, 1:07:35 PM10/9/14
to plumed...@googlegroups.com
Hi,

Fist, thanks for suggestions. I did the procedure suggest by you and Davide, and occurred the same error. On the last try, i edited the following line of the Makefile.conf:

DYNAMIC_LIBS=-L/usr/lib64 -lstdc++ -lgfortran -L/home1/03137/tg824360/opt/lib -llapack -lblas


The Lapack/Blas libraries found in /home1/03137/tg824360/opt/lib are liblapack.a/libblas.a, and Fortran/std++ libraries found in /usr/lib64 are libgfortran.so.1, libgfortran.so.3, libstd++.so.5 and libstd++.so.6. According  to the manual, the problem would be solver with addition of -lgfortran flag. I also tried with 'SOEXT=' (in white), but no success. Any idea?


Thanks for help,

Carlos



Giovanni Bussi

unread,
Oct 9, 2014, 1:11:19 PM10/9/14
to plumed...@googlegroups.com
Ask to your system administrator which flags are required to link lapack.

A possible alternative is to:
1. Switch to plumed 2.1
2. Use autoconf (./configure)

In this way if lapack/blas are not found an internal replacement will be used.

Giovanni

carlos.qu...@gmail.com

unread,
Oct 10, 2014, 2:53:05 PM10/10/14
to plumed...@googlegroups.com
Hi Giovanni,

Many Many Many thanks for help. I asked to the system administrator which flags are required to link lapack, and he suggested use 'ifort' (option -mkl) for performance reasons. Now, the plumed program is worked.

Best,
Carlos
Reply all
Reply to author
Forward
0 new messages