Abinit keeps using fallback

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
acl06
Posts: 7
Joined: Fri Feb 13, 2015 2:26 pm

Abinit keeps using fallback

Post by acl06 » Fri Feb 13, 2015 2:32 pm

I am trying to compile abinit with the following build.ac

enable_mpi=yes
enable_mpi_io=yes
FC=/usr/local/bin/mpif90
CC=/usr/local/bin/mpixlc-latestmpi
CXX=/usr/local/bin/mpixlcxx-latestmpi
enable_openmp="yes"
with-linalg-flavour='scalapack'
with_linalg_libs="-L/usr/local/tools/scalapack/lib -lscalapack"


However, when I configure the code I get

Summary of important options:
* C compiler : ibm version 12.1
* Fortran compiler: gnu version 4.4
* architecture : ibm powerpc64 (64 bits)
* debugging : basic
* optimizations : standard
* OpenMP enabled : yes (collapse: yes)
* MPI enabled : yes
* MPI-IO enabled : yes
* GPU enabled : no (flavor: none)
* TRIO flavor = none
* TIMER flavor = abinit (libs: ignored)
* LINALG flavor = netlib-fallback (libs: ignored)
* ALGO flavor = none (libs: ignored)
* FFT flavor = none (libs: ignored)
* MATH flavor = none (libs: ignored)
* DFT flavor = none

so the fallback has been used for the linear algebra. If I try to compile this it fails, because when it tries to compile the blacs it says

make[5]: Entering directory `/g/g92/lim30/abinit-7.8.2/fallbacks/sources/lapack-abinit_6.10/blas'
/usr/local/bin/mpif90 -ffixed-form -g -ffree-line-length-none -fopenmp -O2 -mtune=native -march=native -g -O2 -c caxpy.f
/usr/local/bin/mpif90 -ffixed-form -g -ffree-line-length-none -fopenmp -O2 -mtune=native -march=native -g -O2 -c ccopy.f
/usr/local/bin/mpif90 -ffixed-form -g -ffree-line-length-none -fopenmp -O2 -mtune=native -march=native -g -O2 -c cdotc.f
/usr/local/bin/mpif90 -ffixed-form -g -ffree-line-length-none -fopenmp -O2 -mtune=native -march=native -g -O2 -c cdotu.f
/usr/local/bin/mpif90 -ffixed-form -g -ffree-line-length-none -fopenmp -O2 -mtune=native -march=native -g -O2 -c cgbmv.f
f951: error: unrecognized command line option "-march=native"f951: error: unrecognized command line option "-march=native"f951: error: unrecognized command line option "-march=native"

hence I would like to define an alternative.

Thank you for your help.

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Abinit keeps using fallback

Post by jbeuken » Sat Feb 14, 2015 10:03 pm

HI,

some inconsistencies :

1)
FC=/usr/local/bin/mpif90
CC=/usr/local/bin/mpixlc-latestmpi

and
* C compiler : ibm version 12.1
* Fortran compiler: gnu version 4.4


fortran may be xlf :?

there is a problem with your environment ( PATH, … )

2) with-linalg-flavour='scalapack'

it's not enough ! you need also blas/lapack libraries
it's why , the compilation compiles blas and lapack :

make[5]: Entering directory `/g/g92/lim30/abinit-7.8.2/fallbacks/sources/lapack-abinit_6.10/blas'


you may use : with-linalg-flavour='netlib+scalapack'

3) "-mtune=native -march=native" is not xlc/xlf options : it's GCC compiler's options


To try to understand your environment, what are the results of commands :

Code: Select all

/usr/local/bin/mpif90 --version
/usr/local/bin/mpif90 -show
which  elf
xlf -qversion
echo $PATH
uname -ar


jmb
------
Jean-Michel Beuken
Computer Scientist

acl06
Posts: 7
Joined: Fri Feb 13, 2015 2:26 pm

Re: Abinit keeps using fallback

Post by acl06 » Mon Feb 16, 2015 8:59 am

I get the following

/usr/local/bin/mpif90 --version
GNU Fortran (BGQ-V1R2M2-140717) 4.4.7
Copyright (C) 2010 Free Software Foundation, Inc.

/usr/local/bin/mpif90 -show
/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc64-bgq-linux-gfortran -fno-underscoring -I/bgsys/drivers/ppcfloor -I/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/sys/include -I/bgsys/drivers/ppcfloor/spi/include -I/bgsys/drivers/ppcfloor/spi/include/kernel/cnk -L/bgsys/drivers/ppcfloor/spi/lib -L/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/sys/lib -L/bgsys/drivers/ppcfloor/spi/lib -L/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/sys/lib -L/bgsys/drivers/ppcfloor/spi/lib -Wl,-rpath,/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/lib:/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/sys/lib -I/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/gcc/include -I/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/gcc/include -L/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/gcc/lib -lmpichf90 -Wl,-rpath -Wl,/usr/local/tools/deg/drivers/V1R2M0/ppc64/comm/gcc/lib -lmpich -lopa -lmpl -lpami -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread

which elf
/usr/bin/which: no elf in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/global/tools/git/bgqos_0/git-1.8.4.4/bin:/opt/ibmcmp/vacpp/bg/12.1/bin:/opt/ibmcmp/xlf/bg/14.1/bin:.)

xlf -qversion
IBM XL Fortran for Blue Gene, V14.1
Version: 14.01.0000.0010

echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/global/tools/git/bgqos_0/git-1.8.4.4/bin:/opt/ibmcmp/vacpp/bg/12.1/bin:/opt/ibmcmp/xlf/bg/14.1/bin:.

uname -ar
Linux 2.6.32-431.23.3.1chaos.2blueos_small_pages.bl2.2.ppc64 #1 SMP Tue Oct 21 17:35:40 PDT 2014 ppc64 ppc64 ppc64 GNU/Linux

However, I would like to use the libraries that have been installed on the HPC instead of the fallbacks because they have optimised.

Thank you.

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Abinit keeps using fallback

Post by jbeuken » Mon Feb 16, 2015 10:02 pm

I make a typo ! it's not "which elf" but

Code: Select all

which xlf


is it a Blue Gene machine ?

perhaps, you can try with

FC=/usr/local/bin/mpif90-latestmpi
CC=/usr/local/bin/mpixlc-latestmpi

what are the results of commands :

Code: Select all

/usr/local/bin/mpif90-latestmpi
/usr/local/bin/mpixlc-latestmpi -show


what is the OS ? Redhat or OpenSuSe ?

you can use the ESSL/ibm library and use : --with-linalg-flavour='essl+scalapack'
but where is installed this library…
------
Jean-Michel Beuken
Computer Scientist

acl06
Posts: 7
Joined: Fri Feb 13, 2015 2:26 pm

Re: Abinit keeps using fallback

Post by acl06 » Tue Feb 17, 2015 11:29 am

It is blue gene.

which xlf gives
/opt/ibmcmp/xlf/bg/14.1/bin/xlf

When I try with FC=mpif90-latestmpi I get the same error as before.

usr/local/bin/mpif90-latestmpi -show
/bgsys/drivers/V1R2M2/ppc64/gnu-linux/bin/powerpc64-bgq-linux-gfortran -fno-underscoring -I/bgsys/drivers/V1R2M2/ppc64 -I/bgsys/drivers/V1R2M2/ppc64/comm/sys/include -I/bgsys/drivers/V1R2M2/ppc64/spi/include -I/bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib64 -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/sys/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/sys/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib64 -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -I/bgsys/drivers/V1R2M2/ppc64/comm/include -I/bgsys/drivers/V1R2M2/ppc64/comm/include/gnu -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -lmpichf90-gcc -lmpich-gcc -lopa-gcc -lmpl-gcc -lpami-gcc -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread

/usr/local/bin/mpixlc-latestmpi -show
/opt/ibmcmp/vacpp/bg/12.1/bin/bgxlc -I/bgsys/drivers/V1R2M2/ppc64/comm/include -I/bgsys/drivers/V1R2M2/ppc64/comm/lib/xl -I/bgsys/drivers/V1R2M2/ppc64 -I/bgsys/drivers/V1R2M2/ppc64/comm/sys/include -I/bgsys/drivers/V1R2M2/ppc64/spi/include -I/bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib64 -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/sys/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/sys/lib -L/bgsys/drivers/V1R2M2/ppc64/comm/lib64 -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -L/bgsys/drivers/V1R2M2/ppc64/spi/lib -I/bgsys/drivers/V1R2M2/ppc64/comm/include -L/bgsys/drivers/V1R2M2/ppc64/comm/lib -lmpich-xl -lopa-xl -lmpl-xl -lpami-gcc -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread

I used: locate ESSL, to get
/opt/ibmmath/essl/5.1/ITLM/ESSLL0501.SYS2
/opt/ibmmath/essl/5.1/man/IESSL.3.gz

I then changed my build.ac file to contain

with-linalg-flavour='essl+scalapack'

with_linalg_libs="-L/usr/local/tools/scalapack/lib -lscalapack"
with_linalg_libs="-L/usr/local/tools/lapack/lib -llapack"
with_linalg_libs="-L/usr/local/tools/blacs/lib/ -llblacs"
with_linalg_libs="-L/opt/ibmmath/essl/5.1/ITLM/"

and it still failed to compile.

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)

acl06
Posts: 7
Joined: Fri Feb 13, 2015 2:26 pm

Re: Abinit keeps using fallback

Post by acl06 » Tue Feb 17, 2015 4:08 pm

At the ned of configure I keep getting
* TRIO flavor = none
* TIMER flavor = abinit (libs: ignored)
* LINALG flavor = netlib-fallback (libs: ignored)
* ALGO flavor = none (libs: ignored)
* FFT flavor = none (libs: ignored)
* MATH flavor = none (libs: ignored)
* DFT flavor = none

no matter what I do. I would like to use a linear algebra routine from my HPC (e.g. scalapack)

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Abinit keeps using fallback

Post by jbeuken » Tue Feb 17, 2015 7:50 pm

It is blue gene.


could you try to inspire you with the solution explained in the post :

viewtopic.php?f=2&t=1690&p=5264&hilit=Blue+Gene#p5264

with_linalg_libs="-L/usr/local/tools/scalapack/lib -lscalapack"
with_linalg_libs="-L/usr/local/tools/lapack/lib -llapack"
with_linalg_libs="-L/usr/local/tools/blacs/lib/ -llblacs"
with_linalg_libs="-L/opt/ibmmath/essl/5.1/ITLM/"


this is not the right syntax ...
without warranty, you can try something like this ( not sure for -lessl ):

Code: Select all

with_linalg_libs="-L/usr/local/tools/scalapack/lib -lscalapack -L/usr/local/tools/lapack/lib -llapack -L/usr/local/tools/blacs/lib/ -llblacs -L/opt/ibmmath/essl/5.1/ITLM/ -lessl"


or

Code: Select all

with_linalg_libs="/usr/local/tools/scalapack/lib/libscalapack.a  /usr/local/tools/lapack/lib/liblapack.a  /usr/local/tools/blacs/lib/libblacs.a /opt/ibmmath/essl/5.1/ITLM/libessl.a"
------
Jean-Michel Beuken
Computer Scientist

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

Re: Abinit keeps using fallback

Post by Jordan » Wed Feb 18, 2015 10:41 am

Just in case ...

You said you have in your build.ac

Code: Select all

with-linalg-flavour='scalapack'
with_linalg_libs="-L/usr/local/tools/scalapack/lib -lscalapack"

which is useless since with-linalg-flavour is not recognize by the configure script.
You must write

Code: Select all

with_linalg_flavor="scalapack"

and then you can play with the libs if the configure script says the linalg librairy does not work.

Cheers

acl06
Posts: 7
Joined: Fri Feb 13, 2015 2:26 pm

Re: Abinit keeps using fallback

Post by acl06 » Mon Feb 23, 2015 2:32 pm

Thank you. After changing the lin_algebra flavor and libraries, I now get the error

make[3]: Entering directory `/g/g92/lim30/abinit-7.8.2/src/mods'
There is no buildable file here
make[3]: Leaving directory `/g/g92/lim30/abinit-7.8.2/src/mods'
Making all in 01_interfaces_ext
make[3]: Entering directory `/g/g92/lim30/abinit-7.8.2/src/01_interfaces_ext'
gfortran -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -I/g/g92/lim30/abinit-7.8.2/fallbacks/exports/include -ffree-form -J/g/g92/lim30/abinit-7.8.2/src/mods -O2 -mtune=native -march=native -g -ffree-line-length-none -c -o m_iso_c_bindings.o m_iso_c_bindings.F90
f951: error: unrecognized command line option "-march=native"
make[3]: *** [m_iso_c_bindings.o] Error 1
make[3]: Leaving directory `/g/g92/lim30/abinit-7.8.2/src/01_interfaces_ext'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/g/g92/lim30/abinit-7.8.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/g/g92/lim30/abinit-7.8.2'
make: *** [all] Error 2

and I have no idea what this means.

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

Re: Abinit keeps using fallback

Post by Jordan » Tue Feb 24, 2015 4:33 pm

I don't understand, I though you used xlf ?
You may be using gfortran 4.4 which might not like the -march=native
This option specify to the compiler to optimize the code to use your cpu depend instruction set.
I would not use but I think it is automatically added when optimization are enabled.

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

Re: Abinit keeps using fallback

Post by pouillon » Thu Apr 09, 2015 7:30 pm

Try to compile with FCFLAGS="-g -O2", or use a more recent GCC version if you can.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

hcy_61
Posts: 8
Joined: Wed Jul 08, 2015 12:12 pm

Re: Abinit keeps using fallback

Post by hcy_61 » Fri Jul 10, 2015 10:56 pm

pouillon wrote:Try to compile with FCFLAGS="-g -O2", or use a more recent GCC version if you can.


Hi, pouillon

i have a big problem...


i use abinit 7.4 source packgace in windows 7 64 bit operating system and when i use GW calculation for band sturcture converging of A3(BO3)2 crystal. Dielectric constant is not calculated.

Results:

For q-point: 0.000010 0.000020 0.000030
dielectric constant = ********
dielectric constant without local fields = ********

Help pls.

Locked