spatialaudio / python-sofa

A python API for reading and writing SOFA files (https://www.sofaconventions.org/)
MIT License
24 stars 8 forks source link

Importing Python-SOFA in parallel to h5py fails on Windows. #6

Open sone-man opened 2 years ago

sone-man commented 2 years ago

When importing SOFA and h5py Python throws: ` UserWarning: h5py is running against HDF5 1.12.1 when it was built against 1.12.2, this may cause problems _warn(("h5py is running against HDF5 {0} when it was built against {1}, " 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.2, library is 1.12.1 SUMMARY OF THE HDF5 CONFIGURATION

General Information:

               HDF5 Version: 1.12.1
              Configured on: 2022-03-04
              Configured by: Ninja
                Host system: Windows-10.0.17763
          Uname information: Windows
                   Byte sex: little-endian
         Installation point: D:/bld/hdf5_split_1646412547396/_h_env/Library

Compiling Options:

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

Linking Options:

                  Libraries:

Statically Linked Executables: OFF LDFLAGS: /machine:x64 H5_LDFLAGS: AM_LDFLAGS: Extra libraries: D:/bld/hdf5_split_1646412547396/_h_env/Library/lib/libcurl.lib;D:/bld/hdf5_split_1646412547396/_h_env/Library/lib/libssl.lib;D:/bld/hdf5_split_1646412547396/_h_env/Library/lib/libcrypto.lib Archiver: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/lib.exe Ranlib: :

Languages:

                          C: YES
                 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe 19.16.27045.0
                   CPPFLAGS:
                H5_CPPFLAGS:
                AM_CPPFLAGS:
                     CFLAGS:   /DWIN32 /D_WINDOWS
                  H5_CFLAGS: /W3;/wd4100;/wd4706;/wd4127
                  AM_CFLAGS:
           Shared C Library: YES
           Static C Library: YES

                    Fortran: OFF
           Fortran Compiler:
              Fortran Flags:
           H5 Fortran Flags:
           AM Fortran Flags:
     Shared Fortran Library: YES
     Static Fortran Library: YES

                        C++: ON
               C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe 19.16.27045.0
                  C++ Flags:
               H5 C++ Flags: /W3;/wd4100;/wd4706;/wd4127
               AM C++ Flags:
         Shared C++ Library: YES
         Static C++ Library: YES

                        JAVA: OFF
             JAVA Compiler:

Features:

               Parallel HDF5: OFF

Parallel Filtered Dataset Writes: Large Parallel I/O: High-level library: ON Build HDF5 Tests: ON Build HDF5 Tools: ON Threadsafety: ON (recursive RW locks: ) Default API mapping: v112 With deprecated public symbols: ON I/O filters (external): DEFLATE MPE: Direct VFD: Mirror VFD: (Read-Only) S3 VFD: 1 (Read-Only) HDFS VFD: dmalloc: Packages w/ extra debug output: API Tracing: OFF Using memory checker: OFF Memory allocation sanity checks: OFF Function Stack Tracing: OFF Use file locking: best-effort Strict File Format Checks: OFF Optimization Instrumentation: Bye...`

Discovered on Windows 10 and not reproducable on Ubuntu.

sone-man commented 2 years ago

Steps to reproduce:

Run in python: import sofa import h5py

List of installed packages: Package Version


cftime 1.6.2 DateTime 4.7 h5py 3.7.0 netCDF4 1.6.1 numpy 1.23.3 pip 22.2.2 python-sofa 0.2.0 pytz 2022.2.1 scipy 1.9.1 setuptools 65.3.0 zope.interface 5.4.0