Last active
February 20, 2024 05:40
-
-
Save jyalim/eb944f7d63ae49062361 to your computer and use it in GitHub Desktop.
Build HDF5 with Intel Compilers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers | |
## PREREQS | |
# 1) szip 2.1 | |
export CC=icc | |
export CXX=icpc | |
export FC=ifort | |
export CFLAGS='-O3 -xHost -ip' | |
export CXXFLAGS='-O3 -xHost -ip' | |
export FCFLAGS='-O3 -xHost -ip' | |
tar -zxvf szip-2.1.tar.gz | |
cd szip-2.1 | |
./configure --prefix=/usr/local/szip-2.1 | |
make | |
make check | |
make install | |
# 2) zlib 1.2.7 | |
export CC=icc | |
export CFLAGS='-O3 -xHost -ip' | |
tar -zxvf zlib-1.2.7.tar.gz | |
cd zlib-1.2.7 | |
./configure --prefix=/usr/local/zlib-1.2.7 | |
make | |
make check | |
make install | |
## ENV | |
export CC=icc | |
export F9X=mpifort | |
export FC=mpifort | |
export CXX=icpc | |
### BUILD | |
njobs=$(( $(nproc) / 2 )) | |
tar -zxvf hdf5-1.8.8.tar.gz | |
cd hdf5-1.8.8 | |
./configure --prefix=/usr/local/hdf5-1.8.8 --enable-fortran --enable-cxx --enable-hl --enable-shared \ | |
--with-szip=/usr/local/szip-2.1 --with-zlib=/usr/local/zlib-1.2.7 --enable-parallel | |
make -j $njobs && make -j $njobs check | |
make -j $njobs install | |
#### USAGE | |
# -lhdf5 | |
# #include <hdf5.h> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
could you please replace
--with-szip
by--with-szlib
as it is the flag used by the current version of hdf5