Page 1 of 1

libxc error during make

Posted: Tue Oct 14, 2014 7:19 pm
by esr3d
Hi,

I am compiling Abinit-7.8.2 on Mac OS 10.6.8 with the following config file:

prefix="/usr/local"
with_trio_flavor="netcdf+etsf_io"
with_netcdf_incs="-I/usr/local/include"
with_netcdf_libs="-L/usr/local/lib -lnetcdf -lnetcdff"
with_fft_flavor="fftw3"
with_fft_incs="-I/usr/local/include"
with_fft_libs="-L/usr/local/lib -lfftw3f -lfftw3"
with_linalg_flavor="atlas"
with_linalg_libs="-L/opt/local/lib -llapack -lf77blas -lcblas -latlas"
with_dft_flavor="atompaw+bigdft+libxc+wannier90"
disable_static
enable_shared
enable_optim="safe"
CC=/usr/bin/gcc
CPP=/usr/bin/cpp-4.2
FC=/usr/local/bin/gfortran
FCCPP=/usr/bin/cpp-4.2


Using this configure file, I get the following summary:
Summary of important options:

* C compiler : gnu version
* Fortran compiler: gnu version 4.7
* architecture : ( bits)

* debugging : basic
* optimizations : safe

* OpenMP enabled : no (collapse: ignored)
* MPI enabled : no
* MPI-IO enabled : no
* GPU enabled : no (flavor: none)

* TRIO flavor = netcdf+etsf_io-fallback
* TIMER flavor = abinit (libs: ignored)
* LINALG flavor = netlib-fallback (libs: ignored)
* ALGO flavor = none (libs: ignored)
* FFT flavor = fftw3 (libs: user-defined)
* MATH flavor = none (libs: ignored)
* DFT flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=<n>")



When running 'make' I get the following error:
Internal Error at (1):
insert_bbt(): Duplicate key found!
make[7]: *** [libxc_la-libxc.lo] Error 1
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [stamps/libxc-build-stamp] Error 2
make[2]: [all-local] Error 2 (ignored)
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make[2]: *** [all-local] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Do you know what could be causing this error?
Thank you.

Re: libxc error during make

Posted: Wed Oct 15, 2014 10:35 am
by Jordan
Hi,

For ease, I would suggest to use the macport as described on the libxc webpage or try first to compile libxc in a safe place.
You can then use the with_libxc_incs and with_libxc_libs variables to configure abinit to use the already compiled libxc.
Otherwise, provide at least the make output with the file name and line that causes the error (a few lines just before the message you quoted)

Note that all the *-fallback are packages that you requested but are not working/found by the abinit buildsystem.
You requested atlas for the linalg but something went wrong and you will use the old and possibly buggy netlib-fallback. You may want to correct that.

Jordan

Re: libxc error during make

Posted: Wed Oct 15, 2014 7:33 pm
by esr3d
Hi,

Thank you for your help! I have compiled libxc using macports, which was successful.
When I try compiling, I receive the error that external libxc support does not work. I have attached the config.log file. At one point in the log file, it says:

Code: Select all

Fatal Error: Wrong module version '10' (expected '9') for file 'xc_f90_lib_m.mod' opened at (1)


Is it possible that the version of libxc (2.1.0) installed by macports is not supported by abinit-7.8.2?

The configure file I am using is as follows:

Code: Select all

prefix="/usr/local"
with_trio_flavor="netcdf+etsf_io"
with_netcdf_incs="-I/usr/local/include"
with_netcdf_libs="-L/usr/local/lib -lnetcdf -lnetcdff"
with_fft_flavor="fftw3"
with_fft_incs="-I/usr/local/include"
with_fft_libs="-L/usr/local/lib -lfftw3f -lfftw3"
with_linalg_flavor="atlas"
with_linalg_libs="-L/opt/local/lib -llapack -lf77blas -lcblas -latlas"
with_libxc_incs="-I/opt/local/include"
with_libxc_libs="-L/opt/local/lib -libxc"
with_dft_flavor="atompaw+bigdft+libxc+wannier90"
disable_static
enable_shared
enable_optim="safe"
CC=/usr/bin/gcc
CPP=/usr/bin/cpp-4.2
FC=/usr/local/bin/gfortran
FCCPP=/usr/bin/cpp-4.2


Thanks!

Re: libxc error during make  [SOLVED]

Posted: Thu Oct 16, 2014 12:50 pm
by Jordan
The error message means the fortran compiler used for libxc is different from the one used for abinit.
Fortran modules (*.mod) can only be read by the compiler that wrote them.

I am not very familiar with mac but I think you can install from macport the fortran compiler used for libxc.
That will solve your problem.

Jordan

Re: libxc error during make

Posted: Tue Oct 21, 2014 5:01 pm
by esr3d
Thank you! I used macports to install everything with the same compilers, and now have a functional version of ABINIT! :D