Page 1 of 1

Yambo compiling with QE.6.4.1

Posted: Mon Dec 30, 2019 6:45 am
by abhirupp
Dear Yambo users and developers,

I am trying to compile Yambo with QE.6.4.1 using two different way

1. While trying to compile yambo separately using the QE linker using the following command

./configure --with-iotk='/home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/iotk' --with-p2y=6.4--with-netcdf='/usr/local/'

ERROR:

>>>[Linking yambo]<<<
make[2]: Entering directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
cd /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver; /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/sbin/moduledep.sh yambo_driver.o > /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver/make.dep
make[2]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
make[2]: Entering directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
yambo_driver.F
driver.o: In function `main':
driver.c:(.text+0x0): multiple definition of `main'
/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/for_main.o:for_main.c:(.text+0x0): first defined here
/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/for_main.o: In function `main':
for_main.c:(.text+0x2a): undefined reference to `MAIN__'
make[2]: *** [yambo] Error 1
make[2]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
make[1]: *** [yambo] Error 2
make[1]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0'
yambo build failed

2. While trying to compile yambo within the QE package using the following command

make yambo interfaces

ERROR:

setting DFLAGS... -D__DFTI -D__MPI
setting IFLAGS... -I$(TOPDIR)/include -I$(TOPDIR)/FoX/finclude -I$(TOPDIR)/S3DE/iotk/include/ -I/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/compilers_and_libraries_2017.4.196/linux/mkl/include
configure: creating ./config.status
config.status: error: cannot find input file: `install/make_lapack.inc.in'
make[1]: *** [configure-yambo] Error 1
make[1]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/install'
make: *** [yambo] Error 1


Any help would be appreciated.

Thanks,
Abhirup Patra
Postdoctoral Researcher
Department of Chemistry
University of Pennsylvania

Re: Yambo compiling with QE.6.4.1

Posted: Tue Dec 31, 2019 11:14 am
by andrea.ferretti
Dear Abhirup,

thanks for posting. It seems that the deployment of the yambo website has broken the internal compilation of yambo
within QE. In case, the fix is quite simple and one just needs to re-direct the automatic download of yambo sources to
the correct link (or to provide yourself a tarball named yambo-stable-latest.tar.gz or yambo-devel-latest.tar.gz in the QE/archive folder).
I'll try to provide the proper link to fix in QE/install/plugins_list in a following email.
Otherwise, you may take a fresh download of yambo-4.4.0, open the tarball, rename yambo-4.4.0/ as yambo-stable/ and
make a new tar ball:

Code: Select all

tar cvfz yambo-stable-latest.tar.gz yambo-stable
Once this is places in QE/archive/ you should be able to issue

Code: Select all

make yambo
from within QE

The above is just a quick fix, while a proper one will be put in place asap. Overall, I would recommend to compile yambo-4.4.0 as self-standing,
which should be quite simple. (don't forget to run a make distclean if you are using an existing yambo-4.4.0 folder).

Some options that I've tested using the intel 2017 compiler:

Code: Select all

 ./configure       # without any options
works in my case, recognises the intel parallel environment (if not, see the last example below), and compiles without issues.
The biggest problem here is that all libraries including bias and lapack are internally compiled, which is non-optimal

A simple but better option is to use something like this:

Code: Select all

MKLROOT="/opt/intel/mkl/lib/intel64"
./configure --with-blas-libs="-L$MKLROOT -lmkl_intel_lp64  -lmkl_sequential -lmkl_core" \
                --with-lapack-libs="-L$MKLROOT -lmkl_intel_lp64  -lmkl_sequential -lmkl_core"
As a last example, here is a production-ready configure script that I use on some of our machines with the intel environment:

Code: Select all

./configure \
  FC=ifort \
  F77=ifort \
  CC=icc \
  PFC=mpiifort  \
  --with-blas-libs="-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64  -lmkl_sequential -lmkl_core" \
  --with-lapack-libs="-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64  -lmkl_sequential -lmkl_core" \
  --with-scalapack-libs="-L/opt/intel/mkl/lib/intel64 -lmkl_scalapack_lp64" \
  --with-blacs-libs="-L/opt/intel/mkl/lib/intel64 -lmkl_blacs_intelmpi_lp64" \
  --with-fft-libs="-mkl" \
  --enable-time-profile \
  --enable-memory-profile \
  --enable-open-mp \
  --enable-msgs-comps
take care
Andrea

Re: Yambo compiling with QE.6.4.1

Posted: Tue Dec 31, 2019 3:34 pm
by andrea.ferretti
meantime the links on the yambo-code.org websites have been fixed (thanks to Davide Sangalli), so that
the compilation of yambo from within QE is now working again.

take care,
and happy new year to all yamboers !!

Andrea

BTW: still much better to compile yambo as stand-alone, since you gain more control over compilation flags,
libraries to link, and so on.

Re: Yambo compiling with QE.6.4.1

Posted: Sat Jan 04, 2020 5:33 pm
by abhirupp
Dear Andrea,

Thank you very very much for the nice answers. I tried installing using the configure method you mentioned and it did not work. Here is what I got-


MKLROOT="/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/mkl/lib/intel64"

./configure --with-blas-libs="-L$MKLROOT -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" --with-lapack-libs="-L$MKLROOT -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"

make all

>>>[Linking yambo]<<<
make[2]: Entering directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
cd /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver; /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/sbin/moduledep.sh yambo_driver.o > /home/tuf43805/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver/make.dep
make[2]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
make[2]: Entering directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
yambo_driver.F
driver.o: In function `main':
driver.c:(.text+0x0): multiple definition of `main'
/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/for_main.o:for_main.c:(.text+0x0): first defined here
/gpfs/opt/tools/intel/parallel_studio_xe_2017_update4/compilers_and_libraries_2017.4.196/linux/compiler/lib/intel64_lin/for_main.o: In function `main':
for_main.c:(.text+0x2a): undefined reference to `MAIN__'
make[2]: *** [yambo] Error 1
make[2]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0/driver'
make[1]: *** [yambo] Error 2
make[1]: Leaving directory `/gpfs/work/tuf43805/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0'
yambo build failed



I get the same linking problem with lapack when I tried to compile it using "make yambo" command of QE.

Thank you very much for your answer, I really appreciate it.

Best regards,
Abhirup

Re: Yambo compiling with QE.6.4.1

Posted: Sat Jan 04, 2020 6:31 pm
by andrea.ferretti
Ok,
Now I think thesis related to the intel/compiler + yambo interaction...
In my case I was able to compile it out of the box using intel 2017.

If you post back the config.log file and the output of
ifort -v
icc -v
mpif90 -v (or mpiifort if you are using intel mpi)

we can have a deeper look.

take care
Andrea

Re: Yambo compiling with QE.6.4.1

Posted: Sun Jan 05, 2020 3:12 am
by abhirupp
Dear Andrea,

Thank you very much for your prompt response. Here are the outputs-

tuf43805@login1:~/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0$ ifort -v
ifort version 17.0.4

tuf43805@login1:~/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0$ icc -v
icc version 17.0.4 (gcc version 4.8.5 compatibility)

tuf43805@login1:~/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0$ mpif90 -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

tuf43805@login1:~/work/QE-6.4.1/q-e-qe-6.4.1/yambo-4.4.0$ mpiifort -v
ifort version 17.0.4

Attached here is the config.log file.

Please let me know if you need anything else.

Best,
Abhirup

Re: Yambo compiling with QE.6.4.1

Posted: Tue Jan 07, 2020 3:22 pm
by andrea.ferretti
Hi Abhirup,

from the snippet below, it seems that the intel environment is not recognised (DEBUG_FLAGS are for gfortran, FCKIND=gfortran
while F77 and FC are set equal to mpiifort).
Don't know how it comes.
Did you try running configure as follows:

./configure FC=ifort CC=icc --with-blas-libs="..." --with-lapack-libs=""

?

If nothing simple like the above works, you may want to get in touch with your sys admin to check how to load a clean
Intel environment.

take care
Andrea

Code: Select all

DEBUG_FLAGS='-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow'
DEFS='-DHAVE_CONFIG_H'
DP_check='-'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/usr/bin/grep -E'
ETSF_INCS=' '
ETSF_LIBS=' '
ETSF_str=' - '
EXEEXT=''
F77='mpiifort'
F90SUFFIX='.f90'
F90_MODULE_FLAG='-I'
FC='mpiifort'
FCFLAGS='-O3 -g -mtune=native '
FCFLAGS_f90=''
FCFLAGS_f=''
FCKIND='gfortran'