#669: Rewrite users of deprecated HDF5 C++ API ----------------------+----------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: new Priority: minor | Milestone: Component: Other | Version: Keywords: | ----------------------+----------------------------------------------------- The C++ API for HDF5 is decprecated. We should examine which code uses it, and rewrite it to use the C API instead. This would allow us to use more system-provided HDF5 installations.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: new Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by barry.wardell):
One way to achieve this would be to use a basic C++ wrapper around the C API. For this, something along the lines of [http://sourceforge.net/p/h5mma/code/ci/d6a71c5c9b099d1eafd765927a368a23bdfac... h5wrapper.cc] and [http://sourceforge.net/p/h5mma/code/ci/d6a71c5c9b099d1eafd765927a368a23bdfac... h5wrapper.h] might be useful.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: new Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by knarf):
Let's first see which code actually uses it. The prominent example used to be the Visit plugin for Carpet HDF5, but that got rewritten to use the C interface. Is there anything else using the C++ interface? If not we could drop it IMHO.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: new Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by eschnett):
That would be a good question for a mailing list.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: review Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by knarf):
* status: new => review
Comment:
Nothing within the toolkit uses it. It builds without. And the Carpet plugin is better build against the headers within visit anyway because of version problems you typically get otherwise. I suggest to drop this ticket and consider the C++ interface to be not provided by the HDF5 thorn (which in fact it isn't necessarily). Thus, I propose to change the default for HDF5_ENABLE_CXX to 'no'.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: review Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by rhaas):
I support the notion of disabling the C++ API in ExternalThorns/HDF5 by default.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: reopened Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+---------------------------------------------------- Changes (by hinder):
* status: review => reopened
Comment:
I agree. Let's disable the use of the C++ API by default.
Looking at HDF5/configure.sh, it looks like we should just change
{{{ if [ "${HDF5_ENABLE_CXX:=yes}" = 'yes' ]; then }}} to {{{ if [ "${HDF5_ENABLE_CXX:=no}" = 'yes' ]; then }}}
However, the script looks like it might not be quite right, as later on this variable is used without a default being set. Additionally, the script does not treat "yes/no" in a caseless way like the other configuration scripts do.
The options supported by a configuration script are listed in configuration.ccl, but their default values are not - this is left up to the configuration script, so every configuration script has to contain programmatic code to manage defaults. I have amended #1042 to address this.
Changing status of this ticket from Review to "reopened" as there is no patch as yet.
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: reopened Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by rhaas):
':=' actually assigns default values (see the bash man page). So as long as the line Ian quoted is the first one where the variable appears everything after that has well defined default values. Bash's syntax is definitely rather strange. A less below-the-radar way of setting defaults would be something like: {{{ : ${HDF5_ENABLE_CXX:=yes} }}} (note the ':' at the beginning of the line).
#669: Rewrite users of deprecated HDF5 C++ API -----------------------+---------------------------------------------------- Reporter: eschnett | Owner: Type: task | Status: reopened Priority: minor | Milestone: Component: Other | Version: Resolution: | Keywords: -----------------------+----------------------------------------------------
Comment (by eschnett):
Here is an even less below-the-radar way: {{{ # Assign default value if unset : ${HDF5_ENABLE_CXX:=yes} }}} Note the English text following the "#" character.
trac@lists.einsteintoolkit.org