Configuring Abinit 8.10 with NetCDF as default  [SOLVED]

option, parallelism,...

Moderators: jbeuken, Jordan, pouillon

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 builds.
For a video explanation on how to build Abinit 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.

Configuring Abinit 8.10 with NetCDF as default  [SOLVED]

Postby rogphys » Fri Feb 15, 2019 11:38 pm

Hello everyone,

I have been having some trouble using ABINIT with NetCDF in Linux. I am interested in outputting everything in NetCDF format, either by setting the `enable_netcdf_default="yes"` in the configuration stage, or by using `iomode 3` in the input file. This is my configuration file:

Code: Select all
enable_fallbacks="yes"
enable_gw-dpc="yes"
enable_macroave="yes"

enable_mpi="yes"
enable_mpi_io="yes"

enable_openmp="yes"

with_fft_flavor=fftw3
with_fft_incs="-I/usr/include/"
with_fft_libs="-L/usr/lib/x86_64-linux-gnu/ -lfftw3 -lfftw3f"

with_trio_flavor=netcdf
with_netcdf_libs="-L/usr/lib/x86_64-linux-gnu/ -lnetcdf -lnetcdff"
with_netcdf_incs="-I/usr/include/"
enable_netcdf_default="yes"


I configure with this:

Code: Select all
CC=mpicc FC=mpifort CXX=mpicxx ../configure


This compiles successfully, but when I run the tests using MPI, I get this error:

Code: Select all
--netcdf-default is on but netcdf library does not support MPI-IO. Aborting now


This has happened to me on various Linux systems using various compilers and libraries. I have tried to alleviate this problem by compiling NetCDF with parallel capabilities by hand and linking to that, but those attempts have been unsuccessful so far.

Surely there must be a way to launch ABINIT with MPI parallelism, but with sequential writing of the NetCDF files! Any help would be greatly appreciated.
rogphys
 
Posts: 6
Joined: Fri Aug 14, 2015 8:43 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby jbeuken » Tue Feb 19, 2019 4:18 pm

Hi,

it seems that the "enable_netcdf_default" option involves netcdf-4 with a parallel hdf5
the netcdf package of ubuntu does not seem to support this configuration

below the ac file which contains the 4 configurations I tested:
    1) netcdf of ubuntu
    2) compilation of netcdf-4.6 + netcdf-fortran
    3) compilation of hdf5_serial + netcdf-4.6+ netcdf-fortran
    4) compilation of hdf5_paral + netcdf-4.6+ netcdf-fortran

only "config 4" works with "enable_netcdf_default="yes""

Code: Select all
enable_mpi="yes"
enable_mpi_io="yes"
with_mpi_prefix="/usr"

enable_openmp="yes"

with_fft_flavor=fftw3
with_fft_incs="-I/usr/include/"
with_fft_libs="-L/usr/lib/x86_64-linux-gnu/ -lfftw3 -lfftw3f"

####### netcdf package from Ubuntu 18.04
#
#with_trio_flavor="netcdf"
#with_netcdf_libs="-L/usr/lib/x86_64-linux-gnu/ -lnetcdf -lnetcdff -lhdf5_serial -lhdf5_serial_hl"
#with_netcdf_incs="-I/usr/include/"

####### netcdf-4.6 without hdf5
#
#with_trio_flavor="netcdf"
#with_netcdf_incs="-I/usr/local/netcdf-4.6.2_gcc73/include"
#with_netcdf_libs="-L/usr/local/netcdf-4.6.2_gcc73/lib -lnetcdff -lnetcdf"

####### netcdf-4.6  with hdf5 serial
#
#with_trio_flavor="netcdf"
#with_netcdf_incs="-I/usr/local/netcdf-4.6.2_gcc73_s_openmpi/include"
#with_netcdf_libs="-L/usr/local/netcdf-4.6.2_gcc73_s_openmpi/lib -lnetcdff -lnetcdf -L/usr/local/hdf5-1.10.4_gcc73_serial/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5  -lz -ldl"

####### netcdf-4.6  with hdf5 //
#
with_trio_flavor="netcdf"
with_netcdf_incs="-I/usr/local/netcdf-4.6.2_gcc73_openmpi/include"
with_netcdf_libs="-L/usr/local/netcdf-4.6.2_gcc73_openmpi/lib -lnetcdff -lnetcdf -L/usr/local/hdf5-1.10.4_gcc73_paral/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5  -lz -ldl"

enable_netcdf_default="yes"

enable_gw_dpc="yes"
enable_macroave="yes"


regards

jmb
User avatar
jbeuken
 
Posts: 306
Joined: Tue Aug 18, 2009 9:24 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby jbeuken » Tue Feb 19, 2019 9:33 pm

I'm just found that there is a parallel netcdf lib ( libpnetcdf-dev ) : to try...

jmb
User avatar
jbeuken
 
Posts: 306
Joined: Tue Aug 18, 2009 9:24 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby rogphys » Wed Feb 20, 2019 7:04 pm

Thank you for the suggestions. Is there anyway to simply tell the program to not write the NetCDF files in parallel? That would definitely be the easiest solution...
rogphys
 
Posts: 6
Joined: Fri Aug 14, 2015 8:43 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby jbeuken » Fri Feb 22, 2019 10:28 pm

Hi,

Is there anyway to simply tell the program to not write the NetCDF files in parallel?

simple answer : no :|

some more details...
libpnetcdf-dev : not usable because it's another paradigm

ubuntu packages : libnetcdf-dev + libnetcdff-dev + libhdf5-openmpi-dev + libhdf5-mpi-dev : don't work :-(
ubuntu didn't really compile the parallel support :roll:

root@yambo3:~/Workspace/trunk_release-8.10# nc-config --all

This netCDF 4.6.0 has been built with the following features:

--cc -> /usr/bin/cc
--cflags -> -I/usr/include -I/usr/include/hdf5/serial
--libs -> -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl

--has-c++ -> no
--cxx ->

--has-c++4 -> no
--cxx4 ->

--has-fortran-> yes
--fc -> gfortran
--fflags -> -I/usr/include
--flibs -> -L/usr/lib -lnetcdff -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes

--has-dap -> yes
--has-dap2 -> yes
--has-dap4 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging-> no
--has-pnetcdf-> no
--has-szlib -> no
--has-cdf5 -> no
--has-parallel-> no

--prefix -> /usr
--includedir-> /usr/include
--libdir -> /usr/lib/x86_64-linux-gnu
--version -> netCDF 4.6.0


only the "config 4" in my previous post works ( compilation of hdf5_paral + netcdf-4.6+ netcdf-fortran )

root@yambo3:/usr/local/hdf5-1.10.4_gcc73_paral/bin# /usr/local/netcdf-4.6.2_gcc73_openmpi/bin/nc-config --all

This netCDF 4.6.2 has been built with the following features:

--cc -> mpicc
--cflags -> -I/usr/local/netcdf-4.6.2_gcc73_openmpi/include -I/usr/local/hdf5-1.10.4_gcc73_paral/include
--libs -> -L/usr/local/netcdf-4.6.2_gcc73_openmpi/lib -L/usr/local/hdf5-1.10.4_gcc73_paral/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -ldl -lz

--has-c++ -> no
--cxx ->

--has-c++4 -> no
--cxx4 ->

--has-fortran -> yes
--fc -> gfortran
--fflags -> -I/usr/include
--flibs -> -L/usr/lib -lnetcdff -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes

--has-dap -> no
--has-dap2 -> no
--has-dap4 -> no
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging -> no
--has-pnetcdf -> no
--has-szlib -> no
--has-cdf5 -> yes
--has-parallel4 -> yes
--has-parallel -> yes


--prefix -> /usr/local/netcdf-4.6.2_gcc73_openmpi
--includedir -> /usr/local/netcdf-4.6.2_gcc73_openmpi/include
--libdir -> /usr/local/netcdf-4.6.2_gcc73_openmpi/lib
--version -> netCDF 4.6.2


I removed all installed packages by default (openmpi, hdf5, netcdf, ...) and I recompiled everything (MPICH3 + HDF5 + NetCDF + NetCDF-fortran ...) and then, everything works ...

Code: Select all
./runtests.py paral mpiio -n 4 -j 2 --no-logo
...
Suite   failed  passed  succeeded  skipped  disabled  run_etime  tot_etime
paral        0       9         30       77         0     797.29     805.70
...
Suite   failed  passed  succeeded  skipped  disabled  run_etime  tot_etime
mpiio        0       2         12        4         0     262.67     282.94


The standard packages of ubuntu are not made for the "simulation" nor to make the HPC !!

if you need recipes to compile the different packages (HDF5, NetCDF, NetCDF-fortran, ...), I provide them

A+

jmb
User avatar
jbeuken
 
Posts: 306
Joined: Tue Aug 18, 2009 9:24 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby rogphys » Sat Feb 23, 2019 5:15 pm

jbeuken wrote:The standard packages of ubuntu are not made for the "simulation" nor to make the HPC !!

if you need recipes to compile the different packages (HDF5, NetCDF, NetCDF-fortran, ...), I provide them


That would be incredibly useful for me! My final install will be on a small HPC system using the Intel compilers.

Many thanks!
rogphys
 
Posts: 6
Joined: Fri Aug 14, 2015 8:43 pm

Re: Configuring Abinit 8.10 with NetCDF as default

Postby rogphys » Mon Mar 04, 2019 6:28 am

jbeuken wrote:if you need recipes to compile the different packages (HDF5, NetCDF, NetCDF-fortran, ...), I provide them

jmb


I would really appreciate these, if you have the chance. Thanks!
rogphys
 
Posts: 6
Joined: Fri Aug 14, 2015 8:43 pm


Return to Configuration

Who is online

Users browsing this forum: No registered users and 1 guest

cron