trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.2k stars 563 forks source link

SEACAS Building issues, holding up Trilinos #4553

Closed Tdub1229 closed 5 years ago

Tdub1229 commented 5 years ago

[ 22%] Building C object packages/seacas/scripts/CMakeFiles/getopt.seacas.dir/getopt.seacas.c.o Undefined symbols for architecture x86_64: "_H5get_libversion", referenced from: _ex_print_config in libexodus.a(ex_utils.c.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [packages/seacas/applications/exo_format/exo_format] Error 1 make[1]: [packages/seacas/applications/exo_format/CMakeFiles/exo_format.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 22%] Linking C executable getopt.seacas [ 22%] Built target getopt.seacas make: [all] Error 2 --> I recently updated my Mac and operating systems (10.14) however, this has caused some difficulty trying to reinstall trilinos Packages. I get this error, and I am not sure if there are any solutions or if there is a way in which I can bypass this.

I can post my cmake and installation logs if needed.

Thanks

mhoemmen commented 5 years ago

@trilinos/seacas @gsjaardema

What version of Trilinos and what version of the HDF5 library are you using?

gsjaardema commented 5 years ago

I'm not sure what would cause this. The dependencies for exo_format correctly show that it depends on exodus and exodus depends on hdf5 which should provide the symbol.

Can you do a "cd packages/seacas/applications/exo_format; make VERBOSE=1" (from the build directory) and then we can see the libraries passed to the linker and see if it is including -lhdf5

Tdub1229 commented 5 years ago

Here is what is included when I did that. I don’t see anything for lhdf5.

Processing enabled TPL: MPI (enabled explicitly, disable with -DTPL_ENABLE_MPI=OFF) Processing enabled TPL: BLAS (enabled by TeuchosNumerics, disable with -DTPL_ENABLE_BLAS=OFF) -- BLAS_LIBRARY_NAMES='blas blas_win32' -- TPL_BLAS_LIBRARIES='/usr/lib/libblas.dylib' Processing enabled TPL: LAPACK (enabled by TeuchosNumerics, disable with -DTPL_ENABLE_LAPACK=OFF) -- LAPACK_LIBRARY_NAMES='lapack lapack_win32' -- TPL_LAPACK_LIBRARIES='/usr/lib/liblapack.dylib' Processing enabled TPL: Boost (enabled by MiniTensor, disable with -DTPL_ENABLE_Boost=OFF) -- TPL_Boost_INCLUDE_DIRS='/usr/local/include' Processing enabled TPL: Netcdf (enabled by SEACASExodus, disable with -DTPL_ENABLE_Netcdf=OFF) -- Netcdf_LIBRARY_NAMES='netcdf' -- TPL_Netcdf_LIBRARIES='/usr/local/lib/libnetcdf.dylib' -- TPL_Netcdf_INCLUDE_DIRS='/usr/local/include' Processing enabled TPL: BoostLib (enabled by STKTopology, disable with -DTPL_ENABLE_BoostLib=OFF) -- BoostLib_LIBRARY_NAMES='boost_program_options;boost_system' -- TPL_BoostLib_LIBRARIES='/usr/local/lib/libboost_program_options.dylib;/usr/local/lib/libboost_system.dylib' -- TPL_BoostLib_INCLUDE_DIRS='/usr/local/include' Processing enabled TPL: DLlib (enabled explicitly, disable with -DTPL_ENABLE_DLlib=OFF) -- Attempting to tentatively enable TPL 'DLlib' ... -- DLlib_LIBRARY_NAMES='dl' -- TPL_DLlib_LIBRARIES='/usr/lib/libdl.dylib' -- Attempt to tentatively enable TPL 'DLlib' passed!

On Mar 6, 2019, at 12:45 PM, Greg Sjaardema notifications@github.com wrote:

I'm not sure what would cause this. The dependencies for exo_format correctly show that it depends on exodus and exodus depends on hdf5 which should provide the symbol.

Can you do a "cd packages/seacas/applications/exo_format; make VERBOSE=1" and then we can see the libraries passed to the linker and see if it is including -lhdf5

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trilinos/Trilinos/issues/4553#issuecomment-470269498, or mute the thread https://github.com/notifications/unsubscribe-auth/AOYqTot7J75VSVbROYRlfb2BahlCE2Hcks5vUCjtgaJpZM4bf042.

mhoemmen commented 5 years ago

@Tdub1229 Look at the part of the CMake output that looks like this:

Final set of enabled TPLs:  MPI BLAS LAPACK DLlib 4

Final set of non-enabled TPLs:  MKL yaml-cpp Peano CUDA CUSPARSE Thrust Cusp TBB Pthread HWLOC QTHREAD BinUtils ARPREC QD Boost Scotch OVIS gpcd METIS MTMETIS ParMETIS PuLP TopoManager LibTopoMap PaToH CppUnit ADOLC ADIC TVMET MF ExodusII Nemesis XDMF Zlib HDF5 CGNS Pnetcdf Netcdf y12m SuperLUDist SuperLUMT SuperLU Cholmod UMFPACK MA28 AMD CSparse HYPRE PETSC BLACS SCALAPACK MUMPS PARDISO_MKL PARDISO Oski TAUCS ForUQTK Dakota HIPS MATLAB CASK SPARSKIT QT gtest BoostLib BoostAlbLib OpenNURBS Portals CrayPortals Gemini InfiniBand BGPDCMF BGQPAMI Pablo HPCToolkit Clp GLPK qpOASES Matio PAPI MATLABLib Eigen X11 Lemon GLM quadmath CAMAL RTlib AmgX CGAL CGALCore VTune TASMANIAN ArrayFireCPU SimMesh SimModel SimParasolid SimAcis SimField Valgrind QUO ViennaCL Avatar pebbl 104

In the "Final set of non-enabled TPLs" list, do you see "HDF5"?

gsjaardema commented 5 years ago

The output you showed is not from the make. It looks like the config. Once the config finishes, then do the steps I outlined (the make VERBOSE....) which should show the actual build instead of the config.

Tdub1229 commented 5 years ago

Mark,

Final set of enabled TPLs: MPI BLAS LAPACK Boost Netcdf BoostLib DLlib 7

Final set of non-enabled TPLs: MKL yaml-cpp Peano CUDA CUSPARSE Thrust Cusp TBB Pthread HWLOC QTHREAD BinUtils ARPREC QD Scotch OVIS gpcd METIS MTMETIS ParMETIS PuLP TopoManager LibTopoMap PaToH CppUnit ADOLC ADIC TVMET MF ExodusII Nemesis XDMF Zlib HDF5 CGNS Pnetcdf y12m SuperLUDist SuperLUMT SuperLU Cholmod UMFPACK MA28 AMD CSparse HYPRE PETSC BLACS SCALAPACK MUMPS PARDISO_MKL PARDISO Oski TAUCS ForUQTK Dakota HIPS MATLAB CASK SPARSKIT QT gtest BoostAlbLib OpenNURBS Portals CrayPortals Gemini InfiniBand BGPDCMF BGQPAMI Pablo HPCToolkit Clp GLPK qpOASES Matio PAPI MATLABLib Eigen X11 Lemon GLM quadmath CAMAL RTlib AmgX CGAL CGALCore VTune TASMANIAN ArrayFireCPU SimMesh SimModel SimParasolid SimAcis SimField Valgrind QUO ViennaCL Avatar pebbl 101

I do have the HDF5

On Mar 7, 2019, at 8:33 AM, Mark Hoemmen notifications@github.com wrote:

@Tdub1229 https://github.com/Tdub1229 Look at the part of the CMake output that looks like this:

Final set of enabled TPLs: MPI BLAS LAPACK DLlib 4

Final set of non-enabled TPLs: MKL yaml-cpp Peano CUDA CUSPARSE Thrust Cusp TBB Pthread HWLOC QTHREAD BinUtils ARPREC QD Boost Scotch OVIS gpcd METIS MTMETIS ParMETIS PuLP TopoManager LibTopoMap PaToH CppUnit ADOLC ADIC TVMET MF ExodusII Nemesis XDMF Zlib HDF5 CGNS Pnetcdf Netcdf y12m SuperLUDist SuperLUMT SuperLU Cholmod UMFPACK MA28 AMD CSparse HYPRE PETSC BLACS SCALAPACK MUMPS PARDISO_MKL PARDISO Oski TAUCS ForUQTK Dakota HIPS MATLAB CASK SPARSKIT QT gtest BoostLib BoostAlbLib OpenNURBS Portals CrayPortals Gemini InfiniBand BGPDCMF BGQPAMI Pablo HPCToolkit Clp GLPK qpOASES Matio PAPI MATLABLib Eigen X11 Lemon GLM quadmath CAMAL RTlib AmgX CGAL CGALCore VTune TASMANIAN ArrayFireCPU SimMesh SimModel SimParasolid SimAcis SimField Valgrind QUO ViennaCL Avatar pebbl 104 In the "Final set of non-enabled TPLs" list, do you see "HDF5"?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/trilinos/Trilinos/issues/4553#issuecomment-470597028, or mute the thread https://github.com/notifications/unsubscribe-auth/AOYqThxr0kd3smQGPrAcvw3paX8bQhNdks5vUT9IgaJpZM4bf042.

Tdub1229 commented 5 years ago

Greg,

I got this weird error, about mpi.h missing…

[ 4%] Building CXX object packages/pamgen/src/CMakeFiles/pamgen_extras.dir//extra_functions/pamgen_extras.cpp.o cd /Users/Tad/trilinos/build-dir/packages/pamgen/src && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/Users/Tad/trilinos/build-dir -I/Users/Tad/trilinos/build-dir/packages/pamgen/src -I/Users/Tad/trilinos/packages/pamgen/src -I/Users/Tad/trilinos/packages/pamgen/mesh_spec_lt -I/Users/Tad/trilinos/packages/pamgen/extra_functions -I/Users/Tad/trilinos/packages/pamgen/rtcompiler -I/usr/local/include -std=c++11 -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -o CMakeFiles/pamgen_extras.dir//extra_functions/pamgen_extras.cpp.o -c /Users/Tad/trilinos/packages/pamgen/extra_functions/pamgen_extras.cpp /Users/Tad/trilinos/packages/pamgen/extra_functions/pamgen_extras.cpp:10:10: fatal error: 'mpi.h' file not found

include

     ^~~~~~~

1 error generated. make[2]: [packages/pamgen/src/CMakeFiles/pamgen_extras.dir/__/extra_functions/pamgen_extras.cpp.o] Error 1 make[1]: [packages/pamgen/src/CMakeFiles/pamgen_extras.dir/all] Error 2

So this now occurs well before I get SEACAS...

On Mar 7, 2019, at 9:34 AM, Greg Sjaardema notifications@github.com wrote:

The output you showed is not from the make. It looks like the config. Once the config finishes, then do the steps I outlined (the make VERBOSE....) which should show the actual build instead of the config.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/trilinos/Trilinos/issues/4553#issuecomment-470620987, or mute the thread https://github.com/notifications/unsubscribe-auth/AOYqTiVW2EbzSsQSlowOKBL995bWBcWpks5vUU2JgaJpZM4bf042.

mhoemmen commented 5 years ago

I do have the HDF5

Trilinos disagrees ;-) Did you set any CMake options to enable HDF5?

Tdub1229 commented 5 years ago

No, I didn’t… Do I need to put -DPTL_ENABLE_HDF5=?

On Mar 7, 2019, at 1:16 PM, Mark Hoemmen notifications@github.com wrote:

I do have the HDF5

Trilinos disagrees ;-) Did you set any CMake options to enable HDF5?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/trilinos/Trilinos/issues/4553#issuecomment-470697389, or mute the thread https://github.com/notifications/unsubscribe-auth/AOYqTmeBPQ-L3B9gdYrTp1XvapYdCma6ks5vUYGZgaJpZM4bf042.

gsjaardema commented 5 years ago

Even though MPI is enabled, it looks like the compiler it is using is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ which is not a mpi-aware compiler. Should be something like mpicxx

For HDF5, you probably need something like:

-D HDF5_ROOT:PATH=${TPL} \
-D HDF5_NO_SYSTEM_PATHS=ON \

Where ${TPL} is the path to a directory such that ${TPL}/include has the hdf5 include files and ${TPL}/lib has the HDF5 libraries. It should fail the configure if it cannot find hdf5, so not sure why it isn't

gsjaardema commented 5 years ago

The netcdf that it finds is the default netcdf on your system /usr/local/lib/libnetcdf.dylib. This dynamic library should automatically pull in the libraries that it depends on which should/might include libhdf5_hl.dylib and libhdf5.dylib. The H5get_libversion is only called if the netcdf library depends on HDF5 and this is determined via the symbol NC_HAS_HDF5 which is in the include file netcdf_meta.h which should be in /usr/local/include based on your config output above.

gsjaardema commented 5 years ago

You might try grep -i hdf5 CMakeCache.txt and see what shows up. You should get about 40-50 lines of output...

gsjaardema commented 5 years ago

Have not had any feedback since March 7; assuming it is fixed; if not please reopen.

sivanadarajah commented 4 years ago

Good Afternoon, I have the exact same issue and was wondering as that described in the first comment in this thread. I am using macOS 10.15.5 and Xcode 11.5. Doing grep -i hdf5 CMakeCache.txt only gives me the following message.

//Enable EpetraExt interface support for HDF5. This interface requires // an already installed HDF5 library\; the include, the library EpetraExt_USING_HDF5:BOOL=OFF //Enable support for the TPL HDF5 in all supported Trilinos packages. TPL_ENABLE_HDF5:STRING= HAVE_EPETRAEXT_HDF5:INTERNAL=OFF //STRINGS property for variable: TPL_ENABLE_HDF5 TPL_ENABLE_HDF5-STRINGS:INTERNAL=;ON;OFF

Thank you for the help.

Regards, Siva