Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • zlib: it is necessary previously obtain or compile the zlib compression library (www.zlib.net)
  • hdf5: this library is optional www.hdfgroup.org. Required only to write postprocess files with this format (files opened with GiD_PostHDF5=3 flag)

To build GiDPost as Python module you'll need:

  • python3
  • SWIG: (Simplified Wrapper and Interface Generator) a tool used to connect C or C++ code with scripting languages like python. https://www.swig.org/

To install the required packages in Linux just do the following as root:
Ubuntu (Debian and the like):

Code Block
apt-get install zlib1g-dev libhdf5-serial-dev
apt install python3 swig

Scientific Linux (Redhat and the like):

Code Block
yum install zlib-devel.x86_64 hdf5-devel.x86_64
yum install python3.x86_64 swig.x86_64


Note:
Bear in mind that there are several hdf5 development packages and that you should choose the right for you.
For instance, in Ubuntu these are the HDF5 development packages available:

...


Precompiled version:
The 'binaries' folder stores precompiled release versions of the library for Windows and Linux (x32 and x64 platforms), to avoid the requirement of compile them.

...


Compiling gidpost:

to compile the gidpost library using the command line:

...

How to build (Linux - gcc):

Code Block
languagebash
$ cd .../gidpost
$ mkdir build-linux
$ cd build-linux
$ cmake -DHDF5=ON -DBUILD_FORTRAN_EXAMPLES=ON ..     ;# gfortran is needed to BUILD_FORTRAN_EXAMPLES (by default it's off)
$ make
$ cd examples
$ ./testc -help      ;# to view format options
$ ./testc -f hdf5    ;# to write a gid post file in hdf5 format
$ ./testf90          ;# fortran 90 example writing hdf5 gid post file

How to build python module (Linux):

Once you have configured and buil the GiDPost library, then:

Code Block
languagebash
titlebuilding gidpost python module
$ cd .../gidpost/gidpost-swig/
$ make
$ make test


How to build (Linux - nvidia hpc sdk ):



First, remember to add the environment variables to your $HOME/.bashrc :

...