OP-DSL / OP2-Common

OP2: open-source framework for the execution of unstructured grid applications on clusters of GPUs or multi-core CPUs
https://op-dsl.github.io
Other
98 stars 47 forks source link

Fix/hdf5 compile #218

Open aowenson opened 2 years ago

aowenson commented 2 years ago

Turns out parallel-HDF5 does need a MPI compiler, but not serial. So Makefile needs to check whether HDF5 is serial or parallel, if we want to maintain a functional MPI-free build path.

reguly commented 2 years ago

@bozbez this should be useful for the new build system too

aowenson commented 2 years ago

Shall I close this and delete branch? Seems like Joe is handling this.

bozbez commented 2 years ago

I think we were discussing moving out the current state of the master branch into a release branch for the current Hydra iteration - in that case then this patch may still be useful for that branch, so perhaps leave it open for now and we can point it at release/OP2-Hydra-v1.0 or similar when it materialises?

gihanmudalige commented 2 years ago

Yes, leave this for now. Will be useful for the current OP2-Hydra.

bozbez commented 2 years ago

I think this is fine as a fix but as a note the HDF5 support for the MPI variants gets compiled into libop2_mpi.a, with libop2_hdf5.a only being used for the non-MPI app variants. This means we should probably just always compile with CXX and enable/disable the rule based on the presence of the sequential HDF5 library. If we compile libop2_hdf5.a with MPICXX then we also have to compile the sequential apps with MPICXX or manually pass the MPI libraries (as is currently done).

In the feature/unified-make support the libop2_hdf5.a and sequential HDF5 app variants are only built if a sequential HDF5 installation is available, and the same with the presence of a parallel HDF5.