Troubles with TPL HDF5 parallel
Created by: jjellio
Hello,
I am having a problem when building with HDF5. On this system, hdf5 is provided in both parallel and serial versions. /opt/cray/pe/hdf5-parallel/1.8.16 /opt/cray/pe/hdf5/1.8.16
In the parallel's lib directory, hdf5_fortran is a symbolic link to hdf5_fortran_parallel (the same for other hdf5 libs)
When I configure trilinos, it is not obvious which library names I should provide to TPL_HDF5_LIBRARIES.
If I use
-D TPL_HDF5_LIBRARIES:PATH="${HDF5_ROOT}/lib/libhdf5hl_fortran.a;${HDF5_ROOT}/lib/libhdf5_fortran.a;${HDF5_ROOT}/lib/libhdf5_hl.a;${HDF5_ROOT}/lib/libhdf5.a;/usr/lib64/libz.a" \
e.g., hdf5hl_fortran.a; hdf5_fortran.a; hdf5_hl.a; hdf5.a; libz.a
Then I have found some unit tests that want to link -lhdf5hl_fortran_parallel -lhdf5_fortran_parallel
For example, EpetraExt_View unit test
/opt/cray/pe/craype/2.5.6/bin/CC -xCORE-AVX2 -mkl=parallel -g1 -std=c++11 -qopenmp -O3 -DNDEBUG -xCORE-AVX2 -mkl=parallel CMakeFiles/EpetraExt_View.dir/cxx_main.cpp.o -o EpetraExt_View.exe ../../src/libepetraext.a ../../../triutils/src/libtriutils.a ../../../epetra/src/libepetra.a ../../../teuchos/kokkoscomm/src/libteuchoskokkoscomm.a ../../../teuchos/kokkoscompat/src/libteuchoskokkoscompat.a ../../../teuchos/remainder/src/libteuchosremainder.a ../../../teuchos/numerics/src/libteuchosnumerics.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_intel_lp64.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_intel_thread.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_core.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/lib/intel64/libiomp5.a /usr/lib64/libpthread.a /usr/lib64/libm.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_intel_lp64.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_intel_thread.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/mkl/lib/intel64/libmkl_core.a /usr/projects/hpcsoft/cle6.0/common/intel-clusterstudio/2017.1.024/compilers_and_libraries_2017/linux/lib/intel64/libiomp5.a /usr/lib64/libpthread.a /usr/lib64/libm.a ../../../teuchos/comm/src/libteuchoscomm.a ../../../teuchos/parameterlist/src/libteuchosparameterlist.a ../../../teuchos/core/src/libteuchoscore.a ../../../kokkos/core/src/libkokkoscore.a /usr/lib64/libdl.a /opt/cray/pe/hdf5-parallel/1.8.16/INTEL/15.0/lib/libhdf5hl_fortran.a /opt/cray/pe/hdf5-parallel/1.8.16/INTEL/15.0/lib/libhdf5_fortran.a /opt/cray/pe/hdf5-parallel/1.8.16/INTEL/15.0/lib/libhdf5_hl.a /opt/cray/pe/hdf5-parallel/1.8.16/INTEL/15.0/lib/libhdf5.a /usr/lib64/libz.a -lhdf5hl_fortran_parallel -lhdf5_fortran_parallel
Is there a recommended way for writing my configuration script to avoid this? One thought, is to specify BOTH the serial and parallel libnames back to back.. but that would require modifications to the script when linking serial vs parallel HDF5
-D TPL_ENABLE_Netcdf=ON \
-D Netcdf_INCLUDE_DIRS:PATH="${NETCDF_ROOT}/include" \
-D Netcdf_LIBRARY_DIRS:PATH="${NETCDF_ROOT}/lib" \
-D TPL_Netcdf_LIBRARIES:PATH="${NETCDF_ROOT}/lib/libnetcdf.a;${HDF5_ROOT}/lib/libhdf5hl_fortran.a;${HDF5_ROOT}/lib/libhdf5_fortran.a;${HDF5_ROOT}/lib/libhdf5_hl.a;${HDF5_ROOT}/lib/libhdf5.a;${PNETCDF_ROOT}/lib/libpnetcdf.a;/usr/lib64/libz.a" \
-D TPL_Netcdf_PARALLEL:BOOL=ON \
-D TPL_ENABLE_HDF5=ON \
-D HDF5_INCLUDE_DIRS:PATH="${HDF5_ROOT}/include" \
-D TPL_HDF5_LIBRARIES:PATH="${HDF5_ROOT}/lib/libhdf5hl_fortran.a;${HDF5_ROOT}/lib/libhdf5_fortran.a;${HDF5_ROOT}/lib/libhdf5_hl.a;${HDF5_ROOT}/lib/libhdf5.a;/usr/lib64/libz.a" \
@bartlettroscoe @trilinos/framework