Page 1 of 1

Small bug in the atompaw configure script

Posted: Sun Apr 20, 2014 9:24 pm
by raul_l
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.

Re: Small bug in the atompaw configure script

Posted: Mon Apr 21, 2014 3:47 pm
by Jordan
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

Re: Small bug in the atompaw configure script

Posted: Mon Apr 21, 2014 8:54 pm
by raul_l
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

Re: Small bug in the atompaw configure script

Posted: Tue Apr 22, 2014 8:48 am
by pouillon
I'll have a look at it as soon as I can.

Re: Small bug in the atompaw configure script

Posted: Thu Apr 24, 2014 4:27 pm
by mokal
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

Re: Small bug in the atompaw configure script

Posted: Thu Apr 24, 2014 7:34 pm
by raul_l
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.

Re: Small bug in the atompaw configure script

Posted: Fri Apr 25, 2014 11:29 am
by pouillon
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.