User Tools

Site Tools


admin:compilaciones:hdf5

Table of Contents

HDF5

Distintas suites de simulación requieren versiones levemente distintas de HDF5. En algunos casos, es conveniente compilar la biblioteca dentro del root de la toolchain.

Por ejemplo, VASP y ABINIT requieren distintas flags de compilación de HDF5 para funcionar, entonces tendría sentido estructurar estar herramientas de la siguiente forma:

/data/shared/apps/vasp/libs/hdf5
/data/shared/apps/abinit/libs/hdf5

y luego mediante LMOD appendear a LD_LIBRARY_PATH los directorios respectivos a cada tool.

VASP

La versión verificada en la VASP Toolchain es la 1.14.6.

OpenMPI4

module load intel openmpi4

export CC=icx
export CXX=icpx
export FC=ifort
export CFLAGS='-O3 -xHost -ip'
export CXXFLAGS='-O3 -xHost -ip'
export FCFLAGS='-O3 -xHost -ip'

curl -LO https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz
tar -zxvf hdf5-1.14.6.tar.gz
cd hdf5-1.14.6
./configure --prefix=/data/contrib/hdf5-install-autotools --enable-fortran --enable-cxx
make
make check
make install

ABINIT

Descargamos la misma versión que para vasp pero usamos otras flags de configuración.

module purge
module load intel openmpi5

curl -LO https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz
tar -zxvf hdf5-1.14.6.tar.gz
mv hdf5-1.14.6 1.14.6

./configure --prefix=/data/shared/apps/abinit/10.6.3/libs  \
           CC=mpicc --enable-parallel --enable-shared
           

Al finalizar el configure deberíamos obtener el siguiente output:

        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

General Information:
-------------------
                   HDF5 Version: 1.14.6
                  Configured on: Wed Feb 11 16:04:18 -03 2026
                  Configured by: bbruzzo@snmgt01
                    Host system: x86_64-pc-linux-gnu
              Uname information: Linux snmgt01 5.14.0-427.13.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 10 10:29:16 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
                       Byte sex: little-endian
             Installation point: /data/shared/apps/abinit/10.6.3/libs

Compiling Options:
------------------
                     Build Mode: production
              Debugging Symbols: no
                        Asserts: no
                      Profiling: no
             Optimization Level: high

Linking Options:
----------------
                      Libraries: static, shared
  Statically Linked Executables: 
                        LDFLAGS: 
                     H5_LDFLAGS: 
                     AM_LDFLAGS: 
                Extra libraries: -lz -ldl -lm 
                       Archiver: ar
                       AR_FLAGS: cr
                         Ranlib: ranlib

Languages:
----------
                              C: yes
                     C Compiler: /opt/ohpc/pub/mpi/openmpi5-intel/5.0.3/bin/mpicc
                       CPPFLAGS: 
                    H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L   -DNDEBUG -UH5_DEBUG_API -I/data/shared/apps/abinit/10.6.3/hdf5/1.14.6/src/H5FDsubfiling
                    AM_CPPFLAGS: 
                        C Flags: 
                     H5 C Flags:   -std=c99 -Wall   -Wl,-s   -O3
                     AM C Flags: 
               Shared C Library: yes
               Static C Library: yes


                        Fortran: no

                            C++: no

                           Java: no


Features:
---------
                     Parallel HDF5: yes
  Parallel Filtered Dataset Writes: yes
                Large Parallel I/O: yes
                High-level library: yes
Dimension scales w/ new references: no
                  Build HDF5 Tests: yes
                  Build HDF5 Tools: yes
                   Build GIF Tools: no
                      Threadsafety: no
               Default API mapping: v114
    With deprecated public symbols: yes
            I/O filters (external): deflate(zlib)
                  _Float16 support: no
                     Map (H5M) API: no
                        Direct VFD: no
                        Mirror VFD: no
                     Subfiling VFD: no
                (Read-Only) S3 VFD: no
              (Read-Only) HDFS VFD: no
    Packages w/ extra debug output: none
                       API tracing: no
              Using memory checker: no
                  Use file locking: best-effort
         Strict file format checks: no
      Optimization instrumentation: no

Procedemos a compilar:

make -j4
make check
make install
admin/compilaciones/hdf5.txt · Last modified: by bbruzzo