User Tools

Site Tools


admin:compilaciones:abinit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
admin:compilaciones:abinit [2026/02/10 18:30] bbruzzoadmin:compilaciones:abinit [2026/02/13 18:00] (current) – ldd check bbruzzo
Line 24: Line 24:
 que el bug no fue corregido en la versión release. que el bug no fue corregido en la versión release.
  
-El usuario reporta:+El usuario reporta:o
  
 // //
Line 84: Line 84:
 Pero también vamos a usar la documentación oficial para construir nuestra propia: Pero también vamos a usar la documentación oficial para construir nuestra propia:
 https://docs.abinit.org/installation/ https://docs.abinit.org/installation/
 +
 +
 +==== Preparación de enviroment ====
  
 <code> <code>
 module purge module purge
 +module load intel openmpi5 
 </code> </code>
 +
 +ABINIT tiene una interfaz de Python, elijo usar un enviroment:
 +Python:
 +
 +<code>
 +micromamba create -n myenv python=3.10
 +micromamba activate myenv
 +</code>
 +
 +
 +==== Config ====
  
 Copiamos el archivo de configuración template con el nombre snmgt01.ac9. Copiamos el archivo de configuración template con el nombre snmgt01.ac9.
Line 93: Line 108:
 <code>cp doc/build/config-template.ac9 snmgt01.ac9</code> <code>cp doc/build/config-template.ac9 snmgt01.ac9</code>
  
 +=== HDF5 ===
  
 +La versión de HDF5 tanto del modulo hdf5 como de phdf5 me está fallando al hacer configure, voy a probar [[hdf5|compilar]] una versión siguiendo la documentación de abinit.
 +
 +=== NetCDF ===
 +
 +Una vez que compilamos HDF5 como está indicado en la doc de ABINIT ([[hd|ver instrucciones]]) debemos proceder con NetCDF.
 +
 +<code>
 +wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.3/netcdf-c-4.9.3.tar.gz
 +tar xvf netcdf-c-4.9.3.tar.gz
 +
 +wget https://downloads.unidata.ucar.edu/netcdf-fortran/4.6.2/netcdf-fortran-4.6.2.tar.gz
 +tar xvf netcdf-fortran-4.6.2.tar.gz
 +</code>
 +
 +== NetCDF-C ==
 +
 +<code>
 +./configure --disable-dap --prefix=/data/shared/apps/abinit/10.6.3/libs \
 +CC=mpicc \
 +LDFLAGS=-L/data/shared/apps/abinit/10.6.3/libs/lib \
 +CPPFLAGS=-I/data/shared/apps/abinit/10.6.3/libs/include
 +</code>
 +
 +Output:
 +
 +<code>
 +NetCDF C Configuration Summary
 +==============================
 +
 +# General
 +-------
 +NetCDF Version: 4.9.3
 +Dispatch Version:       5
 +Configured On: Wed Feb 11 18:21:30 -03 2026
 +Host System: x86_64-pc-linux-gnu
 +Build Directory: /data/shared/apps/abinit/10.6.3/netcdf/netcdf-c-4.9.3
 +Install Prefix:         /data/shared/apps/abinit/10.6.3/libs
 +
 +# Compiling Options
 +-----------------
 +C Compiler: /opt/ohpc/pub/mpi/openmpi5-intel/5.0.3/bin/mpicc
 +CFLAGS: -fno-strict-aliasing
 +CPPFLAGS: -I/data/shared/apps/abinit/10.6.3/libs/include
 +LDFLAGS: -L/data/shared/apps/abinit/10.6.3/libs/lib
 +AM_CFLAGS:
 +AM_CPPFLAGS:
 +AM_LDFLAGS:
 +Shared Library: yes
 +Static Library: yes
 +Extra libraries: -lhdf5_hl -lhdf5 -lm -lz -lbz2 -lzstd -lxml2 
 +XML Parser:             libxml2
 +Legacy Macros:          yes
 +
 +# Features
 +--------
 +Benchmarks: no
 +NetCDF-2 API: yes
 +HDF4 Support: no
 +HDF5 Support: yes
 +CDF5 Support: yes
 +NC-4 Parallel Support: yes
 +PnetCDF Support: no
 +
 +DAP2 Support: no
 +DAP4 Support: no
 +Byte-Range Support: no
 +
 +S3 Support:         no
 +S3 SDK:          none
 +
 +NCZarr Support: yes
 +NCZarr Zip Support:     no
 +
 +Diskless Support: yes
 +MMap Support: no
 +ERANGE Fill Support: no
 +Relaxed Boundary Check: yes
 +
 +Plugins Enabled:        yes
 +Plugin Install Dir:     /data/shared/apps/abinit/10.6.3/libs/hdf5/lib/plugin
 +Plugin Search Path:     /data/shared/apps/abinit/10.6.3/libs/hdf5/lib/plugin:/usr/local/hdf5/lib/plugin
 +
 +Quantization: yes
 +Logging:      no
 +SZIP Write Support:     no
 +Standard Filters:       bz2 deflate zstd
 +ZSTD Support:           yes
 +Parallel Filters:       yes
 +
 +</code>
 +
 +Make:
 +
 +<code>
 +make -j2
 +make install
 +</code>
 +
 +Disclaimer, al hacer make test fallan algunos tests:
 +
 +<code>
 +FAIL: tst_netcdf4.sh
 +FAIL: tst_ncgen4.sh
 +FAIL: run_back_comp_tests.sh
 +FAIL: tst_nccopy4.sh
 +</code>
 +
 +Habría que revisar porqué fallan.
 +
 +
 +== NetCFD-Fortran ==
 +
 +
 +<code>./configure \
 +--disable-dap  \
 +--prefix=/data/shared/apps/abinit/10.6.3/libs \
 +FC=mpifort \
 +LDFLAGS=-L/data/shared/apps/abinit/10.6.3/libs/lib \
 +FCFLAGS=-I/data/shared/apps/abinit/10.6.3/libs/include
 +</code>
 +
 +
 +El output debería terminar con:
 +
 +<code>
 +# NetCDF Fortran Configuration Summary
 +==============================
 +
 +# General
 +-------
 +Library Version:                4.6.2
 +Configured On:                  Thu Feb 12 11:48:05 -03 2026
 +Host System:                    x86_64-pc-linux-gnu
 +Build Directory:                /data/shared/apps/abinit/10.6.3/netcdf/netcdf-fortran-4.6.2
 +Install Prefix:                 /data/shared/apps/abinit/10.6.3/libs
 +
 +# Compiling Options
 +-----------------
 +Fortran Compiler:               /opt/ohpc/pub/mpi/openmpi5-intel/5.0.3/bin/mpifort
 +FFLAGS:                         -g -fallow-argument-mismatch -mismatch_all
 +LDFLAGS:                        -L/data/shared/apps/abinit/10.6.3/libs/lib -Wl,-rpath,/data/shared/apps/abinit/10.6.3/libs/lib
 +C Compiler:                     /opt/ohpc/pub/mpi/openmpi5-intel/5.0.3/bin/mpicc
 +CPPFLAGS:                       -I/data/shared/apps/abinit/10.6.3/libs/include
 +CFLAGS:                         -O2 -DLONGLONG_IS_LONG
 +Shared Library:                 yes
 +Static Library:                 yes
 +Extra libraries:                -lnetcdf -lm
 +
 +# Features
 +--------
 +F03:                            yes
 +Dap Support:                    no
 +Logging Support:                no
 +NetCDF-2 API:                   yes
 +NetCDF-4 API:                   yes
 +CDF5 Support:                   yes
 +Parallel IO:                    yes
 +NetCDF4 Parallel IO:            yes
 +PnetCDF Parallel IO:            no
 +SZIP Write Support:             no
 +Zstandard Support:              no
 +Quantize:                       yes
 +
 +configure: WARNING:
 +configure: WARNING: ------------------------------------------
 +configure: WARNING: libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set, so zstd support is not enabled in libnetcdff. Set HDF5_PLUGIN_PATH and re-run configure if you want to enable zstd support.
 +
 +configure: WARNING: You can use `nc-config --plugindir` to determine the appropriate value for HDF5_PLUGIN_PATH
 +configure: WARNING: ------------------------------------------
 +configure: WARNING:
 +</code>
 +
 +
 +=== LIBXC ===
 +
 +Las implementaciones de libxc de CXXI no fueron compiladas con derivadas terceras:
 +
 +<code>
 +        +--------------------------------------------------------------+
 +        | Suboptimal libxc configuration                               |
 +        +--------------------------------------------------------------+
 +        | The LibXC package does not provide the 3rd derivatives of    |
 +        | energy!                                                      |
 +        | You should recompile it using --enable-kxc configure option. |
 +        | Otherwise Abinit will not be able to provide nonlinear       |
 +        | response properties (Raman intensities, ...).                |
 +        +--------------------------------------------------------------+
 +</code>
 +
 +Vamos a compilarlo específicamente para hacer esto dentro del directorio /data/shared/apps/abinit/<version>/libxc.
 +
 +Ver [[libxc|Compilación LibXC 6.2.2]]
 +
 +=== Wannier90 ===
 +
 +Es necesario agregar un symbolic link
 +
 +<code>ln -s libwannier.a libwannier90.a
 +</code>
 +
 +en el directorio lib/libs.
 +
 +== Compilando ==
 +
 +Usamos el siguiente archivo de configuración:
 +
 +<code snmgt01.ac9>
 +prefix="/data/shared/apps/abinit/10.6.3/build"
 +CC="icx"
 +CXX="mpicxx"
 +FC="mpifort"
 +with_mpi="/opt/ohpc/pub/mpi/openmpi5-intel/5.0.3"
 +with_mpi_flavor="native"
 +enable_mpi_gpu_aware="no"
 +enable_mpi_inplace="yes"
 +enable_mpi_io="auto"
 +with_mpi_level="2"
 +with_linalg_flavor="mkl"
 +LINALG_CPPFLAGS="-I${MKLROOT}/include"
 +LINALG_FCFLAGS="-I${MKLROOT}/include"
 +LINALG_LIBS="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -ldl"
 +with_fft_flavor="dfti"
 +FFT_CPPFLAGS="-I${MKLROOT}/include"
 +FFT_FCFLAGS="-I${MKLROOT}/include"
 +FFT_LIBS="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -ldl"
 +with_libxc="/data/shared/apps/abinit/10.6.3/libs"
 +#LIBXC_LIBS="-L/data/shared/apps/libxc/7.0.0/lib -lxcf90 -lxc"
 +#with_libxml2="/data/shared/apps/abinit/10.6.3/tmp/fb"
 +with_hdf5="/data/shared/apps/abinit/10.6.3/libs"
 +#HDF5_CPPFLAGS="-I/data/shared/apps/abinit/libs/include"
 +with_netcdf_fortran="/data/shared/apps/abinit/10.6.3/libs"
 +with_netcdf_c="/data/shared/apps/abinit/10.6.3/libs"
 +with_wannier90="/data/shared/apps/abinit/10.6.3/libs"
 +WANNIER90_LIBS="-L/data/shared/apps/abinit/10.6.3/libs/libi -lwannier -qmkl=sequential"
 +with_python_includes="-I/home/bbruzzo/.local/share/mamba/envs/myenv/include/python3.10"
 +with_python_libs="-L/home/bbruzzo/.local/share/mamba/envs/myenv/lib -lpython3.10"
 +PYTHON_CPPFLAGS="-I/home/bbruzzo/.local/share/mamba/envs/myenv/include/python3.10"
 +PYTHON_CFLAGS="-O2"
 +PYTHON_LDFLAGS="-L/home/bbruzzo/.local/share/mamba/envs/myenv/lib -lpython3.10"
 +</code>
 +
 +<code>
 +make check
 +make test_fast
 +make test_in
 +make install
 +</code>
 +
 +== Módulo ==
 +
 +<file lua 10.6.3.lua>
 +p([==[
 +Description
 +===========
 +ABINIT
 +
 +Version
 +=======
 +10.6.3
 +
 +More information
 +================
 + - Homepage: https://www.abinit.org/
 +]==])
 +
 +whatis([==[Description:  ABINIT is a software suite to calculate
 +the optical, mechanical, vibrational, and other observable
 +properties of materials.
 +Starting from the quantum equations of density functional theory,
 +you can build up to advanced applications with perturbation theories
 +based on DFT, and many-body Green's functions (GW and DMFT).
 +]==])
 +whatis([==[Homepage: https://www.abinit.org]==])
 +whatis("Compiled by bbruzzo")
 +
 +local root = "/data/shared/apps/abinit/10.6.3/build"
 +local libs = "/data/shared/apps/abinit/10.6.3/libs"
 +
 +if not ( isloaded("intel/2024.0.0") ) then
 +    load("intel/2024.0.0")
 +end
 +
 +if not ( isloaded("openmpi5") ) then
 +    load("openmpi5")
 +end
 +
 +prepend_path("PATH", pathJoin(root, "/bin"))
 +prepend_path("LD_LIBRARY_PATH", pathJoin(libs, "/lib"))
 +</file>
 +
 +== Check linkeo ==
 +
 +<code>
 +module purge
 +module load abinit
 +ldd $(which abinit)
 +</code>
admin/compilaciones/abinit.1770748234.txt.gz · Last modified: by bbruzzo