-
Notifications
You must be signed in to change notification settings - Fork 2
Compiling
For compiling on Linux-based systems you will need the HDF5 libraries for development:
- OpenMP:
sudo apt-get install libhdf5-dev
- MPI:
sudo apt-get install llibhdf5-openmpi-dev
Further dependencies will be prompted for during compilation, if needed. These seem to be the necessary ones in case of a serial (OpenMP) compilation on Ubuntu 18.04 LTS (accurate as of 30.03.2020). Check and adapt setup in config.mk
.
Currently these steps are known to work with the HDF5 versions:
- 1.10.0-patch1 (OpenMP)
- 1.10.5 (MPI)
Check your current version in terminal with h5cc -showconfig
.
- Clone the WinGen to your local machine, go into the new library
- Necassary make for
fftw
:make fftw
- Make for
src
andtest
:make
- Navigate into the
hdf5_demo
folder:cd hdf5_demo
- Make the demo:
make
- Test our your compilation with one of the example setup files (
hdf5_demo_2d.wfs
orhdf5_demo_3d.wfs
):./hdf5_demo hdf5_demo_3d.wfs
- Once done, visualize the resulting file
windgen.h5
in an HDF5-viewer (such as HDFCompass)
Here once again all steps once you are in the local folder WindGen
:
make fftw
make
cd hdf5_demo
make
./hdf5_demo hdf5_demo_3d.wfs
You should adapt the config.mk
file to fit your necessities and system requirements.
This example seriel setup (Ubuntu18.04 LTS & HDF%1.10.0-patch1) was done using:
WFS_ROOT := /home/<username>/Repositories/WindGen
# ----------------------------------------------------------------------
# NO MPI
# ----------------------------------------------------------------------
CC := gcc
FFTW_CONFIG_FLAGS := --prefix=$(WFS_ROOT)/fftw-3.3.3/
CFLAGS := -O0 -I $(WFS_ROOT)/src -I $(WFS_ROOT)/fftw-3.3.3/include
LDFLAGS := -L $(WFS_ROOT)/src -L $(WFS_ROOT)/fftw-3.3.3/lib
LDFLAGS += -lwfs -lfftw3
# ----------------------------------------------------------------------
# HDF5
# ----------------------------------------------------------------------
HDF5_ROOT := /usr/lib/x86_64-linux-gnu
ZLIB_ROOT := /usr/lib/x86_64-linux-gnu
SZIP_ROOT := /usr/lib/x86_64-linux-gnu
CFLAGS += -I/usr/include/hdf5/serial -DHAVE_HDF5
LDFLAGS += $(HDF5_ROOT)/hdf5/serial/libhdf5.a
# ----------------------------------------------------------------------
LDFLAGS += -pthread -lsz -lz -ldl -lm
For a proper setup of a consiedered case refer to the Choice of parameters for a new case.
- Compiling
- Choice of parameters for a new case
- Checking input in an empty channel