Small bug in the atompaw configure script

External optional components of Abinit (BigDFT, Wannier90, ...) and codes using / providing data from / to Abinit (AtomPAW, EXC, DP, SAX, WanT, Yambo, ...).

Moderator: rangel

Post Reply
raul_l
Posts: 74
Joined: Sun Jan 08, 2012 7:45 pm

Small bug in the atompaw configure script

Post by raul_l » Sun Apr 20, 2014 9:24 pm

If I configure atompaw with

Code: Select all

--with-linalg-flavor=atlas --with-linalg-libs="-L/usr/local/atlas/lib -ltatlas" --enable-libxc --with-libxc-incs=-I/usr/local/libxc-gnu/include --with-libxc-libs="-L/usr/local/libxc-gnu/lib -lxc"

there are no errors. However, if there happened to be any issues with the LibXC library or lets say I made a typo, like this

Code: Select all

--with-linalg-flavor=atlas --with-linalg-libs="-L/usr/local/atlas/lib -ltatlas" --enable-libxc --with-libxc-incs=-I/usr/local/libxc-gnu/include --with-libxc-libs="-L/usr/local/libxc-gnu/lib -lxc_foo"

then it displays

Code: Select all

checking whether linear algebra libraries work... no
configure: error: no working linear algebra libraries have been found

even though the problem is with LibXC. This can be misleading.
Raul Laasner
Netherlands Institute for Space Research

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: Small bug in the atompaw configure script

Post by Jordan » Mon Apr 21, 2014 3:47 pm

Hi

I would say that this behavior is due to the fact that the configure script tries to find out if a feature works with all the flags and librairies included.
In your case, you try to link the executable with a librairy that does not exist so the compiler return an error.
You may find in the config.log that the error is due to this linking problen saying that libxc_foo can not be found whereas it tries to complie a simple linear algebra code.

In one hand it is missleading, but on the other hand this can avoid some conflicts or errors during the final linkage.

This is my understanding.

Regards,

Jordan

raul_l
Posts: 74
Joined: Sun Jan 08, 2012 7:45 pm

Re: Small bug in the atompaw configure script

Post by raul_l » Mon Apr 21, 2014 8:54 pm

Okay, now it sort of makes sense. This is the relevant part of config.log:

Code: Select all

configure:15753: gfortran -o conftest -fcoarray=single -O2  conftest.F90 -L/usr/local/libxc-gnu/lib -lxc_foo -L/usr/local/atlas/lib -ltatlas  >&5
/usr/bin/ld: cannot find -lxc_foo
collect2: error: ld returned 1 exit status
configure:15753: $? = 1
configure: failed program was:
|       program main
|
|       call zgemm
|       call zhpev
|
|       end
configure:15760: result: no
configure:15770: error: no working linear algebra libraries have been found

It can't find -lxc_foo and so it can't compile the program with calls to Lapack procedures. Still, I would call this a bug or a design flaw. When I first encountered this error I spent a lot of time trying to understand what's wrong with my linear algebra library, while in fact the problem lie elsewhere. If the library is given correctly, but there is a problem with with-libxc-incs, then it correctly says

Code: Select all

configure: error: no working LibXC library has been found
Raul Laasner
Netherlands Institute for Space Research

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Small bug in the atompaw configure script

Post by pouillon » Tue Apr 22, 2014 8:48 am

I'll have a look at it as soon as I can.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

mokal
Posts: 1
Joined: Thu Apr 24, 2014 4:23 pm

Re: Small bug in the atompaw configure script

Post by mokal » Thu Apr 24, 2014 4:27 pm

I found the same error, but it was also impossible to install Atompaw 4.0.0.8 with libXC 2.2.0. I had to use older version of libXC (2.0.2).

Best

Michal
Michal Okal
FEI STU
Bratislava

raul_l
Posts: 74
Joined: Sun Jan 08, 2012 7:45 pm

Re: Small bug in the atompaw configure script

Post by raul_l » Thu Apr 24, 2014 7:34 pm

mokal wrote:I found the same error, but it was also impossible to install Atompaw 4.0.0.8 with libXC 2.2.0. I had to use older version of libXC (2.0.2).

Same here. I tried with every recent version of libxc and 2.0.2 was the latest that worked.
Raul Laasner
Netherlands Institute for Space Research

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Small bug in the atompaw configure script

Post by pouillon » Fri Apr 25, 2014 11:29 am

This is perfectly normal. Going from LibXC 2.0 to LibXC 2.2 means that there have been changes in the library API (increment in the minor version number). With AtomPAW, you must use LibXC 2.0 until a new version compatible with 2.2 is released.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Post Reply