Skip to content

Conversation

@markcmiller86
Copy link
Member

@markcmiller86 markcmiller86 commented Dec 8, 2025

Description

  • Updates Silo to 4.12.0 and CMake
  • Updates HDF5 to 2.0 and CMake
  • Patches build of Xdmf 2.1.1 for HF5-2.0
  • Fixes a few HDF5 plugins for HDF5-2.0
  • Patches and or adjusts bv_xxx.sh for some HDF5 dependent TPLs

Type of change

  • Bug fix~~
  • New feature~~
  • Documentation update~~
  • Other~~

How Has This Been Tested?

Reminders:

  • Please follow the style guidelines of this project.
  • Please perform a self-review of your code before submitting a PR and asking others to review it.
  • Please assign reviewers (see VisIt's PR procedures for more information).

Checklist:

  • I have commented my code where applicable.~~
  • I have updated the release notes.~~
  • I have made corresponding changes to the documentation.~~
  • I have added debugging support to my changes.~~
  • I have added tests that prove my fix is effective or that my feature works.~~
  • I have confirmed new and existing unit tests pass locally with my changes.~~
  • I have added new baselines for any new tests to the repo.~~
  • I have NOT made any changes to protocol or public interfaces in an RC branch.~~

@cyrush
Copy link
Member

cyrush commented Dec 8, 2025

So far looks great! I recommend we create a ticket that lists plugins that still need to use old HDF5 APIs via defines.

if [[ "$DO_ZLIB" == "yes" ]]; then
info "Configuring HDF5 with ZLib support."
cf_zlib="--with-zlib=\"${VISITDIR}/zlib/${ZLIB_VERSION}/${VISITARCH}\""
cmk_opts="${cmk_opts} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see ZLIB support here, but not SZIP.
SZIP is still listed in bv_hdf5_depends_on and in bv_hdf5_host_profile. If an external szip is no longer needed for building hdf5 it should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. I am inclined to remove the SZIP requirements here. Its never used...well, I can't say I know that for certain. Its an educated guess though that I believe with 95% confidence.

Does removing SZIP mean we wouldn't be able to visualize SZIP compressed data files? Yes and no. Yes, not without the user having to manage HDF5 external plugins...which is pretty easy. No, as long as the user has an SZIP plugin installed somewhere and they set HDF5_PLUGIN_PATH in their env. variables. Then, it should pretty much happen automagically. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts?

From me, none, I don't understand all the implications. I have only been following the build_visit settings as best as possible for builds of TP libs on Windows, so I needed to know if this was still a requirement.

Copy link
Member

@cyrush cyrush Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is unlikely that a user will understand they have an szip file and be able to create the lib and set up the env vars.

That said, if these files are very rare -- I am open to dropping support. Mark do you know if LLNL sim codes used szip in the past?

@markcmiller86
Copy link
Member Author

markcmiller86 commented Dec 8, 2025 via email

@markcmiller86
Copy link
Member Author

I was trying to build Xdmf against the one, parallel HDF5-2.0 I have installed and that fails, even after my patches for HDF5-2.0. Why? It fails because including hdf5.h in Xdmf sources causes a #include <mpi.h> and bv_xdfm.py ordinarily doesn't deal with building Xdmf against a parallel HDF5. Xdmf's CMake logic is very, very old. It is not using find_package() for HDF5 and so doesn't prime itself properly when building against a parallel-enabled HDF5.

There are a few options for situations like this...

  • Simply adjust bv_hdf5.sh to install both hdf5 and hdf5_mpi as before (which was the plan last week and my intention if I keep hitting issues like this).
  • There is a swizzle on the above I've at least tested with Xdmf and that is to arrange for H5_HAVE_PARALLEL to be #undef'd in HDF5 headers when building a serial lib like Xdmf against HDF5. This seems to work!
  • When building for parallel, inject -I/path/to/mpi/headers into Xdmf CMAKE_CXX_FLAGS
    • Note: Xdmf 2.1.1 does have some MPI functionality in it but it is related to their network-distributed global memory (NDGM) and unrelated to our needs for simple Xdmf I/O.

@markcmiller86
Copy link
Member Author

To get Xdmf library to add -I/path/to/mpi/includes when HDF5 library it is using is parallel enabled, I added some logic to use CMake to probe the HDF5 installation. That seems to work.

@markcmiller86
Copy link
Member Author

Ok, netcdf requires more love because it a) assumes hid_t is an int and in HDF5-2.0 that type was changed to int64_t and it has the same H5Oget_info...() issues seen in other libs.

I suspect HDF5-2.0 has a bug in the API mapping macros for H5Oget_info... methods. I've submitted an inquiry to The HDF Group about it. Its popping up in a lot of places due to a missing arg when compiling against 2.0.

@biagas
Copy link
Contributor

biagas commented Dec 11, 2025

You might try Netcdf 4.5.0. That's what I've been using on Windows (for ease of building). I had no issues with the VisIt using this version, nor with building it against HDF5 2.0 in my test builds this week.

@markcmiller86
Copy link
Member Author

You might try Netcdf 4.5.0. That's what I've been using on Windows (for ease of building). I had no issues with the VisIt using this version, nor with building it against HDF5 2.0 in my test builds this week.

So, the set of patches needed for netcdf-4.1.1 (now ~15 years old) with HDF5-2.0 is getting larger and more complex. I am close to having it working but I kinda like @biagas suggestion. @cyrush do you have strong opinions?

@cyrush
Copy link
Member

cyrush commented Dec 12, 2025

@markcmiller86 I think we should try the new version, would be good to remove ancient patches and have same code used on windows as linux if possible.

@markcmiller86
Copy link
Member Author

So, I was 4 patches in and apparently 2 patches away from a successful netcdf-4.1.1 build with HDF5-2.0. So, I've currently got that in this PR. I will revisit the issue before taking out of draft mode. But, for time being, I think its working now.

@markcmiller86
Copy link
Member Author

I added logic to silo plugin to provide a little more info about the file (and plugin) software versions...

Screenshot from 2025-12-15 10-54-09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants