ukaea / hdc

MIT License
0 stars 1 forks source link

Some fixes for macOS build and optimising memory copies. #1

Closed jholloc closed 2 years ago

jholloc commented 2 years ago

Adding "reserve" function to storage to allow for constructing an uninitialised-memory HDC which can later be filled by passing to an external function - needed for efficiently reading NetCDF data. Replacing vector with unique_ptr to avoid unnecessary memory sets.

david-fridrich commented 2 years ago

Good idea.

I have run tests through IPP gitlab CI (until we have github actions working) and found some (mostly thirdparty) problems:

  1. build with focal HDF5 fails due to this bug
  2. bionic GCC 7.3 does not cope with -O3 flag - when using MDBM backend, it segfauls here probably due to the buffer length, which had then 32 bytes (without) header
  3. -Werror makes xenial GCC 5.4 angry with: thirdparty/jsoncpp/jsoncpp.cpp:2393:51: error: unused parameter ‘other’ [-Werror=unused-parameter] - I have also tried to update jsoncpp to the lates version, but it did not help.

The entire pipeline passes with those fixes, so we can probably merge this, if you agree.

I can look into these bugs in more detail later, but I don't have much time for that now.