====== ABINIT ====== [[https://www.abinit.org|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). ===== Descargar source ===== El source se encuentra en la latest release del repositorio de github. https://github.com/abinit/abinit/releases/latest mkdir /data/shared/apps/abinit cd /data/shared/apps/abinit wget https://github.com/abinit/abinit/archive/refs/tags/10.6.3.tar.gz tar xvf 10.6.3.tar.gz mv abinit-10.6.3 10.6.3 rm 10.6.3.tar.gz ===== Parche ===== El usuario que solicita el software nos indica que hay un bug que es necesario parchear. El mismo reporta que la latest version del software todavía no tiene el parche, pero en los últimos días salió una nueva versión. Verifiquemos que la línea que el usuario quiere modificar se encuentra intacta en la nueva release, es decir, que el bug no fue corregido en la versión release. El usuario reporta:o // Hay un bug que se debe modificar manualmente: Dentro de la carpeta principal del código (abinit-X.X.X, 10.4.7 es la última versión) uno se encuentra con el directorio scr/, dentro del directorio scr/ uno debe dirigirse al directorio 56_recipspace/, el archivo a editar se llama m_gsphere.F90. La línea 593 de este archivo reza vec(3) = n1_max(dir3), pero debería ser: vec(3) = n3_max(dir3)// cd src/56_recipspace/ La nueva release es la versión 10.6.3. En ella la línea indicada por el usuario ahora es la línea 585: [bbruzzo@snmgt01 56_recipspace]$ grep -n "vec(3) =" -B 2 -A 12 m_gsphere.F90 583- ecut = HUGE(one) 584- do dir3=1,3 585: vec(3) = n1_max(dir3) 586- do dir2=1,3 587- vec(2) = n2_max(dir2) 588- do dir1=1,3 589- vec(1) = n1_max(dir1) 590- if (ANY(vec/=0)) then 591- trial_ene = half * normv(vec,Cryst%gmet,"G")**2 592- ecut = MIN(ecut,trial_ene) 593- !write(std_out,*)vec(:),trial_ene 594- end if 595- end do 596- end do 597- end do Aplicamos parche: sed -i 's/vec(3) = n1_max(dir3)/vec(3) = n3_max(dir3)/' m_gsphere.F90 Volvemos al root path del software. cd ../.. ===== Compilación ===== El usuario nos brindó esta configuración: ../configure --prefix="/home/juan/MAMBA/abinit-9.10.5/build_intel+wann3.1.0" FC=mpiifort CC=mpiicc CXX=mpiicpc --with-libxc="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/libxc/6.0.0" --with-hdf5="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/hdf5/1.10.8" --with-netcdf="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/netcdf4/4.9.0" --with-netcdf-fortran="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/netcdf4_fortran/4.6.0" --with-xmlf90="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/xmlf90/1.5.6" --with-libpsml="/home/juan/MAMBA/abinit-9.10.5/build_intel+wannier90/fallbacks/install_fb/intel/2021.6/libpsml/1.1.12" --with-wannier90=/home/juan/wannier90-3.1.0 --with-libxml2="/home/juan/local" XML2_CONFIG="/home/juan/local/bin/xml2-config" --enable-mpi-inplace Pero también vamos a usar la documentación oficial para construir nuestra propia: https://docs.abinit.org/installation/ ==== Preparación de enviroment ==== module purge module load intel openmpi5 ABINIT tiene una interfaz de Python, elijo usar un enviroment: Python: micromamba create -n myenv python=3.10 micromamba activate myenv ==== Config ==== Copiamos el archivo de configuración template con el nombre snmgt01.ac9. cp doc/build/config-template.ac9 snmgt01.ac9 === 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. 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 == NetCDF-C == ./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 Output: 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 Make: make -j2 make install Disclaimer, al hacer make test fallan algunos tests: FAIL: tst_netcdf4.sh FAIL: tst_ncgen4.sh FAIL: run_back_comp_tests.sh FAIL: tst_nccopy4.sh Habría que revisar porqué fallan. == NetCFD-Fortran == ./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 El output debería terminar con: # 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: === LIBXC === Las implementaciones de libxc de CXXI no fueron compiladas con derivadas terceras: +--------------------------------------------------------------+ | 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, ...). | +--------------------------------------------------------------+ Vamos a compilarlo específicamente para hacer esto dentro del directorio /data/shared/apps/abinit//libxc. Ver [[libxc|Compilación LibXC 6.2.2]] === Wannier90 === Es necesario agregar un symbolic link ln -s libwannier.a libwannier90.a en el directorio lib/libs. == Compilando == Usamos el siguiente archivo de configuración: 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" make check make test_fast make test_in make install == Módulo == 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")) == Check linkeo == module purge module load abinit ldd $(which abinit)