[gmx-users] AIX XLC Gromacs-5.1-rc1. Undefined reference. Underscore issue.

Mark Abraham mark.j.abraham at gmail.com
Thu Aug 20 21:48:12 CEST 2015


Hi,

Using -DGMX_FFT_LIBRARY=essl is not meaningful (per install guide), and
frankly it's a build-system bug if it doesn't give a fatal error :-) That's
likely the reason for the undefined symbols for the GROMACS wrapper
functions that call the underlying FFT library (and that the conditional
compilation can mysteriously fail like this is also a bug). If essl has a
magic FFTW compatibility mode, you should use -DGMX_FFT_LIBRARY=fftw3 and
set -DCMAKE_PREFIX_PATH=/path/to/essl/fftw/dir/ so that the essl fftw
library gets found before any other FFTW library on the system.

(and *don't* use -O0 for production work!)

Mark

On Thu, Aug 20, 2015 at 9:05 PM Carlos Aguni <sorlaker at gmail.com> wrote:

> Hello Mark!
>
> Thank you for your advice!
> I'm now using Gromacs-5.1.
> I've added -DGMX_BUILD_MDRUN_ONLY=ON on the previous cmake configuration.
>
> Here's my cmake and error log now:
>
> export TPREFIX=/home/ibm/softwares/gromacs/xlc/vsx/omp1/flagO0/
>
> export flags1="-qnoinline -O0 -qsmp=omp"
>
> export blaslapackflags="-L/usr/lib -lessl -L/opt/ibm/xlf/15.1.2/lib/
> -lxlf90 -lxlf90_t -L/opt/ibm/xlsmp/4.1.2/lib -lxlomp_ser "
>
> cmake .. -DGMX_MPI=on -DGMX_DOUBLE=off -DCMAKE_INSTALL_PREFIX=$TPREFIX
> -DBUILD_SHARED_LIBS=OFF -DGMX_FFT_LIBRARY=essl  -DGMX_OPENMP=on
> -DCMAKE_VERBOSE_MAKEFILE=on -DGMX_GPU=off -DGMX_EXTERNAL_LAPACK=ON
> -DGMX_EXTERNAL_BLAS=ON -DGMX_BLAS_USER="$blaslapackflags"
> -DGMX_LAPACK_USER="$blaslapackflags" -DCMAKE_CXX_FLAGS="$flags1"
> -DCMAKE_C_FLAGS="$flags1" -DGMX_THREAD_MPI=off -DGMX_SIMD=IBM_VSX
>  -DCMAKE_C_COMPILER=mpixlc -DCMAKE_CXX_COMPILER=mpixlc++
> -DFFT_LINKER_FLAGS="" -DLINEAR_ALGEBRA_LIBRARIES=""
> -DCOVERAGE_EXTRA_FLAGS="" -DCMAKE_VERBOSE_MAKEFILE=ON
> -DCMAKE_SHARED_LINKER_FLAGS="-qnoextname" -DGMX_BUILD_MDRUN_ONLY=ON
> -DGMX_BUILD_SHARED_EXE=OFF
>
> ------------------------------------------------------------------------
> ---------
>
> Error log:
>
> Linking CXX executable ../../bin/mdrun_mpi
>
> cd /home/ibm/crash/2gromacs-5.1-agosto/gromacs-5.1/single/src/programs &&
> /usr/bin/cmake -E cmake_link_script CMakeFiles/mdrun.dir/link.txt
> --verbose=1
>
> /usr/bin/mpixlc++    -qarch=auto -qaltivec   -std=c++0x -qnoinline -O0
> -qsmp=omp -Wextra -Wno-missing-field-initializers -Wpointer-arith -Wall
> -Wno-unused-function  -O3 -DNDEBUG
> CMakeFiles/mdrun.dir/mdrun_main.cpp.o
> CMakeFiles/mdrun_objlib.dir/mdrun/membed.c.o
> CMakeFiles/mdrun_objlib.dir/mdrun/resource-division.cpp.o
> CMakeFiles/mdrun_objlib.dir/mdrun/runner.cpp.o
> CMakeFiles/mdrun_objlib.dir/mdrun/md.cpp.o
> CMakeFiles/mdrun_objlib.dir/mdrun/mdrun.cpp.o
> CMakeFiles/mdrun_objlib.dir/mdrun/repl_ex.cpp.o  -o ../../bin/mdrun_mpi
> -rdynamic ../../lib/libgromacs_mdrun_mpi.a -lrt
> /opt/ibmmath/essl/5.3/FFTW3/src/lib64/libfftw3_essl.a -L/usr/lib -lessl
> -L/opt/ibm/xlf/15.1.2/lib/ -lxlf90 -lxlf90_t -L/opt/ibm/xlsmp/4.1.2/lib
> -lxlomp_ser
>
> ../../lib/libgromacs_mdrun_mpi.a(copyrite.cpp.o): In function
> `gmx_print_version_info(_IO_FILE*)':
>
> copyrite.cpp:(.text+0x1310): undefined reference to
> `gmx_fft_get_version_info'
>
> copyrite.cpp:(.text+0x15f4): undefined reference to
> `gmx_fft_get_version_info'
>
> ../../lib/libgromacs_mdrun_mpi.a(fft.cpp.o): In function
> `gmx_fft_init_many_1d':
>
> fft.cpp:(.text+0x98): undefined reference to `gmx_fft_init_1d'
>
> ../../lib/libgromacs_mdrun_mpi.a(fft.cpp.o): In function
> `gmx_fft_init_many_1d_real':
>
> fft.cpp:(.text+0x1a8): undefined reference to `gmx_fft_init_1d_real'
>
> ../../lib/libgromacs_mdrun_mpi.a(fft.cpp.o): In function
> `gmx_many_fft_destroy':
>
> fft.cpp:(.text+0x300): undefined reference to `gmx_fft_destroy'
>
> ../../lib/libgromacs_mdrun_mpi.a(fft.cpp.o): In function
> `gmx_fft_many_1d_real$AF7_4':
>
> fft.cpp:(.text+0xfd0): undefined reference to `gmx_fft_1d_real'
>
> ../../lib/libgromacs_mdrun_mpi.a(fft.cpp.o): In function
> `gmx_fft_many_1d$AF8_3':
>
> fft.cpp:(.text+0x10c0): undefined reference to `gmx_fft_1d'
>
> Thanks in advance!
> Carlos.
>
> On Thu, Aug 20, 2015 at 7:42 AM, Mark Abraham <mark.j.abraham at gmail.com>
> wrote:
>
> > Hi,
> >
> > GROMACS 5.1 is out, please don't install 5.1-rc1 any more. There's a
> little
> > bit of advice about using custom linear algebra libraries at
> >
> >
> http://manual.gromacs.org/documentation/5.1/install-guide/index.html#linear-algebra-libraries
> > but
> > you don't need to bother with such libraries unless you know mdrun will
> be
> > used to do normal-mode analysis or something. You might still run into
> > problems - if so, we'll want to know how you ran cmake in the first
> place.
> >
> > Mark
> >
> > On Thu, Aug 20, 2015 at 1:20 AM Carlos Aguni <sorlaker at gmail.com> wrote:
> >
> > > Helo guys!
> > >
> > > I'm trying to compile Gromacs-5.1-rc1 with XLC 13.1.2 & ESSL 5.3 and
> I'm
> > > facing
> > > an undefined reference error.
> > > Here's what I got:
> > >
> > > $ cd
> > /home/ibm/crash/gromacs-agosto/2/gromacs-5.1-rc1/single/share/template
> > > && /usr/bin/cmake -E cmake_link_script CMakeFiles/template.dir/link.txt
> > > --verbose=1
> > >
> > > $ /usr/bin/mpixlc++    -qarch=auto -qaltivec   -std=c++0x -qnoinline
> -O0
> > > -qsmp=omp -Wextra -Wno-missing-field-initializers -Wpointer-arith -Wall
> > > -Wno-unused-function  -O3 -DNDEBUG      -qextname
> > > CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template -rdynamic
> > > ../../lib/libgromacs_mpi.so.1.0.0 -ldl -lrt -lessl -L/usr/lib -lessl
> > > -L/opt/ibm/xlf/15.1.2/lib/ -lxlf90 -lxlf90_t
> -Wl,-rpath,"\$ORIGIN/../lib"
> > >
> > > /opt/ibm/xlC/13.1.2/bin/.orig/xlc++: warning: 1501-218 file
> > > ../../lib/libgromacs_mpi.so.1.0.0 contains an incorrect file suffix
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlaev2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dorm2r_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > > `gmx_fft_init_1d_real'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlascl_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slaev2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slarnv_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slartg_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlasr_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > > `gmx_fft_init_2d_real'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `ssyevr_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > `gmx_fft_1d_real'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slasr_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `sorm2r_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlaset_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slacpy_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlapy2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlarnv_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > > `gmx_fft_get_version_info'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `gmx_fft_1d'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slanst_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dgeqr2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `sgeqr2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > `gmx_fft_cleanup'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `ssteqr_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dsteqr_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlacpy_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slapy2_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlartg_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > `gmx_fft_destroy'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slascl_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `slaset_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to `dlanst_'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > `gmx_fft_2d_real'
> > >
> > > ../../lib/libgromacs_mpi.so.1.0.0: undefined reference to
> > `gmx_fft_init_1d'
> > >
> > > I think that's an underscore problem. Because ESSL has those functions
> > but
> > > the
> > >
> > > flags responsible to solve that (-qextname -qnoextname) isn't working:
> > >
> > > $ objdump -x /usr/lib/libessl.so | grep dlaev2
> > >
> > > 0000000000000000 l    df *ABS* 0000000000000000
> > > /home/essl/src/work/dlaev2.f
> > >
> > > 0000000000aa67a0 l     F .text 000000000000023c              0x60
> dlaev2
> > >
> > > $ objdump -x /usr/lib/libessl.so | grep dlacpy
> > >
> > > 0000000000000000 l    df *ABS* 0000000000000000
> > > /home/essl/src/work/dlacpyd.f
> > >
> > > 0000000000000000 l    df *ABS* 0000000000000000
> > > /home/essl/src/work/dlacpy.f
> > >
> > > 0000000000a99ca0 l     F .text 0000000000000440              0x60
> dlacpyd
> > >
> > > 0000000000a9a0e0 l     F .text 00000000000003b0              0x60
> dlacpy
> > >
> > >
> > > Can anyone help?
> > >
> > >
> > > Thanks in advance!
> > >
> > > Carlos.
> > > --
> > > Gromacs Users mailing list
> > >
> > > * Please search the archive at
> > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > posting!
> > >
> > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > >
> > > * For (un)subscribe requests visit
> > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > > send a mail to gmx-users-request at gromacs.org.
> > >
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list