cmake parallel HDF5 config scripts references hdf::hdf-shared



Apologies if this is not the right place to post that question. I am trying to build OP2 library with HDF5 support on PPC64le system. I am trying with gcc-openmpi and xl-spectrum_mpi but I am encountering identical problems which is that application do not link against hdf5. I am insisting on using cmake for these builds due to my largely religious belief in reproducibility and unwaivering trust in modularity and creating long term fixes, sorry!

I use Lmod to switch between variants and cmake version is 3.12.

This is how I compile parallel HDF5

cmake \
    ../hdf5-${VERSION} && make -j20 && make install

HDF5 compilation goes smoothly, but I am not sure if the choice of static_execs=OFF is necessary.

OP2 cmake config may be a bit outdated, but I would try to help them fix it, if at all possible. The library needs to be compiled and then the application have to be linked against that library. I don’t think there’s anything unusual in my cmake invocation. I request

cmake \
    -DCUDA_NVCC_FLAGS='-arch=sm_60;-Xptxas;-dlcm=ca;-Xptxas=-v' \
    .. && make -j10 && make install

And everything goes fine. Side note, I am cheating on PARMETIS_TEST_RUNS. I never got cmake to detect it properly.

At this stage my superficial knowledge of cmake makes is difficult to understand what’s happening. I noticed that in ${INSTALL_DIR}/shared/cmake there’s something like a configuration file. This gets picked up when I compile the applications and I get the following error:

Linking CXX executable airfoil_sp_mpi_cuda
cd /home/rrs59-sxa03/build/op2/apps/c/build-dev/airfoil/airfoil_plain && /home/shared/apps/core/cmake/3.12.0/bin/cmake -E cmake_link_script CMakeFiles/airfoil_sp_mpi_cuda.dir/link.txt --verbose=2
/shared/opt/xlC/  -qthreaded -qthreaded -O2 -g -Wall  -Wno-long-long  -Wl,-rpath=/opt/ibm/spectrum_mpi/lib -Wl,-export-dynamic CMakeFiles/airfoil_sp_mpi_cuda.dir/sp/airfoil_mpi_op.cpp.o CMakeFiles/airfoil_sp_mpi_cuda.dir/sp/cuda/  -o airfoil_sp_mpi_cuda -Wl,-rpath,/home/shared/apps/mpi/xl/16.1/spectrum_mpi/10.2/op2/dev/lib: -lcudart /home/shared/apps/mpi/xl/16.1/spectrum_mpi/10.2/op2/dev/lib/ /usr/local/cuda/lib64/libcudart_static.a -ldl -lrt -lhdf5::hdf5-shared -lmpiprofilesupport -lmpi_ibm /home/shared/apps/mpi/xl/16.1/spectrum_mpi/10.2/op2/dev/lib/ /home/shared/apps/mpi/xl/16.1/spectrum_mpi/10.2/op2/dev/lib/libmetis.a 
/usr/bin/ld: cannot find -lhdf5::hdf5-shared
make[2]: *** [airfoil/airfoil_plain/airfoil_sp_mpi_cuda] Error 1

I do not understand what -lhdf5::hdf5-shared is, but I noticed that references to *-static and *-shared files appear in may places, yet I do not seem to have so files like this. There’s something I do understand here at a pretty fundamental level.

Please advise,