Page 2 of 2

Re: Error in compilation

Posted: Tue Mar 31, 2015 8:48 am
by koudai
Dear Andrea,

I changed the file config/libxc.m4, and imitated your script, like

Code: Select all

./configure \
FC=ifort \
CC=icc \
F77=ifort \
F90=ifort \
CPP="icc -E" \
CPPFLAGS="-ansi" \
FCFLAGS="-O3" \
LDFLAGS=-nofor_main \
--with-blas="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
--with-lapack="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
--with-p2y \
--with-iotk=/home/koudai/espresso-5.1/S3DE/iotk \
--with-netcdf-lib=/usr/local/netcdf-fortran-4.4.2/lib \
--with-netcdf-include=/usr/local/netcdf-fortran-4.4.2/include \
--with-netcdf-link=-lnetcdf \
--enable-netcdf-LFS \
--enable-msgs-comps
I could avoid the error about "Making slatec", but another error appears
>>>[Linking yambo]<<<
make[1]: Entering directory `/home/koudai/yambo-3.4.1-rev61/driver'
if test ! -f __lock && test "yes" = "no" ; then find . \( -name '*.o' -o -name '*.mod' -o -name '__*' \) | xargs rm -f ; touch __lock; fi
if test "yes" = "yes"; then "/home/koudai/yambo-3.4.1-rev61"/sbin/objects_debug.sh __lock; fi
(eval icc -E -ansi -D_NETCDF_IO -D_64BIT_OFFSET -D_MPI -D_linux yambo_driver.F > yambo_driver.f90) > /dev/null
(mpif90 -c -O3 -nofor_main -I /home/koudai/yambo-3.4.1-rev61/include -I/home/koudai/yambo-3.4.1-rev61/include yambo_driver.f90) > /dev/null
yambo_driver.F if test -f /home/koudai/yambo-3.4.1-rev61/driver/yambo.h; then icc -E -ansi -D_NETCDF_IO -D_64BIT_OFFSET -D_MPI -D_linux /home/koudai/yambo-3.4.1-rev61/driver/yambo.h > /home/koudai/yambo-3.4.1-rev61/driver/yambo_cpp.h; fi
if test -f /home/koudai/yambo-3.4.1-rev61/driver/ypp.h; then icc -E -ansi -D_NETCDF_IO -D_64BIT_OFFSET -D_MPI -D_linux /home/koudai/yambo-3.4.1-rev61/driver/ypp.h > /home/koudai/yambo-3.4.1-rev61/driver/ypp_cpp.h; fi
( eval icc -g -O2 -D_C_US -D_FORTRAN_US -c /home/koudai/yambo-3.4.1-rev61/driver/getopt.c > /dev/null)
In file included from /home/koudai/yambo-3.4.1-rev61/driver/getopt.c(107):
/home/koudai/yambo-3.4.1-rev61/driver/getopt.h(153): warning #1292: unknown attribute "__leaf__"
__THROW;
^

In file included from /home/koudai/yambo-3.4.1-rev61/driver/getopt.c(107):
/home/koudai/yambo-3.4.1-rev61/driver/getopt.h(162): warning #1292: unknown attribute "__leaf__"
__THROW;
^

In file included from /home/koudai/yambo-3.4.1-rev61/driver/getopt.c(107):
/home/koudai/yambo-3.4.1-rev61/driver/getopt.h(166): warning #1292: unknown attribute "__leaf__"
__THROW;
^

if test "yes" = ""; then icc -g -O2 -D_C_US -D_FORTRAN_US -D_NETCDF_IO -D_64BIT_OFFSET -D_MPI -D_linux -D_yambo -c /home/koudai/yambo-3.4.1-rev61/driver/driver.c; fi
if test ! "yes" = ""; then mpicc -g -O2 -D_C_US -D_FORTRAN_US -D_NETCDF_IO -D_64BIT_OFFSET -D_MPI -D_linux -D_yambo -c /home/koudai/yambo-3.4.1-rev61/driver/driver.c; fi
rm -f /home/koudai/yambo-3.4.1-rev61/driver/yambo_cpp.h /home/koudai/yambo-3.4.1-rev61/driver/ypp_cpp.h

(eval mpif90 -O3 -nofor_main -I /home/koudai/yambo-3.4.1-rev61/include -o yambo driver.o getopt.o yambo_driver.o -L/home/koudai/yambo-3.4.1-rev61/lib -nofor_main -lbse -lqp -lpol_function -ltddft -linterface -lsetup -lqp_ctl -lbz_ops -lcoulomb -lwf_and_fft -lio -lcommon -lcommunicate -lparser -lxc_functionals -lmodules -lexternal_c -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lnetcdf -lxc -lslatec -llocal -lm ) > /dev/null
ld: cannot find -lnetcdf
make[1]: *** [yambo] Error 1
make[1]: Leaving directory `/home/koudai/yambo-3.4.1-rev61/driver'
make: *** [yambo] Error 2
However, I found that the compilation is finished if the option related to NetCDF is removed.
I think NetCDF in my computer does not work correctly.

Thank you for your advice.

Best,
Koudai

Re: Error in compilation

Posted: Tue Mar 31, 2015 9:29 am
by Daniele Varsano
Dear Kouday,
check the path of your netcdf and assign it in the configure using the flags:
--with-netcdf-lib=
--with-netcdf-include=
check also if the netcdf have been compiled with the same compiler you are compiling yambo.
Best,
Daniele

Re: Error in compilation

Posted: Wed Apr 08, 2015 11:33 pm
by Maxos
Dear all,

I am experiencing a very similar problem to the one discussed in the thread.

Here are my software details:

yambo: 3.4.1-rev61 (serial)
QE: 5.1.2
NetCDF CC & fortran installed: vv. netcdf-4.3.3.1 & netcdf-fortran-4.4.2
arch: linux x86_64
compilers: gfortran/gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

Here is my configure script:

Code: Select all

./configure --with-netcdf-lib=somepath/NetCDF/installdirfor/lib --with-netcdf-include=somepath/NetCDF/installdirfor/include --enable-netcdf-LFS --enable-netcdf-hdf5 --with-iotk=somepath/QE/espresso-5.1.2/S3DE/iotk --with-p2y=5.0
this configures fine
YAMBO2config.log
except I spot this message

Code: Select all

./configure: line 9866: /home/insti/amassari/tools/NetCDF/installdirfor/include/../bin/nc-config: No such file or directory
. Why is it looking for the file "nc-config" when the fortran libraries have instead "nf-config"? This might mean nothing of course. Just something I noticed.

However, when I go ahead and run "make yambo interfaces" it fails with the notorious

Code: Select all

>>>[Making slatec]<<<
make[1]: Entering directory `/home/pheno/amassari/tools/YAMBO/yambo-3.4.1-rev61/lib/slatec'
Makefile:52: *** missing separator.  Stop.
make[1]: Leaving directory `/home/pheno/amassari/tools/YAMBO/yambo-3.4.1-rev61/lib/slatec'
make: *** [libs] Error 2
Now, if I, say, decide to link the CC NetCDF libraries instead (not that it makes much sense) I have the following:

Code: Select all

./configure --with-netcdf-lib=somepath/NetCDF/installdir/lib --with-netcdf-include=somepath/NetCDF/installdir/include --enable-netcdf-LFS --enable-netcdf-hdf5 --with-iotk=somepath/QE/espresso-5.1.2/S3DE/iotk --with-p2y=5.0
This configures fine
YAMBO1config.log
and "make yambo interfaces" ends successfully but then this happens:

Code: Select all

yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)
which I gather correctly suggests that the NetCDF libraries haven't been properly linked.

I have played around with the fixes given in these pages but I can't get around the problem. I hope you folks can help out.

Thanks!

Re: Error in compilation

Posted: Thu Apr 09, 2015 8:00 am
by Daniele Varsano
Dear Andrea,
I still not have seen your config.log file, I will do later if needed. Anyway it looks you compiled successfully the code (not sure about netcdf) but they are not mandatory, you can run the code without the netcdf support:

Code: Select all

yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)
Note this means that the code is running properly, but it cannot find your ground state calculations.
This is because:
1) You did not calculated the ground state (using quantum-espresso or abinit)
2) You did not run the interfaces (p2y or a2y)
3) You did it, but you are not running in the right directory. You should run in the directory where the SAVE directory is present. It is created by the interfaces (p2y fir a qe calcualation, a2y for an abinit calculation).

Best,
Daniele