Page 1 of 2
Yambo 5.2.3 compilation error on LibXC
Posted: Fri Jul 19, 2024 5:26 am
by pandachang97
Hello Daniele,
Good morning. I hope you are all doing well. Recently, I have to reinstall Yambo on a super cluster. I download the 5.2.3 version from Yambo official webcite. When I tried to compile it, the error message is always the same, *** [mod_xc_functionals.o] Error 1. It seems the package does not find the LibXC.
The weird things are:(1) When I run the configuration, I include several pathes of the libraries. But the script does not read them. The command is listed as below:
Code: Select all
./configure CC=icc FC=ifort MPIFC=mpiifort MPIF77=ifort MPICC=mpiicc F77=ifort --with-libxc-libs=libxc-6.2.2 --with-libxc-path=/work2/09846/pandachang97/Software/libxc-6.2.2/ --with-libxc-includedir=/work2/09846/pandachang97/Software/libxc-6.2.2/include/ --with-libxc-libdir=/work2/09846/pandachang97/Software/libxc-6.2.2/lib/ \
--with-netcdff-libs --with-netcdff-path=/opt/apps/intel19/netcdf/4.9.0/x86_64/ --with-netcdff-libdir=/opt/apps/intel19/netcdf/4.9.0/x86_64/lib/ --with-netcdff-includedir=/opt/apps/intel19/netcdf/4.9.0/x86_64/include/ \
--with-hdf5-libs --with-hdf5-path=/opt/apps/intel19/hdf5/1.12.2/x86_64/ --with-hdf5-libdir=/opt/apps/intel19/hdf5/1.12.2/x86_64/lib/ --with-hdf5-includedir=/opt/apps/intel19/hdf5/1.12.2/x86_64/include/ --with-petsc-libs
(2) Later, I change the path in config/setup. The settting is listed below:
Code: Select all
llibxc = /work2/09846/pandachang97/Software/libxc-6.2.2/lib/libxcf90.a /work2/09846/pandachang97/Software/libxc-6.2.2/lib/libxcf03.a /work2/09846/pandachang97/Software/libxc-6.2.2/lib/libxc.a
ilibxc = -I/work2/09846/pandachang97/Software/libxc-6.2.2/include
Could you please help me fix that issue? Thank you so much and best regards,
Xin
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Fri Jul 19, 2024 8:44 am
by Daniele Varsano
Dear Xin,
you can try the following:
1) avoid indicating "--with-libxc-libs=libxc-6.2.2" and see if the path is recognized
2) configure the code without indicating any libxc option. Yambo will download them and compile it
Best,
Daniele
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Sat Jul 27, 2024 2:17 pm
by kz_pl
Hello,
It seems that the problem persists - Yambo does not download the proper libxc, and if downloaded manually as tar.gz libxc won't compile (Linux Mint 21.3, gcc 11.4.0)
Krzysztof
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Mon Jul 29, 2024 8:50 am
by Daniele Varsano
Dear Krzysztof,
Yambo does not download the proper libxc,
can you post the config.log file and the error message you get in phase of compilation?
Best,
Daniele
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Mon Jul 29, 2024 10:57 am
by kz_pl
Please find attached config.log and compilation.log
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Mon Jul 29, 2024 12:09 pm
by Daniele Varsano
Dear Krzysztof ,
Code: Select all
*** Unable to download libxc-5.2.3. Test whether curl or wget is installed and working,
*** if you have direct access to the internet.
*** If not, copy libxc-5.2.3.tar.gz into extlibs/archive/
It seems you do not have the wget sw installed on your machine. Please install it and try again, e.g. sudo apt-get install wget
If you cannot install "wget" for some reason, please download the libxc-5.2.3.tar.gz and copy it into extlibs/archive and try again.
Before reinstalling, please do a:
make distclean
Best,
Daniele
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Mon Jul 29, 2024 1:04 pm
by kz_pl
The lack of wget is not the case - it's what I checked first.
What is the actual wget command Yambo uses to download the libxc source?
Anyway, if I put tar.gz in lib/archive (or extlib/archive) the result is the same - seems that the libxc won't compile...
Output is:
Code: Select all
make[2]: *** [/home/kz/compilations_local/yambo-5.2.3.gnu.mpi/config/mk/local/rules.mk:15: mod_xc_functionals.o] Error 1
Fatal Error: Cannot open module file ‘xc_f03_lib_m.mod’ for reading at (1): No such file or directory
[driver] yambo (setup)
yambo linking failed. Check log/compile_yambo.log
Fatal Error: Cannot open module file ‘xc_f03_lib_m.mod’ for reading at (1): No such file or directory
make[1]: *** [config/mk/global/actions/compile_yambo.mk:48: yambo] Error 1
yambo build failed
I can compile the libxc by hand (but using cmake, not automake), but the compiler still won't make the mod file...
ah, ok, after the make distclean I got:
Code: Select all
make[2]: *** [/home/kz/compilations_local/yambo-5.2.3.gnu.mpi/config/mk/local/rules.mk:15: mod_memory.o] Error 1
Fatal Error: Cannot open module file ‘openmp.mod’ for reading at (1): No such file or directory
[driver] yambo (setup)
yambo linking failed. Check log/compile_yambo.log
Fatal Error: Cannot open module file ‘openmp.mod’ for reading at (1): No such file or directory
make[1]: *** [config/mk/global/actions/compile_yambo.mk:48: yambo] Error 1
yambo build failed
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Wed Jul 31, 2024 11:09 am
by Davide Sangalli
Dear all,
for the "internally compiled" libxc (fallback in case the external ones are not properly detected/recognised), the errors are due to the fact that the website tddft.org went offline.
See connected issues here:
-
https://github.com/yambo-code/yambo/issues/119
-
https://gitlab.com/libxc/libxc/-/issues/508
Below the patch which fixes the compilation in branch 5.2. We will soon release version 5.2.4 with the fix included.
Please notice that you need autoconf tools installed in your machine (see discussion in the above issues).
Best,
D.
Code: Select all
diff --git a/lib/archive/package.list b/lib/archive/package.list
index 0bb67a9a4e..0f84572201 100644
--- a/lib/archive/package.list
+++ b/lib/archive/package.list
@@ -98,12 +98,11 @@ url_netcdff=https://github.com/Unidata/netcdf-fortran/archive/refs/tags/$(tarbal
#
url_slepc=https://gitlab.com/slepc/slepc/-/archive/v$(version_slepc)/$(tarball_slepc)
url_petsc=https://gitlab.com/petsc/petsc/-/archive/v$(version_petsc)/$(tarball_petsc)
-#url_libxc=https://gitlab.com/libxc/libxc/-/archive/$(version_libxc)/$(tarball_libxc) # this would require to run "autoreconf -i"
+url_libxc=https://gitlab.com/libxc/libxc/-/archive/$(version_libxc)/$(tarball_libxc) # this requires to run "autoreconf -i" (coded)
#
# External URL's More
#
url_fftw=https://fftw.org/$(tarball_fftw)
-url_libxc=https://www.tddft.org/programs/libxc/down/$(version_libxc)/$(tarball_libxc)
#
# Internal URL's
#
diff --git a/lib/config/external_libs_commons.mk b/lib/config/external_libs_commons.mk
index 185dd01a72..095f69ae0e 100644
--- a/lib/config/external_libs_commons.mk
+++ b/lib/config/external_libs_commons.mk
@@ -22,17 +22,27 @@ if ! test -e configured.stamp && test -d $(PACKAGE); then \
fi
endef
#
+define autoconf
+if ! test -e autoconf.stamp && test -d $(PACKAGE); then \
+ echo "\t[$(PACKAGE)] autoconf"; \
+ rm -f ${compdir}/log/autoconf_$(PACKAGE).log; \
+ CWD=`pwd`;\
+ cd $(PACKAGE); autoreconf -i >> ${compdir}/log/autoconf_$(PACKAGE).log 2>&1 ; \
+ touch $$CWD/autoconf.stamp;\
+fi
+endef
+#
define compile
if ! test -e compiled.stamp && test -d $(PACKAGE); then \
echo "\t[$(PACKAGE)] $(1) compilation"; \
rm -f ${compdir}/log/compile_$(PACKAGE).log; \
CWD=`pwd`;\
FLGS="$(MAKEFLAGS)";\
- if [ "$(PACKAGE)" = "scalapack-2.1.0" ]; then \
- FLGS=`echo "$(MAKEFLAGS)" | sed 's/-j//g'`; \
+ if [ "$(PACKAGE)" = "$(pkgname_scalapack)" ]; then \
+ FLGS="-j1";\
fi;\
cd $(PACKAGE); \
- $(make) $(MAKEFLAGS) $(1) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1; \
+ $(make) $$FLGS $(1) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1; \
if [ ! "$(1)" = "blaslib" ] && [ ! "$(1)" = "loclib_only" ]; then touch $$CWD/compiled.stamp; fi;\
fi
endef
diff --git a/lib/libxc/Makefile.loc b/lib/libxc/Makefile.loc
index 58fd4b4117..fb5fde28a6 100644
--- a/lib/libxc/Makefile.loc
+++ b/lib/libxc/Makefile.loc
@@ -32,6 +32,7 @@ uncompress:
@$(uncompress)
configure: uncompress
+ @$(autoconf)
@$(configure)
compile: uncompress configure
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Thu Aug 01, 2024 5:01 pm
by kz_pl
Thank you. For now, libxc on linux mint 21/22 can only be compiled with cmake, automake does not work...
Re: Yambo 5.2.3 compilation error on LibXC
Posted: Wed Sep 04, 2024 3:23 am
by sanoj
I had the same problem. Please find the fix below.
1. cd yambo-5.2.3
2. vi lib/archive/package.list
3. Replace
url_libxc=https://www.tddft.org/programs/libxc/down/$(version_libxc)/$(tarball_libxc) with
url_libxc=https://www.cp2k.org/static/downloads/libxc-6.2.2.tar.gz
4. ./configure
5. make all
It will download new libxc and compile.
I did the above steps and I was able to successfully install yambo.