Page 2 of 2

Re: Precompiler error with GNU compiler

Posted: Thu Jun 23, 2022 3:21 pm
by lfmenchero
Hi Nicola.

Finally I got what was wrong, I needed to add the flags "-E -P" to the Fortran and C preprocessors:

export CPP="/opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0/bin/gcc -E -P"
export FPP="/opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0/bin/gfortran -E -P -cpp"

Now the precompiler works, and I get the correct object make files.

Nevertheless, I got in a new error, the libraries do not compile.
Is it possible that some of these libraries do not compile with GCC 9.3.0?

Help will be appreciated.

Thanks.
Luis.

-------------------------------------------------------------------------------------
$ ./configure --prefix=/opt/apps/yambo/5.1.0/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0+fftw3-3.3.10+hdf5-1.12.2+petsc-3.17.2 \
> --enable-mpi=yes --with-mpi-path=/opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0 \
> --with-blas-libs=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/blas/3.8.0/gcc-9.3.0/libblas.a \
> --with-lapack-libs=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/lapack/3.9.0/gcc-9.3.0/lib64/liblapack.a \
> --with-fft-path=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_float/3.3.10/gcc-9.3.0+openmpi-4.0.4 \
> --with-hdf5-path=/opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4 \
> --with-petsc-path=/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0
... Success ...

$ make -j1 core
... Outputs ...
[src/bse] libbse.a (lib)
[driver] yambo (checking work to be done)
[driver] yambo
[driver] yambo (link)
yambo linking failed. Check logs/compile_yambo.log
make[1]: *** [yambo] Error 1
yambo build failed

$ cat log/compile_yambo.log
... lots of data ...
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*, char*)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::clear()@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data(char*)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_capacity(unsigned long)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_local_data()@GLIBCXX_3.4.21'
/opt/apps/petsc/3.17.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_set_length(unsigned long)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status

Re: Precompiler error with GNU compiler

Posted: Thu Jun 23, 2022 3:30 pm
by lfmenchero
Hello again.
If I remove the specification for the petsc library, and I specify a precompiled version of iotk (it does not compile iotk), I get the following error.
Thanks.
Luis.

-------------------------------------------------------------------------------------------------
$ ./configure --prefix=/opt/apps/yambo/5.1.0/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0+fftw3-3.3.10+hdf5-1.12.2+petsc-3.17.2 --enable-mpi=yes --with-mpi-path=/opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0 --with-blas-libs=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/blas/3.8.0/gcc-9.3.0/libblas.a --with-lapack-libs=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/lapack/3.9.0/gcc-9.3.0/lib64/liblapack.a --with-fft-path=/opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_float/3.3.10/gcc-9.3.0+openmpi-4.0.4 --with-hdf5-path=/opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4 --with-iotk-libs=/opt/apps/iotk/1.2.0/gcc-4.8.5/lib/libiotk.a
... Success ...

$ make -j1 core
... Outputs ...
[src/wf_and_fft] libwf_and_fft.a (lib)
[driver] yambo (checking work to be done)
[driver] yambo
[driver] yambo (link)
yambo linking failed. Check logs/compile_yambo.log
make[1]: *** [yambo] Error 1
yambo build failed

$ cat log/compile_yambo.log
... Outputs ...
/usr/bin/ld: cannot find -lbse
/usr/bin/ld: cannot find -lacfdt
/usr/bin/ld: cannot find -lqp
/usr/bin/ld: cannot find -lpol_function
/usr/bin/ld: cannot find -ldipoles
/usr/bin/ld: cannot find -ltddft
/usr/bin/ld: cannot find -lsetup
/usr/bin/ld: cannot find -lqp_control
/usr/bin/ld: cannot find -linterpolate
/usr/bin/ld: cannot find -lcoulomb
/usr/bin/ld: cannot find -lstop_and_restart
/usr/bin/ld: cannot find -linterface
/usr/bin/ld: cannot find -lxc_functionals
/usr/bin/ld: cannot find -lio
/usr/bin/ld: cannot find -lYio
/usr/bin/ld: cannot find -ltiming
/usr/bin/ld: cannot find -lcommon
/usr/bin/ld: cannot find -lcommunicate
/usr/bin/ld: cannot find -lparser
/usr/bin/ld: cannot find -lparallel
/usr/bin/ld: cannot find -lbz_ops
/usr/bin/ld: cannot find -llinear_algebra
/usr/bin/ld: cannot find -lmatrices
/usr/bin/ld: cannot find -lmodules
/usr/bin/ld: cannot find -lcommunicate
/usr/bin/ld: cannot find -lmemory
/usr/bin/ld: cannot find -ltools
/usr/bin/ld: cannot find -lyambo_Ydriver_main
/usr/bin/ld: cannot find -lyambo_Ydriver_interface
/usr/bin/ld: cannot find -lyambo_Ydriver_options
/usr/bin/ld: cannot find -ldriver
collect2: error: ld returned 1 exit status

Re: Precompiler error with GNU compiler

Posted: Fri Jun 24, 2022 8:14 am
by Daniele Varsano
Dear Luis,

can you post the logs/compile_yambo.log file?
nest, please sign your post with the full name and affiliation, it is a rule of the forum. You can do once for all by filling the signature in your user profile.

Best,
Daniele

Re: Precompiler error with GNU compiler

Posted: Fri Jun 24, 2022 10:37 am
by lfmenchero
Hi Daniele.
I attach here the log files.
Thanks.
Luis.

Re: Precompiler error with GNU compiler

Posted: Mon Jul 04, 2022 12:04 pm
by Nicola Spallanzani
Hi Luis,
I suggest to you to let Yambo compile by himself the iotk library.

Best,
Nicola

Re: Precompiler error with GNU compiler

Posted: Thu Jul 07, 2022 5:03 pm
by lfmenchero
Hi Nicola.
Finally I could compile it and make it work in the cluster.
I made yambo to compile its own implementation of iotk, and it worked. The compilation was not completely clean, some warnings, but it works. I will try updates when they are released, they should be cleaner.
Thank you for your help!
Best.
Luis.