Print wave-functions in NETCDF format  [SOLVED]

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
davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Print wave-functions in NETCDF format

Post by davide.sangalli.82 » Mon Feb 17, 2020 10:18 am

Dear abinit developers,
for the interface of abinit with yambo I need the wave-functions printed in NETCD format in abinit 8.10

So far I achieved that only using the flags

Code: Select all

--enable-mpi-io  --enable-netcdf-default
However Yann warned me that the option --enable-netcdf-default is there only for testing purposes and that it is going to be dismissed in abinit 9. Thus I was wandering if there is an alternative way to achieve that.
For reference see also this post: viewtopic.php?p=12797#p12797

Kind regards,
Davide
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: Print wave-functions in NETCDF format  [SOLVED]

Post by gmatteo » Tue Feb 25, 2020 2:19 am

Dear Davide,

Code: Select all

for the interface of abinit with yambo I need the wave-functions printed in NETCD format in abinit 8.10
To activate the output of the WFK (DEN, POT) in netcdf format, set iomode to 3 in the input file.
See also the documentation: https://docs.abinit.org/variables/dev/#iomode

By default, abinit writes (reads) Fortran binary files. The internal implementation uses Fortran read/write statements if MPI is not activated and uses **direct** calls to the MPI-IO primitives to implement parallel-IO on Fortran binary files (record-based access).

Some algorithms such as paral_kgb 1 requires MPI-IO support but this is an extension that was added in the MPI2+ specifications and there are still several old (or buggy) MPI libraries around that do not implement the MPI-IO specs.
This is the reason why the build system exposes the --enable-mpi-io option to deactivate this part (by default, the build system auto-detects if the MPI implementation provides the MPI-IO primitives we need).

Note also that --enable-mpi-io is not related to the possible support for parallel-IO at the level of the netcdf4/hdf5 library.
Understanding whether netcdf4 provides support for parallel-IO at the level of the configure script is tricky because
the nf90_open_par symbol is always present in the netcdff library even if the lib does not support parallel IO.
Hopefully the detection of parallel-IO capabilities in the hdf5 library will improve in Abinit9
However Yann warned me that the option --enable-netcdf-default is there only for testing purposes and that it is going to be dismissed in abinit 9.
--enable-netcdf-default is an option used by the buildbot test farm to run all the test of the test suite in netcdf mode so that we can test whether the netcdf version and the "standard" implementation based on Fortran-files+MP-IO are on par.

-enable-netcdf-default changes the default value of iomode from 1 to 3 and this option may be used by users who wish to use netcdf for WFK/DEN/POT files by default without having to set iomode in the input file.

I would say that this option won't be removed in Abinit9 because we still need it to validate new implementations.
Abinit9 will require netcdf4/hdf5 but we don't explicitly require parallel-IO capabilities for netcdf files.
By default, users running in parallel with e.g. paral_kgb will still get Fortran files unless iomode is set to 3 or --enable-netcdf-default is used.

Ciao
Matteo

-

davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Print wave-functions in NETCDF format

Post by davide.sangalli.82 » Tue Feb 25, 2020 12:47 pm

Thanks Matteo.

Code: Select all

iomod 3 
and abinit compiled with

Code: Select all

--with-trio-flavor="netcdf"
did the job for serial netcd I/O
(I tried it as a first step but it did not work probably because I was having issues with the compilation)




I understand that

Code: Select all

--enable-netcdf-default 
and

Code: Select all

--enable-mpi-io
are independent. However the former without the latter makes abinit stop with error message.
See here: viewtopic.php?f=3&t=4316#p12792

Best,
D.
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

saikrishna
Posts: 15
Joined: Fri Jun 21, 2019 12:11 pm

Re: Print wave-functions in NETCDF format

Post by saikrishna » Thu Mar 19, 2020 11:47 am

Dear Abinit users,
I have run a band structure calculation with iomode as 3 for the non scf calculation. I am interested in getting out the netcdf file and there is an error in the terminal which I have attached here. Can someone help me with this?
--- !ERROR
src_file: m_ioarr.F90
src_line: 882
mpi_rank: 0
message: |
Wrong iomode: 3
...

Please this is urgent.

Thanks in advance
Sai krishna N.

Post Reply