Hi,
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 \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
-DBUILD_STATIC_EXECS:BOOL=OFF \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
../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 \
-DCMAKE_INSTALL_PREFIX=${INSTALLDIR} \
-DOP2_WITH_PARMETIS=ON \
-DPARMETIS_DIR=${INSTALLDIR} \
-DPARMETIS_TEST_RUNS=1 \
-DOP2_WITH_PTSCOTCH=OFF \
-DCUDA_NVCC_FLAGS='-arch=sm_60;-Xptxas;-dlcm=ca;-Xptxas=-v' \
-DINSTALLATION_APPS_DIR='' \
.. && 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/16.1.0.0-180411/xlC/16.1.0/bin/xlc++_r -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/airfoil_sp_mpi_cuda_generated_airfoil_kernels.cu.o -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/libop2_mpi_cuda.so /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/libparmetis.so /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 many places, yet I do not seem to have so files like this. There’s something I do not understand here at a pretty fundamental level.
Please advise,
Robert