Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #156

Closed
Open
Created Feb 26, 2016 by James Willenbring@jmwilleOwner

Netcdf and HDF5 ordering

Created by: ambrad

configure.txt I'm creating an issue to track the problem of netcdf and hdf5 lib ordering.

For the record, let's remember that order matters only for .a libs. If we have at least libnetcdf.so, then order doesn't matter.

In what follows I summarize what seem to be the key points. I specify SEACAS, Netcdf, and HDF5 as follows:

-D Trilinos_ENABLE_SEACAS:BOOL=ON
-D TPL_ENABLE_X11:BOOL=OFF
-D TPL_ENABLE_Matio:BOOL=OFF
-D Trilinos_ENABLE_SEACASIoss:BOOL=ON
-D Trilinos_ENABLE_SEACASExodus:BOOL=ON
-D TPL_ENABLE_Netcdf:BOOL=ON
-D Netcdf_INCLUDE_DIRS:PATH="$NETCDFDIR/include"
-D Netcdf_LIBRARY_DIRS:PATH="$NETCDFDIR/lib"
-D TPL_ENABLE_HDF5:BOOL=ON
-D HDF5_INCLUDE_DIRS:PATH="$HDF5DIR/include"
-D HDF5_LIBRARY_DIRS:PATH="$HDF5DIR/lib"
-D Trilinos_DUMP_LINK_LIBS=ON \

The DUMP_LINK_LIBS flag shows that exodus has the right order: -- exodus:LINK_LIBS='/usr/local/parallel/lib/libnetcdf.so;/usr/local/parallel/lib/libhdf5.a;/usr/local/lib/libz.so' and indeed the corresponding link.txt file has the right lib ordering. But, for example, nem_slice does not necessarily. Its dump output is -- nem_slice:LINK_LIBS='suplib_cpp;suplib;chaco;exodus;zoltan' which does not include the TPLs on which exodus depends. The corresponding link.txt has HDF5 and Netcdf in the wrong order: ... /usr/local/parallel/lib/libhdf5.a /usr/local/lib/libz.so /usr/local/parallel/lib/libnetcdf.so ... (Note that libnetcdf is shared, so this particular build goes through without a problem.)

Historically, in the case that the libs are all .a, we have hardcoded lib ordering like this:

-DTPL_ENABLE_Netcdf:STRING=ON \
-DNetcdf_INCLUDE_DIRS:PATH="${NETCDF_ROOT}/include" \
-DNetcdf_LIBRARY_DIRS:PATH="${NETCDF_ROOT}/lib" \
-DTPL_Netcdf_LIBRARIES="${NETCDF_ROOT}/lib/libnetcdf.a;${HDF5_ROOT}/lib/libhdf5_hl.a;${HDF5_ROOT}/lib/libhdf5.a;${ZLIB_ROOT}/lib/libz.a" \
-DTPL_ENABLE_HDF5:STRING=ON \
-DHDF5_INCLUDE_DIRS:PATH="${HDF5_ROOT}/include" \
-DTPL_HDF5_LIBRARIES:PATH="${HDF5_ROOT}/lib/libhdf5_hl.a;${HDF5_ROOT}/lib/libhdf5.a;${ZLIB_ROOT}/lib/libz.a" \

This has assured that all link.txt files are correct. A fix for this issue would permit the simple specification without providing full-path libs explicitly.

Attached is a text file containing the cmake script, configuration output, and selected cats of link.txt files.

Assignee
Assign to
Time tracking