osinenkop / regelum-control

Control library for regelum
MIT License
5 stars 2 forks source link

HDF5 library version mismatched error on MAC M2 #9

Closed mvulf closed 7 months ago

mvulf commented 7 months ago

Below is my traceback.

Warning! HDF5 library version mismatched error The HDF5 header files used to compile this application do not match the version used by the HDF5 library to which this application is linked. Data corruption or segmentation faults may occur if the application continues. This can happen when an application was compiled by one version of HDF5 but linked with a different version of static or shared HDF5 library. You should recompile the application or check your shared library related settings such as 'LD_LIBRARY_PATH'. You can, at your own risk, disable this warning by setting the environment variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'. Setting it to 2 or higher will suppress the warning messages totally. Headers are 1.12.1, library is 1.14.3 SUMMARY OF THE HDF5 CONFIGURATION

General Information:

               HDF5 Version: 1.14.3
              Configured on: 2023-10-28
              Configured by: Unix Makefiles
                Host system: Darwin-23.4.0
          Uname information: Darwin
                   Byte sex: 
         Installation point: /opt/homebrew/Cellar/hdf5/1.14.3_1

Compiling Options:

                 Build Mode: Release
          Debugging Symbols: OFF
                    Asserts: OFF
                  Profiling: OFF
         Optimization Level: OFF

Linking Options:

                  Libraries: 

Statically Linked Executables: OFF LDFLAGS: H5_LDFLAGS: AM_LDFLAGS: Extra libraries: m;dl Archiver: /usr/bin/ar AR_FLAGS: Ranlib: /usr/bin/ranlib

Languages:

                          C: YES
                 C Compiler: clang 15.0.0.15000309
                   CPPFLAGS: 
                H5_CPPFLAGS: 
                AM_CPPFLAGS: 
                    C Flags:  -std=c99 
                 H5 C Flags: -Wall;-Warray-bounds;-Wcast-qual;-Wconversion;-Wdouble-promotion;-Wextra;-Wformat=2;-Wframe-larger-than=16384;-Wimplicit-fallthrough;-Wnull-dereference;-Wunused-const-variable;-Wwrite-strings;-Wpedantic;-Wvolatile-register-var;-Wno-c++-compat;-Wbad-function-cast;-Wimplicit-function-declaration;-Wincompatible-pointer-types;-Wmissing-declarations;-Wpacked;-Wshadow;-Wswitch;-Wno-error=incompatible-pointer-types-discards-qualifiers;-Wunused-function;-Wunused-variable;-Wunused-parameter;-Wcast-align;-Wformat;-Wno-missing-noreturn
                 AM C Flags: 
           Shared C Library: YES
           Static C Library: YES

                    Fortran: ON
           Fortran Compiler:  
              Fortran Flags: 
           H5 Fortran Flags: 
           AM Fortran Flags: 
     Shared Fortran Library: YES
     Static Fortran Library: YES
           Module Directory: /tmp/hdf5-20240325-4374-py0oul/hdf5-1.14.3/build/mod

                        C++: ON
               C++ Compiler:  
                  C++ Flags: 
               H5 C++ Flags: 
               AM C++ Flags: 
         Shared C++ Library: YES
         Static C++ Library: YES

                       Java: 
              Java Compiler:  

Features:

                 Parallel HDF5: OFF

Parallel Filtered Dataset Writes: Large Parallel I/O: High-level library: Dimension scales w/ new references: Build HDF5 Tests: OFF Build HDF5 Tools: Build GIF Tools: Threadsafety: OFF Default API mapping: v114 With deprecated public symbols: ON I/O filters (external): DEFLATE DECODE ENCODE Map (H5M) API: Direct VFD: Mirror VFD: Subfiling VFD: (Read-Only) S3 VFD: (Read-Only) HDFS VFD: Packages w/ extra debug output: API tracing: OFF Using memory checker: OFF Function stack tracing: OFF Use file locking: best-effort Strict file format checks: OFF Optimization instrumentation:

bolychevanton commented 7 months ago

The problem is not in regelum-control.

The .h5 files are saved automatically after at the end of every iteration. Seems like the code fails exactly when it tries to save h5-file.

I found this relevant issue on stackoverflow

Try this

pip uninstall tables
pip install cython
brew install hdf5
brew install c-blosc
export HDF5_DIR=/opt/homebrew/opt/hdf5 
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
pip install git+https://github.com/PyTables/PyTables

Please, reply if it worked.

mvulf commented 7 months ago

It workes, thank you!