Packaging abinit for Fedora/RHEL/CentOS

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
shakthimaan
Posts: 1
Joined: Thu Dec 01, 2011 12:12 pm

Packaging abinit for Fedora/RHEL/CentOS

Post by shakthimaan » Thu Dec 01, 2011 12:19 pm

Hi,

I am interested in making abinit available for Fedora/RHEL/CentOS *nix distributions. I have been able to compile abinit-6.10.2 on Fedora 15 (x86_64) using:

Code: Select all

$ ./configure --disable-mpi
$ make


I would like to know if there are any specific dependency packages that are required for abinit, and/or specific options that end users would like enabled when building abinit.

Please let me know.

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

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by pouillon » Fri Dec 02, 2011 5:00 pm

Thank you for your packaging efforts. I'm coordinating a similar project for Debian-based distributions. My suggestion about the organization of binary packages is to separate the test suite from the executables, as the test suite is requiring a lot of disk space. For Debian, the future packages will very likely be: abinit, abinit-doc, abinit-gui, abinit-test, libabinit, and libabinit-dev.

Regarding dependencies, the most used ones are LibXC, NetCDF, and ETSF_IO. LibXC 1.0 & 1.1 have already been packaged by Jussi Lehtola for Fedora, which is fine with Abinit, from 6.6 to 6.12 at least, but note that 1.1 can only be used from 6.12 on. Any version of NetCDF between 3.6.3 and 4.1.1 is known to work with Abinit, and more recent versions should work as well. ETSF_IO has however been packaged for Debian only in its 1.0.3 version, compatible with Abinit from 6.2 to 6.10, and likely with 6.12 (untested). Wannier90 1.2 is also quite popular, but it is currently packaged experimentally (https://launchpad.net/~pouillon/+archive/etsf-ubuntu). Just have a look at the --with-*-flavor options if you want to fine-tune optional features. The ~abinit/doc/config/build-config.ac file will also be useful to you.

Of course, Abinit requires BLAS & LAPACK to run. The choice of the implementation (Netlib, ATLAS, ...) is up to you.

You can benefit from multicore architectures by using MPI for now. OpenMP support is in progress.

For configuration, I would recommend the following options:

Code: Select all

../configure \
  --disable-config-file \
  --disable-fallbacks \
  --enable-exports \
  --enable-pkg-check \
  --with-trio-flavor="netcdf+etsf_io" \
  --with-dft-flavor="libxc" \
  --with-linalg-libs="-lyour_preferred_libs ..."


Switching on --enable-gui is up to you, as it will require Java. Please note that you can build the GUI separately in any case.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

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

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by jbeuken » Mon Dec 05, 2011 3:37 pm

HI,

I would like to share my experience with the MPI packages with ABinit 6.10.x under Fedora Core 16 ( x86_64 )

I tried with theses two packages without success :(

Code: Select all

openmpi-1.5-4.fc16.x86_64
openmpi-devel-1.5-4.fc16.x86_64

mpich2-1.4.1p1-1.fc16.x86_64
mpich2-devel-1.4.1p1-1.fc16.x86_64


1) OpenMPI => runtime problem

Code: Select all

Your architecture is not able to handle 16, 8, 4 or 2-bytes FORTRAN file record markers! 
 You cannot use ABINIT and MPI/IO.
  MPI_ERROR_STRING: MPI_ERR_UNKNOWN: unknown error

I have not yet understood what the problem was...
but the version 1.5.x is not yet supported by our testfarm : not stable version of OpenMPI

2) MPICH2 => compilation problem

there is a bug in the 1.4.1p1 version of mpich2 ( resolved in the svn version... )
see the topic for more details : viewtopic.php?f=3&t=1206#p4228

Then, I compiled the version openmpi 1.4.3 from sources and everything working...

In brief, when one of the two MPI packages will be operational for abinit,
here is a recipe to compile abinit 6.12.x ( with all plugins + openmpi or mpich2 ) under a fresh Fedora Core 16 (x86_64) :

1) installed pakages :

Code: Select all

yum install gcc-gfortran.x86_64
yum install netcdf
yum install netcdf-devel
yum install atlas
yum install atlas-devel
yum install fftw3
yum install fftw3-devel
yum install openmpi
yum install openmpi-devel
yum install mpich2
yum install mpich2-devel
yum install libxc
yum install libxc-devel
yum install patch


2) create a file "build.ac" with these lines :

Code: Select all

#enable_fallbacks="no"
enable_exports="yes"
enable_pkg_check="yes"

enable_gw_dpc = yes
enable_mpi = yes
enable_mpi_io = yes
with_mpi_prefix = /usr/lib64/openmpi
with_trio_flavor="netcdf+etsf_io+fox"
with_dft_flavor = atompaw+bigdft+libxc+wannier90
with_linalg_flavor = atlas
with_linalg_libs = -L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas
with_fft_flavor = fftw3
with_fft_incs = -I/usr/include/
with_fft_libs = -L/usr/lib64 -lfftw3
with_netcdf_incs = -I/usr/lib64/gfortran/modules
with_netcdf_libs = -L/usr/lib64 -lnetcdf -lnetcdff
with_libxc_incs="-I/usr/include -I/usr/lib64/gfortran/modules"
with_libxc_libs="-L/usr/lib64 -lxc"


3) execute theses commands :

Code: Select all

export PATH=/usr/lib64/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH

./configure --with-config-file=./build.ac
make mj4
make install


all binaries are installed in "/usr/local/bin" then you can add the dir in the PATH :

Code: Select all

export PATH=/usr/lib64/openmpi/bin/:$PATH



Notes : tested with a 6.11.x :
    -ok for ./configure and compilation
    - some numerical errors with some tests ( not insuppressible to resolve... :roll: )
    - not good with the libxc 1.1 package :o

Code: Select all

6.11.2-private/r782
======================================================
Tests SEQ start at 13:37 and done after     1734s
test built_in OK
========================================================
     Serie  #tests  #succes  #passed  #failed  #missing
========================================================
   atompaw     1        1       0       0          0
    bigdft    13       13       0       0          0
   etsf_io    10       10       0       0          0
      fast    27       26       0       1          0
       fox     2        1       0       1          0
      gwdp    31       17      13       1          0
     libxc    13        2       1      10          0
 tutoplugs     4        0       4       0          0
tutorespfn    46       34       7       5          0
  tutorial    57       45       9       3          0
   unitary     4        4       0       0          0
        v1    96       91       1       4          0
        v2    95       80      10       5          0
        v3    93       80       9       4          0
        v4    94       73      18       3          0
        v5    99       72      12      15          0
        v6   101       79      18       4          0
 wannier90     3        0       3       0          0
     paral    66       49      17       0          0
     mpiio     9        8       1       0          0
========================================================
Paral Tests DONE ( time elapsed: 1055s )
========================================================
Powered by Analysis V2.7.0rc1
Date : 12/05/2011
========================================================

regards

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

Zhang Xiaole
Posts: 46
Joined: Thu Sep 15, 2011 7:13 am

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by Zhang Xiaole » Wed Dec 14, 2011 3:36 pm

According to your solution, my promlem has sovled as well. Thanks a lot ~
but i complied with

Code: Select all

with_trio_flavor="none"
with_dft_flavor="none"

coulde it be a problem for my future calculation?
Phd student
Phys Department
Shanghai JiaoTong university, Shanghai, China

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

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by pouillon » Wed Dec 14, 2011 11:24 pm

with_trio_flavor="none" could be a problem only if you have to use binary files produced by Abinit on a different computer architecture from that on which they have been produced.

with_dft_flavor="none" will prevent you from using the wealth of XC functionals provided by LibXC. Nor will you be able to use Wannier functions.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Zhang Xiaole
Posts: 46
Joined: Thu Sep 15, 2011 7:13 am

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by Zhang Xiaole » Thu Dec 15, 2011 5:59 pm

pouillon wrote:with_trio_flavor="none" could be a problem only if you have to use binary files produced by Abinit on a different computer architecture from that on which they have been produced.

with_dft_flavor="none" will prevent you from using the wealth of XC functionals provided by LibXC. Nor will you be able to use Wannier functions.

Thank you for your replay, i know a little bit how dos it works. one more quesion, when i enable the libxc atompaw wannier bigdft, and i put the corresponding files in the dictory .abinit/tarballs/. the atompaw can build but the bigdft cant. why was that?
Phd student
Phys Department
Shanghai JiaoTong university, Shanghai, China

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

Re: Packaging abinit for Fedora/RHEL/CentOS

Post by pouillon » Thu Dec 15, 2011 6:17 pm

This topic is about packaging Abinit for RPM-based distributions, and we have already drifted away a lot.

If you wish to dicuss about a problem when building BigDFT, I suggest you to open a new topic and attach BigDFT's config.log (found in plugins/bigdft/bigdft-x.y.z.a/) to your message.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked