Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate switching to HDF5 for use with CGNS #9

Open
ewu63 opened this issue Aug 21, 2020 · 2 comments
Open

Investigate switching to HDF5 for use with CGNS #9

ewu63 opened this issue Aug 21, 2020 · 2 comments
Labels
maintenance This is for maintaining the repo

Comments

@ewu63
Copy link
Collaborator

ewu63 commented Aug 21, 2020

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • Maintenance

Description

Right now we build CGNS with ADF, but CGNS recommends HDF5 which is also becoming more popular within the scientific community. Investigate switching to use HDF5, understand the build process, pros/cons, and make a decision whether to switch. Can be done in conjunction with upgrading to CGNS 4.x

@ewu63
Copy link
Collaborator Author

ewu63 commented Feb 28, 2021

I looked into this, and the process is fairly straightforward. Installing HDF5 can be done in one of several ways

  • build from source (both make and cmake are supported, process is pretty straightforward but unclear if we need zlib and szip support)
  • install via system packages such as Debian. Unclear what the version requirements are from CGNS so may not be compatible.
  • install via PETSc. Again unclear what version they install and whether it would work with CGNS

The different config files will also have to be updated to link to HDF5 appropriately. This is not necessary if we install via PETSc since the PETSc linker flags will include everything in that case.

Finally, we will also have to convert all existing meshes to use HDF5 format. CGNS comes with a utility to do this but it will still take some time (analogous to the py2/3 transition with pyoptsparse history files).

@bernardopacini
Copy link
Contributor

To add to this, I have used HDF5 + CGNS in the past on Ubuntu with the following installation process (this comes from the code "DUST"):

HDF5 can be found packed in many distribution. 
However it can be easily built with the following procedure:
  * clone the desired version of HDF5 fromt the git repositories:
    git clone -b hdf5-1_10_5 https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git
  
  * move into the folder, and build an install folder
    cd hdf5
    mkdir install

  *configure the installation
    ./configure --prefix=/absolute/path/to/install --enable-fortran

  *build & install
    make
    make install

CGNS can be found packed in some distributions, however tends to be outdated, 
and since CGNS tend to change radically the API behaviour it is advised to
build it from the git repositories
  * clone the stable release from the git repositories
    git clone -b v3.3.1 https://github.com/CGNS/CGNS.git

  * move into folder, create the installation folders
    cd CGNS
    mkdir build install
    cd build

  * configure the installation
    export HDF5_ROOT=/path/to/hdf5/installation (should not be necessary when employing system libraries)
    cmake -D CGNS_ENABLE_FORTRAN=ON -D CGNS_ENABLE_HDF5=ON -D CMAKE_INSTALL_PREFIX=../install ../

  * build & install
    make 
    make install

We can adapt this as needed for our specific versions.

@ewu63 ewu63 added the maintenance This is for maintaining the repo label Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance This is for maintaining the repo
Projects
None yet
Development

No branches or pull requests

2 participants