tips:building_abinit
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tips:building_abinit [2013/07/04 16:01] – external edit 127.0.0.1 | tips:building_abinit [2017/05/24 09:30] (current) – Matthieu Verstraete | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Tips and tricks ====== | ||
+ | |||
+ | ===== How to link netCDF 4 with Abinit ===== | ||
+ | |||
+ | First create a directory where you are going to store all you libraries. It is common to create this directory under / | ||
+ | |||
+ | < | ||
+ | cd local | ||
+ | mkdir Intel13 | ||
+ | </ | ||
+ | |||
+ | - **Install zlib** \\ Go on the Zlib website [[http:// | ||
+ | wget http:// | ||
+ | tar -xvf zlib-1.2.8.tar.gz | ||
+ | </ | ||
+ | ./configure --prefix='/ | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | - **Install HDF5** \\ Go on the HDF5 website [[http:// | ||
+ | wget http:// | ||
+ | tar -xvf hdf5-1.8.11.tar | ||
+ | </ | ||
+ | ./configure --with-zlib=/ | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | - **Install netCDF4** \\ Go on the netcdf4 website [[http:// | ||
+ | wget http:// | ||
+ | tar -xvf netcdf-4.1.3.tar.gz | ||
+ | </ | ||
+ | export CPPFLAGS=-I/ | ||
+ | export LDFLAGS=-L/ | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | export FC=ifort | ||
+ | export CC=icc | ||
+ | </ | ||
+ | Then issue: | ||
+ | < | ||
+ | ./configure --enable-netcdf4 --prefix=/ | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | - **Install Abinit with netCDF4**\\ | ||
+ | Be careful if you have set flags into you .ac file. You should unset the variable first: | ||
+ | < | ||
+ | unset FC | ||
+ | unset CC | ||
+ | </ | ||
+ | You should then add the following lines into your .ac configuration file: | ||
+ | < | ||
+ | with_netcdf_incs=" | ||
+ | with_netcdf_libs=" | ||
+ | with_trio_flavor=" | ||
+ | </ | ||
+ | For some mpi-io parallel I/O fancy stuff you may need to add the hdf5 explicitly | ||
+ | < | ||
+ | with_netcdf_incs=" | ||
+ | with_netcdf_libs=" | ||
+ | with_trio_flavor=" | ||
+ | </ | ||
+ | Note that here all of the libraries have been put in the same lib and include directories for convenience (otherwise you need to add the corresponding -I< | ||
+ | |||
+ | Then you should make a build directory into Abinit and issue: | ||
+ | < | ||
+ | ../ | ||
+ | make mj4 | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||