Compile abint9.4.1 with netcdf support

Dear Abinit,

I need netcdf output files, and, from Abinit calculations.
So, I tried to compile Abinit9.4.1 with netcdf support.

I used MPT for MPI. I first tried the options,
./configure --enable-netcdf-default --enable-mpi-io

When I run Abinit, I got information of
“- Creating netcdf file WITHOUT MPI-IO support:”
in the log file, and the calculation did NOT complete.
Is MPT NOT compatible to mpi-io feature of the application?

I then tried the option,
./configure --with-trio-flavor=“netcdf”.

Configure gave error message of
“configure: WARNING: unrecognized options: --with-trio-flavor”

My question is,

what are the options to support netcdf outputs in Abinit 9.4.1 compilation?

Thanks for your any suggestions.


Dayton, OH
45433, US

Hi @jjiang ! Since abinit v9 netcdf is actually mandatory. You can link against the netcdf library by using the following flags: --with-netcdf=path/to/netcdf-c/build --with-netcdf-fortran=path/to/netcdf-fortran/build --with-hdf5=path/to/hdf5/build.

You can consult the abinit build instructions for detailed information about how to compile abinit.

P.S.: I believe the --with-trio-flavor option is now removed in abinit v9 as well and therefore had no effect on your build.

Hope this helps!

Dear fgoudreault,

Thanks for detailed information.
I will compile the Abinit with the suggestions.



You can find more information about the configure options in the source code of ABINIT, in the doc/build/ file.

1 Like

Great let us know if you need more help!