seacas
seacas copied to clipboard
Building Exodus on Ubuntu 22.04
I'm trying to build Exodus on Ubuntu 22.04. I've installed the Netcdf library with: sudo apt install libnetcdf-dev which installs the NetCFD library
/usr/include/netcdf.h
/usr/lib/x86_64-linux-gnu/libnetcdf.so
This also bring in the libhd5-dev, where the Ubuntu developers have chosen the following library naming convention:
Include files: /usr/include/hdf5/
Libraries: ls /usr/lib/x86_64-linux-gnu/libhdf5_*
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.103 /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.a /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl_cpp.so.100 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.100 /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl_cpp.so.100.1.5 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.1.4
/usr/lib/x86_64-linux-gnu/libhdf5_serial.a /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.102 /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.a /usr/lib/x86_64-linux-gnu/libhdf5_serial.settings
/usr/lib/x86_64-linux-gnu/libhdf5_serial_cpp.a /usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.102.1.0 /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so /usr/lib/x86_64-linux-gnu/libhdf5_serial.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_cpp.so /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.a /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.100 /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103
/usr/lib/x86_64-linux-gnu/libhdf5_serial_cpp.so.103 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl_cpp.a /usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.100.0.6 /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.3.0
/usr/lib/x86_64-linux-gnu/libhdf5_serial_cpp.so.103.3.0 /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl_cpp.so /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
I have exported what I believe are the necessary environment variables:
export NETCDF_PATH=/usr/
export HDF5_PATH=/usr/
If I create a build directory and run the cmake-exodus script I get the following output with no Makefile generated
sandialabs/seacas/build$ ../cmake-exodus
MPI set to NO
Configuring Seacas build directory
-- PROJECT_SOURCE_DIR='/home/foo/sandialabs/seacas'
-- PROJECT_BINARY_DIR='/home/foo/sandialabs/seacas/build'
-- Seacas_TRIBITS_DIR='/home/foo/sandialabs/seacas/cmake/tribits'
-- TriBITS_VERSION_STRING='0.9 (Dev)'
-- CMAKE_VERSION='3.22.1'
-- CMAKE_GENERATOR='Unix Makefiles'
-- CMAKE_HOST_SYSTEM_NAME='Linux'
-- Seacas_HOSTNAME='reynolds'
-- Found PythonInterp: /usr/bin/python (found suitable version "3.10.6", minimum required is "2.6")
-- PYTHON_EXECUTABLE='/usr/bin/python'
-- Found Git: /usr/bin/git (found version "2.34.1")
Setting up major user options ...
-- Setting Seacas_ENABLE_EXAMPLES=ON because Seacas_ENABLE_TESTS=ON
-- Seacas_GENERATE_REPO_VERSION_FILE='ON'
Seacas repos versions:
--------------------------------------------------------------------------------
*** Base Git Repo: Seacas
cc68368f1f [Thu Oct 27 11:31:20 2022 -0600] <[email protected]>
Revert "CONFIG: Clean up scripts"
--------------------------------------------------------------------------------
Reading list of native TPLs from /home/foo/sandialabs/seacas/TPLsList.cmake
-- After reading above TPLsList.cmake file: Seacas_NUM_DEFINED_TPLS='22'
Reading list of native packages from /home/foo/sandialabs/seacas/PackagesList.cmake
-- After reading above PackagesList.cmake file: Seacas_NUM_DEFINED_INTERNAL_TOPLEVEL_PACKAGES='2'
Processing Project, Repository, and Package dependency files and building internal dependencies graph ...
-- Seacas_NUM_DEFINED_INTERNAL_PACKAGES='47'
-- Tentatively enabling TPL 'DLlib'
Package dependencies information:
-- Seacas_NUM_DEFINED_TPLS='22'
-- Seacas_NUM_DEFINED_INTERNAL_TOPLEVEL_PACKAGES='2'
-- Seacas_NUM_DEFINED_TOPLEVEL_PACKAGES='24'
-- Seacas_NUM_DEFINED_INTERNAL_PACKAGES='47'
-- Seacas_NUM_DEFINED_PACKAGES='69'
Explicitly enabled top-level packages on input (by user): 0
Explicitly enabled packages on input (by user): SEACASExodus SEACASExodus_for SEACASExoIIv2for32 3
Explicitly disabled top-level packages on input (by user or by default): 0
Explicitly disabled packages on input (by user or by default): SEACASExotec2 1
Explicitly enabled external packages/TPLs on input (by user): Netcdf DLlib 2
Explicitly disabled external packages/TPLs on input (by user or by default): Pthread MPI 2
Disabling all packages that have a required dependency on disabled TPLs and optional package TPL support based on TPL_ENABLE_<TPL>=OFF ...
Disabling subpackages for hard disables of parent packages due to Seacas_ENABLE_<PARENT_PACKAGE>=OFF ...
Disabling forward required packages and optional intra-package support that have a dependency on disabled packages Seacas_ENABLE_<TRIBITS_PACKAGE>=OFF ...
Enabling subpackages for hard enables of parent packages due to Seacas_ENABLE_<PARENT_PACKAGE>=ON ...
Disabling subpackage tests/examples based on parent package tests/examples disables ...
Enabling all tests and/or examples that have not been explicitly disabled because Seacas_ENABLE_[TESTS,EXAMPLES]=ON ...
-- Setting SEACASExodus_ENABLE_TESTS=ON
-- Setting SEACASExodus_ENABLE_EXAMPLES=ON
-- Setting SEACASExodus_for_ENABLE_TESTS=ON
-- Setting SEACASExodus_for_ENABLE_EXAMPLES=ON
-- Setting SEACASExoIIv2for32_ENABLE_TESTS=ON
-- Setting SEACASExoIIv2for32_ENABLE_EXAMPLES=ON
Enabling subpackage tests/examples based on parent package tests/examples enables ...
Enabling all required (and optional since Seacas_ENABLE_ALL_OPTIONAL_PACKAGES=ON) upstream packages for current set of enabled packages (Seacas_ENABLE_SECONDARY_TESTED_CODE=OFF) ...
Enabling all optional intra-package enables <TRIBITS_PACKAGE>_ENABLE_<DEPPACKAGE> that are not currently disabled if both sets of packages are enabled ...
Enabling all remaining required TPLs for current set of enabled packages ...
Enabling all optional package TPL support <TRIBITS_PACKAGE>_ENABLE_<DEPTPL> not currently disabled for enabled TPLs ...
Enabling TPLs based on <TRIBITS_PACKAGE>_ENABLE_<TPL>=ON if TPL is not explicitly disabled ...
Set cache entries for optional packages/TPLs and tests/examples for packages actually enabled ...
Enabling the shell of non-enabled parent packages (mostly for show) that have at least one subpackage enabled ...
-- Setting Seacas_ENABLE_SEACAS=ON because Seacas_ENABLE_SEACASExodus=ON
-- Setting SEACAS_ENABLE_SEACASExodus=ON because Seacas_ENABLE_SEACASExodus=ON
-- Setting SEACAS_ENABLE_SEACASExodus_for=ON because Seacas_ENABLE_SEACASExodus_for=ON
-- Setting SEACAS_ENABLE_SEACASExoIIv2for32=ON because Seacas_ENABLE_SEACASExoIIv2for32=ON
-- Setting SEACAS_ENABLE_TESTS=ON because SEACASExodus_ENABLE_TESTS=ON
-- Setting SEACAS_ENABLE_EXAMPLES=ON because SEACASExodus_ENABLE_EXAMPLES=ON
Final set of enabled top-level packages: SEACAS 1
Final set of enabled packages: SEACASExodus SEACASExodus_for SEACASExoIIv2for32 SEACAS 4
Final set of non-enabled top-level packages: Zoltan 1
Final set of non-enabled packages: Zoltan SEACASNemesis SEACASIoss SEACASChaco SEACASAprepro_lib SEACASSupes SEACASSuplib SEACASSuplibC SEACASSuplibCpp SEACASSVDI SEACASPLT SEACASAlgebra SEACASAprepro SEACASBlot SEACASConjoin SEACASEjoin SEACASEpu SEACASCpup SEACASExo2mat SEACASExodiff SEACASExomatlab SEACASExotxt SEACASExo_format SEACASEx1ex2v2 SEACASExotec2 SEACASFastq SEACASGjoin SEACASGen3D SEACASGenshell SEACASGrepos SEACASExplore SEACASMapvarlib SEACASMapvar SEACASMapvar-kd SEACASMat2exo SEACASNas2exo SEACASZellij SEACASNemslice SEACASNemspread SEACASNumbers SEACASSlice SEACASTxtexo SEACASEx2ex1v2 43
Final set of enabled external packages/TPLs: Netcdf DLlib 2
Final set of non-enabled external packages/TPLs: GTest Zlib Pthread MPI HDF5 Pnetcdf CGNS DataWarp METIS ParMETIS Pamgen Matio X11 CUDA fmt Kokkos Faodel Cereal ADIOS2 Catalyst2 20
Setting up export dependencies for all enabled packages ...
Probing the environment ...
-- USE_XSDK_DEFAULTS='FALSE'
-- BUILD_SHARED_LIBS='YES'
-- CMAKE_BUILD_TYPE='RELEASE'
-- The C compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_C_COMPILER_ID='GNU'
-- CMAKE_C_COMPILER_VERSION='11.3.0'
-- The CXX compiler identification is GNU 11.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CXX_COMPILER_ID='GNU'
-- CMAKE_CXX_COMPILER_VERSION='11.3.0'
-- The Fortran compiler identification is GNU 11.3.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Seacas_SET_INSTALL_RPATH='TRUE'
-- CMAKE_INSTALL_RPATH_USE_LINK_PATH='TRUE'
-- CMAKE_INSTALL_RPATH='/home/foo/sandialabs/seacas/lib'
-- Looking for C++ include sys/time.h
-- Looking for C++ include sys/time.h - found
-- Looking for C++ include time.h
-- Looking for C++ include time.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include inttypes.h
-- Looking for C++ include inttypes.h - found
-- Found Perl: /usr/bin/perl (found version "5.34.0")
-- Fortran name mangling: LOWER UNDER
-- Performing Test MATH_LIBRARY_IS_SUPPLIED
-- Performing Test MATH_LIBRARY_IS_SUPPLIED - Success
-- Performing Test FINITE_VALUE_HAVE_GLOBAL_ISNAN
-- Performing Test FINITE_VALUE_HAVE_GLOBAL_ISNAN - Failed
-- Performing Test FINITE_VALUE_HAVE_STD_ISNAN
-- Performing Test FINITE_VALUE_HAVE_STD_ISNAN - Success
-- Performing Test FINITE_VALUE_HAVE_GLOBAL_ISINF
-- Performing Test FINITE_VALUE_HAVE_GLOBAL_ISINF - Failed
-- Performing Test FINITE_VALUE_HAVE_STD_ISINF
-- Performing Test FINITE_VALUE_HAVE_STD_ISINF - Success
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Getting information for all enabled external packages/TPLs ...
Processing enabled external package/TPL: Netcdf (enabled explicitly, disable with -DTPL_ENABLE_Netcdf=OFF)
-- Using find_package(Netcdf ...) ...
CMake Error at cmake/tribits/common_tpls/find_modules/FindNetCDF.cmake:228 (message):
Can not locate NetCDF C library
Call Stack (most recent call first):
cmake/tribits/common_tpls/FindTPLNetcdf.cmake:94 (find_package)
cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:100 (include)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1445 (tribits_process_enabled_tpl)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- NetCDF_ROOT is /usr
-- netCDF_CONFIG is /usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFConfig.cmake
-- NetCDF requires HDF5
-- NetCDF depends on HDF5
-- Updating NetCDF_LIBRARIES and NetCDF_INCLUDE_DIRS
-- HDF5 Version: Unknown
-- HDF5_INCLUDE_DIRS =/usr/include/hdf5/serial
-- HDF5_LIBRARY_TARGETS =hdf5
-- HDF5_LIBRARIES =/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
-- HDF5_LIBRARIES_EXPORT =/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
-- HDF5_LINK_LIBRARIES =
-- HDF5_IS_PARALLEL =
-- Found the following HDF5 component libraries
-- hdf5
-- HDF5 Components not found: HL
-- HDF5_TOOLS_FOUND:
-- Found HDF5: /usr/include/hdf5/serial
PARSE_LIBRARY_LIST <lib_list>
FOUND <out_flag>
DEBUG <out_debug_list>
OPT <out_opt_list>
GENERAL <out_gen_list>
lib_list string to parse
FOUND flag to indicate if keywords were found
DEBUG variable containing debug libraries
OPT variable containing optimized libraries
GENERAL variable containing debug libraries
CMake Error at cmake/tribits/common_tpls/utils/ParseLibraryList.cmake:78 (message):
Invalid arguments
Call Stack (most recent call first):
cmake/tribits/common_tpls/utils/AddPackageDependency.cmake:100 (parse_library_list)
cmake/tribits/common_tpls/find_modules/FindNetCDF.cmake:325 (add_package_dependency)
cmake/tribits/common_tpls/FindTPLNetcdf.cmake:94 (find_package)
cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:100 (include)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1445 (tribits_process_enabled_tpl)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- Configuring incomplete, errors occurred!
See also "/home/foo/sandialabs/seacas/build/CMakeFiles/CMakeOutput.log".
See also "/home/foo/sandialabs/seacas/build/CMakeFiles/CMakeError.log".
OS: Linux
ACCESS: /home/foo/sandialabs/seacas
INSTALL_PATH: /home/foo/sandialabs/seacas
CC: gcc
CXX: g++
FC: gfortran
MPI: NO
SHARED: YES
BUILD_TYPE: RELEASE
THREADSAFE: NO
OMIT_DEPRECATED_CODE:
CRAY: NO
HAVE_NETCDF: YES
From what I can tell there are issues finding both NetCFD and HDF5. Any help getting this resolved would be greatly appreciated.
Yes, I will have to look into what is happening here. We typically don't use that naming scheme, but the CMake library finding code should know about the naming scheme and should do the right thing. Obviously it isn't, so I need to figure out what part is going bad.
See if my recent commit fixes the issue.
Looks like it found more, but still didn't succeed
Getting information for all enabled external packages/TPLs ...
Processing enabled external package/TPL: Netcdf (enabled explicitly, disable with -DTPL_ENABLE_Netcdf=OFF)
-- Using find_package(Netcdf ...) ...
CMake Error at cmake/tribits/common_tpls/find_modules/FindNetCDF.cmake:228 (message):
Can not locate NetCDF C library
Call Stack (most recent call first):
cmake/tribits/common_tpls/FindTPLNetcdf.cmake:94 (find_package)
cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:100 (include)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1445 (tribits_process_enabled_tpl)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- NetCDF_ROOT is /usr
-- netCDF_CONFIG is /usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFConfig.cmake
-- NetCDF requires HDF5
-- NetCDF depends on HDF5
-- Updating NetCDF_LIBRARIES and NetCDF_INCLUDE_DIRS
-- HDF5 Version: Unknown
-- HDF5_INCLUDE_DIRS =/usr/include/hdf5/serial
-- HDF5_LIBRARY_TARGETS =hdf5_hl;hdf5
-- HDF5_LIBRARIES =/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so;/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
-- HDF5_LIBRARIES_EXPORT =/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so;/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
-- HDF5_LINK_LIBRARIES =
-- HDF5_IS_PARALLEL =
-- Found the following HDF5 component libraries
-- hdf5_hl
-- hdf5
-- HDF5_TOOLS_FOUND:
-- Found HDF5: /usr/include/hdf5/serial
PARSE_LIBRARY_LIST <lib_list>
FOUND <out_flag>
DEBUG <out_debug_list>
OPT <out_opt_list>
GENERAL <out_gen_list>
lib_list string to parse
FOUND flag to indicate if keywords were found
DEBUG variable containing debug libraries
OPT variable containing optimized libraries
GENERAL variable containing debug libraries
CMake Error at cmake/tribits/common_tpls/utils/ParseLibraryList.cmake:78 (message):
Invalid arguments
Call Stack (most recent call first):
cmake/tribits/common_tpls/utils/AddPackageDependency.cmake:100 (parse_library_list)
cmake/tribits/common_tpls/find_modules/FindNetCDF.cmake:325 (add_package_dependency)
cmake/tribits/common_tpls/FindTPLNetcdf.cmake:94 (find_package)
cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:100 (include)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1445 (tribits_process_enabled_tpl)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- Configuring incomplete, errors occurred!
See also "/home/jenkins/util/sandialabs/seacas/build/CMakeFiles/CMakeOutput.log".
See also "/home/jenkins/util/sandialabs/seacas/build/CMakeFiles/CMakeError.log".
@bartlettroscoe Do you have any ideas on how to triage this issue?
We could try using a verbose configure or debug. See https://stackoverflow.com/questions/38864489/how-to-trace-cmakelists-txt
@bartlettroscoe Do you have any ideas on how to triage this issue?
You might try adding the CMake option --debug-find
.
And there is also the CMAKE_FIND_DEBUG_MODE
var that you can set around the call like:
set(CMAKE_FIND_DEBUG_MODE TRUE)
find_program(...)
set(CMAKE_FIND_DEBUG_MODE FALSE)
To see everything, you might try --debug-output --trace --debug-find
. That will be a huge amount of output. But just pipe to that to a file and grep through it.
Would you like me to do this or do either of you have access to Ubuntu 22.04?
Would be helpful if you could do it. I no longer have an Ubuntu system.
Ok I ran with --debug-find and this might be helpful
CMake Debug Log at cmake/tribits/common_tpls/find_modules/FindNetCDF.cmake:193 (find_library):
find_library called with the following settings:
VAR: NetCDF_C_LIBRARY
NAMES: "netcdf"
Documentation: Path to a library.
Framework
Only Search Frameworks: 0
Search Frameworks Last: 0
Search Frameworks First: 0
AppBundle
Only Search AppBundle: 0
Search AppBundle Last: 0
Search AppBundle First: 0
NO_DEFAULT_PATH Enabled
find_library considered the following locations:
/usr/lib/(lib)netcdf(\.so|\.a)
/usr/Lib/(lib)netcdf(\.so|\.a)
/usr/(lib)netcdf(\.so|\.a)
The item was not found.
The netcdf file is actually located at
/usr/lib/x86_64-linux-gnu/libnetcdf.so
I have set
export NETCDF_PATH=/usr
For some reason the default search paths are disabled for NetCDF, and I don't know how to turn them on...
If that does not work, you can try setting -DNetCDF_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu
inside the cmake lines inside cmake-exodus
. You may also need a -DNetCDF_INCLUDE_DIR=...path_to_include_if_not_found
Setting -DNetCDF_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu
did the trick. So since this is not completely automatic now where will this fix be documented?
So since this is not completely automatic now where will this fix be documented?
@galbramc, hopefully this will all be resolved once everyone can use upgraded HDF5 and NetCDF installs that provide package config files in the new code:
https://github.com/sandialabs/seacas/blob/a9634da294d7d4bc64145fa33969de6be10d31b6/cmake/tribits/common_tpls/FindTPLHDF5.cmake#L7-L26
https://github.com/sandialabs/seacas/blob/a9634da294d7d4bc64145fa33969de6be10d31b6/cmake/tribits/common_tpls/FindTPLNetcdf.cmake#L46-L62
and we can discard the custom find package modules under
Setting
-DNetCDF_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu
did the trick. So since this is not completely automatic now where will this fix be documented?
What area(s) did you search when you were looking for a solution to the original problem?
I think I went straight to the issues when I had this problem.
That said, Ubuntu 22.04 installs NetCFD 4.8.1 and HDF5 1.10.7. So I guess HDF5 isn't new enough?
That said, Ubuntu 22.04 installs NetCFD 4.8.1 and HDF5 1.10.7. So I guess HDF5 isn't new enough?
@galbramc, as you can see at:
https://github.com/sandialabs/seacas/blob/a9634da294d7d4bc64145fa33969de6be10d31b6/cmake/tribits/common_tpls/FindTPLHDF5.cmake#L9
the modern CMake package config files are not assumed to be supported until HDF5 version 1.13.2 (if you were wanting to use the newer CMake package config files).
However, @ibaned indicated that he only put that version requirement since that was the only version he had available. I have tested with a 1.10.9 and it works and I have updated the version in my local SEACAS repository.
However, @ibaned indicated that he only put that version requirement since that was the only version he had available. I have tested with a 1.10.9 and it works and I have updated the version in my local SEACAS repository.
@gsjaardema, I created PR https://github.com/TriBITSPub/TriBITS/pull/540 for this change.
I guess I don't know how TriBITSPub is connected with the seacas repositry, but If I look in seacas/cmake/tribits/common_tpls/FindTPLHDF5.cmake
I see
set(minimum_modern_HDF5_version 1.10.2)
which is lower than the 1.10.7 version on Ubuntu 22.04, but the new cmake finding process does not seem to be kicking in.
Did you set the CMake variables: -D TPL_ENABLE_HDF5:BOOL=ON -D Netcdf_ALLOW_MODERN:BOOL=ON
I'm using the cmake-exodus
script provided with the build instructions. Looks like neither of those are set in that script.
Sorry, Yes, I need to update the cmake-exodus
script. I probably should eliminate that script and just add an EXODUS_ONLY
option to the cmake-config
script eventually...
Can you update your seacas repository and try the cmake-exodus
script again. Something like:
MODERN=YES ../cmake-exodus
I pulled on the master branch and didn't get any updated files... Should I use a different branch?
Sorry, I got interuppted and had to take my wife to airport and didn't push. Try now.
Sorry, that didn't work for some reason. Here is the output
sandialabs/seacas/build$ MODERN=YES ../cmake-exodus
../cmake-exodus: line 47: /home/jenkins/util/sandialabs/seacas/bin/nc-config: No such file or directory
MPI set to NO
Configuring Seacas build directory
-- PROJECT_SOURCE_DIR='/home/jenkins/util/sandialabs/seacas'
-- PROJECT_BINARY_DIR='/home/jenkins/util/sandialabs/seacas/build'
-- Seacas_TRIBITS_DIR='/home/jenkins/util/sandialabs/seacas/cmake/tribits'
-- TriBITS_VERSION_STRING='0.9 (Dev)'
-- CMAKE_VERSION='3.22.1'
-- CMAKE_GENERATOR='Unix Makefiles'
-- CMAKE_HOST_SYSTEM_NAME='Linux'
-- Seacas_HOSTNAME='reynolds'
-- Found PythonInterp: /usr/bin/python (found suitable version "3.10.6", minimum required is "2.6")
-- PYTHON_EXECUTABLE='/usr/bin/python'
-- Found Git: /usr/bin/git (found version "2.34.1")
Setting up major user options ...
-- Setting Seacas_ENABLE_EXAMPLES=ON because Seacas_ENABLE_TESTS=ON
-- Seacas_GENERATE_REPO_VERSION_FILE='ON'
Seacas repos versions:
--------------------------------------------------------------------------------
*** Base Git Repo: Seacas
5fcfc90f4e [Mon Nov 7 12:47:15 2022 -0700] <[email protected]>
IOSS: improve compare output
--------------------------------------------------------------------------------
Reading list of native TPLs from /home/jenkins/util/sandialabs/seacas/TPLsList.cmake
-- After reading above TPLsList.cmake file: Seacas_NUM_DEFINED_TPLS='22'
Reading list of native packages from /home/jenkins/util/sandialabs/seacas/PackagesList.cmake
-- After reading above PackagesList.cmake file: Seacas_NUM_DEFINED_INTERNAL_TOPLEVEL_PACKAGES='2'
Processing Project, Repository, and Package dependency files and building internal dependencies graph ...
-- Seacas_NUM_DEFINED_INTERNAL_PACKAGES='47'
-- Tentatively enabling TPL 'DLlib'
Package dependencies information:
-- Seacas_NUM_DEFINED_TPLS='22'
-- Seacas_NUM_DEFINED_INTERNAL_TOPLEVEL_PACKAGES='2'
-- Seacas_NUM_DEFINED_TOPLEVEL_PACKAGES='24'
-- Seacas_NUM_DEFINED_INTERNAL_PACKAGES='47'
-- Seacas_NUM_DEFINED_PACKAGES='69'
Explicitly enabled top-level packages on input (by user): 0
Explicitly enabled packages on input (by user): SEACASExodus SEACASExodus_for SEACASExoIIv2for32 3
Explicitly disabled top-level packages on input (by user or by default): 0
Explicitly disabled packages on input (by user or by default): SEACASExotec2 1
Explicitly enabled external packages/TPLs on input (by user): HDF5 DLlib 2
Explicitly disabled external packages/TPLs on input (by user or by default): Pthread MPI Netcdf 3
Disabling all packages that have a required dependency on disabled TPLs and optional package TPL support based on TPL_ENABLE_<TPL>=OFF ...
CMake Error at cmake/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake:87 (message):
***
*** ERROR: Setting Seacas_ENABLE_SEACASExodus=OFF which was 'YES' because SEACASExodus has a required library dependence on disabled TPL Netcdf!
***
Call Stack (most recent call first):
cmake/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake:123 (tribits_private_print_disable)
cmake/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake:268 (tribits_private_disable_tpl_required_package_enable)
cmake/tribits/core/package_arch/TribitsAdjustPackageEnables.cmake:1373 (tribits_disable_package_if_tpl_disabled)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1387 (tribits_adjust_package_enables)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:162 (tribits_adjust_and_print_package_dependencies)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- Configuring incomplete, errors occurred!
See also "/home/jenkins/util/sandialabs/seacas/build/CMakeFiles/CMakeOutput.log".
OS: Linux
ACCESS: /home/jenkins/util/sandialabs/seacas
INSTALL_PATH: /home/jenkins/util/sandialabs/seacas
CC: gcc
CXX: g++
FC: gfortran
MPI: NO
SHARED: YES
BUILD_TYPE: RELEASE
THREADSAFE: NO
OMIT_DEPRECATED_CODE:
CRAY: NO
HAVE_NETCDF: NO
Should I still be setting NETCDF_PATH=/usr?
Yes, it looks like I am still relying on NETCDF_PATH
being set if MPI
is not set so that I can determine whether it is a parallel build.
So, it looks like currenlty you need to specify either NETCDF_PATH
or MPI
. If the netCDF is built via the install-tpl.sh script, then NETCDF_PATH
is set automatically, but since you are using a pre-installed netCDF, the cmake-exodus
script is not able to find netCDF...
I will see if there is a better way for the script to do this, but for now, either explicitly set MPI
and/or NETCDF_PATH
Setting NETCDF_PATH`` and using
MODERN=YES ../cmake-exodus``` got me this:
Processing enabled external package/TPL: HDF5 (enabled explicitly, disable with -DTPL_ENABLE_HDF5=OFF)
-- Netcdf_ALLOW_MODERN='ON'
-- Using find_package(HDF5 1.10.2 CONFIG) ...
-- Could NOT find HDF5 (missing: HDF5_DIR)
-- Using find_package(HDF5 ...) ...
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C) (found version "")
-- HDF5_LIBRARY_NAMES='hdf5;hdf5_hl'
-- Searching for libs in HDF5_LIBRARY_DIRS=''
-- Searching for a lib in the set "hdf5":
-- Searching for lib 'hdf5' ...
-- NOTE: Did not find a lib in the lib set "hdf5" for the TPL 'HDF5'!
-- ERROR: Could not find the libraries for the TPL 'HDF5'!
-- TIP: If the TPL 'HDF5' is on your system then you can set:
-DHDF5_LIBRARY_DIRS='<dir0>;<dir1>;...'
to point to the directories where these libraries may be found.
Or, just set:
-DTPL_HDF5_LIBRARIES='<path-to-libs0>;<path-to-libs1>;...'
to point to the full paths for the libraries which will
bypass any search for libraries and these libraries will be used without
question in the build. (But this will result in a build-time error
if not all of the necessary symbols are found.)
-- ERROR: Failed finding all of the parts of TPL 'HDF5' (see above), Aborting!
-- NOTE: The find module file for this failed TPL 'HDF5' is:
/home/jenkins/util/sandialabs/seacas/cmake/tribits/common_tpls/FindTPLHDF5.cmake
which is pointed to in the file:
/home/jenkins/util/sandialabs/seacas/TPLsList.cmake
TIP: Even though the TPL 'HDF5' was explicitly enabled in input,
it can be disabled with:
-DTPL_ENABLE_HDF5=OFF
which will disable it and will recursively disable all of the
downstream packages that have required dependencies on it.
When you reconfigure, just grep the cmake stdout for 'HDF5'
and then follow the disables that occur as a result to see what impact
this TPL disable has on the configuration of Seacas.
CMake Error at cmake/tribits/core/package_arch/TribitsProcessEnabledTpl.cmake:148 (message):
ERROR: TPL_HDF5_NOT_FOUND=TRUE, aborting!
Call Stack (most recent call first):
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1445 (tribits_process_enabled_tpl)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:197 (tribits_process_enabled_tpls)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:46 (TRIBITS_PROJECT)
-- Configuring incomplete, errors occurred!
See also "/home/jenkins/util/sandialabs/seacas/build/CMakeFiles/CMakeOutput.log".
See also "/home/jenkins/util/sandialabs/seacas/build/CMakeFiles/CMakeError.log".
Should I check to make sure there is a particular cmake file for HDF5 in the system? I don't know exactly what the "modern" HDF5 cmake setup is looking for.
To the best of my (limited) knowledge...
- It should be sufficient to just specify
NETCDF_PATH
and- then CMake will be able to locate the netcdf cmake configuation files
- those files should tell CMake that HDF5 is a dependency of netCDF
- those files should tell CMake where to look for the HDF5 cmake configuration files.
But, this isn't necessarily correct in all/any versions of netCDF at this time, so:
- a workaround was added to TriBITs (CMake wrapper used by Trilinos and SEACAS) to add some of the needed dependency information
- This workaround requires that HDF5 be configured prior to netCDF
- therefore, we need the
HDF5_PATH
set such that CMake can find the HDF5 CMake configuration files on its own... - then, when netCDF is configured later, it knows the HDF5 information already...
- therefore, we need the
This is for the MODERN
usage. So, I think that both HDF5_PATH
and NETCDF_PATH
need to be defined.
I (almost) always do a build of TPLs and SEACAS directly, so my paths are deduced by the cmake-config
and cmake-exodus
scripts. I will try some builds where the TPLs are not installed in the same lib
directory as seacas libs so it is easier to catch these types of issues...
Thanks for the clarification. I'm far to aware of all the difficulties when dealing with dependencies. Thanks for all the effort.