Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite errors on s390x #95

Closed
spanezz opened this issue Dec 17, 2022 · 19 comments
Closed

Test suite errors on s390x #95

spanezz opened this issue Dec 17, 2022 · 19 comments

Comments

@spanezz
Copy link
Contributor

spanezz commented Dec 17, 2022

Debian build machines report a failure of the test suite on s390x.

The test suite suppresses output, so I run failing tests again manually:

test$ HDF5_PLUGIN_PATH=../src/plugin/ ./test_read_lib ifile=test_zfp_030040.h5 max_reldiff=0.025 
    ifile="test_zfp_030040.h5"                set input filename
    max_absdiff=0                      set maximum absolute diff
    max_reldiff=0.025                  set maximum relative diff
    doint=0                       check integer datasets instead
    ret=0                  return 1 if diffs (0=all,1=abs,2=rel)
    help=0                                     this help message
HDF5-DIAG: Error detected in HDF5 (1.10.8) thread 1:
  #000: ../../../src/H5Dio.c line 186 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed
  #001: ../../../src/H5Dio.c line 584 in H5D__read(): can't read data
    major: Dataset
    minor: Read failed
  #002: ../../../src/H5Dchunk.c line 2544 in H5D__chunk_read(): unable to read raw data chunk
    major: Low-level I/O
    minor: Read failed
  #003: ../../../src/H5Dchunk.c line 3898 in H5D__chunk_lock(): data pipeline read failed
    major: Dataset
    minor: Filter operation failed
  #004: ../../../src/H5Z.c line 1400 in H5Z_pipeline(): filter returned failure during read
    major: Data filters
    minor: Read failed
  #005: H5Zzfp.c line 575 in H5Z_filter_zfp(): can't get ZFP mode/meta
    major: Data filters
    minor: Can't get value
  #006: H5Zzfp.c line 464 in get_zfp_info_from_cd_values(): ZFP codec version mismatch
    major: Data filters
    minor: Bad value
H5Dread failed at line 165, errno=2 (No such file or directory)

Same for ifile=test_zfp_030235.h5 max_reldiff=0.025 and ifile=test_zfp_110050.h5 max_reldiff=0.025.

For the h5repack -f UD=32013,0,4,3,0,3539053052,1062232653 test, I get a ratio of 99.

I tried to extract all information I could think of, let me know if I can help debug this further

@helmutg
Copy link
Contributor

helmutg commented Dec 17, 2022

It's not just s390x, but also hppa, powerpc, ppc64 and sparc64. There is something common them. They're all big endian and the successful architectures are all little endian. This should serve as a big clue.

@lindstro
Copy link
Member

Is the zfp library built with -DZFP_BIT_STREAM_WORD_SIZE=8 (CMake) or -DBITSTREAM_WORD_TYPE=uint8 (GNU Make)? That's required to handle endianness issues correctly in the H5Z-ZFP filter. See https://h5z-zfp.readthedocs.io/en/latest/installation.html#compiling-zfp and https://zfp.readthedocs.io/en/release1.0.0/installation.html#c.BIT_STREAM_WORD_TYPE.

@markcmiller86
Copy link
Member

@lindstro I think if the problem was compilation withOUT -DZFP_BIT_STREAM_WORD_SIZE=8, the filter would detect that condition here...

H5Z-ZFP/src/H5Zzfp.c

Lines 155 to 159 in e81aec1

/* Disable the ZFP filter entirely if it looks like the ZFP library
hasn't been compiled for 8-bit stream word size */
if ((int) B stream_word_bits != 8)
H5Z_ZFP_PUSH_AND_GOTO(H5E_PLINE, H5E_CANTINIT, -1,
"ZFP lib not compiled with -DBIT_STREAM_WORD_TYPE=uint8");

and we would see an error message to that effect in the HDF5-DIAG call trace output.

@helmutg
Copy link
Contributor

helmutg commented Dec 18, 2022

Rather than muse, we can simply look into the build log and discover that neither flag mentioned by @lindstro is passed. We should therefore treat this report as a user error for now and investigate the situation on the Debian side.

@spanezz
Copy link
Contributor Author

spanezz commented Dec 18, 2022

@helmutg the flag needs to be passed to zfp's build, not h5z-zfp, and it was added to zfp in response to Debian bug#1023821.

The h5z-zfp build log mentions using libzfp1 s390x 1.0.0-5, and its build log for s390x indeed has -DZFP_BIT_STREAM_WORD_SIZE=8.

@markcmiller86 has a point: the reason the flag was added to zfp was precisely because of the h5z-zfp check he quoted.

@markcmiller86
Copy link
Member

markcmiller86 commented Dec 18, 2022

@helmutg I haven't read in detail your whole post here but is your basic conclusion one where things work when everything is BIG endian but fail with LITTLE endien (or vice versa) or do things fail only with MIXED endian (between writer and reader)? Reason I ask is that the filter is supposed to have logic to handle HDF5 internal endian swapping (for MIXED endian cases) and we do test this with the test_zfp_be.h5 and test_zfp_le.h5 test data files.

@markcmiller86
Copy link
Member

Ok, did a little more thinking about this. The failure in the H5Z-ZFP filter is occuring here...

H5Z-ZFP/src/H5Zzfp.c

Lines 462 to 465 in e81aec1

/* Do a read of *just* magic to detect possible codec version mismatch */
if (0 == (Z zfp_read_header(zstr, zfld, ZFP_HEADER_MAGIC)))
H5Z_ZFP_PUSH_AND_GOTO(H5E_PLINE, H5E_BADVALUE, 0, "ZFP codec version mismatch");
Z zfp_stream_rewind(zstr);

The error message emmitted is a bit misleading. Whats failing is an attempt to read ZFP's header. The error message should read something like attmpt to read ZFP header magic number failed. At any rate, we need to understand why zfp_read_header() is returning 0 to H5Z-ZFP under these conditions.

@helmutg
Copy link
Contributor

helmutg commented Dec 19, 2022

@helmutg I haven't read in detail your whole post here but is your basic conclusion one where things work when everything is BIG endian but fail with LITTLE endien (or vice versa) or do things fail only with MIXED endian (between writer and reader)? Reason I ask is that the filter is supposed to have logic to handle HDF5 internal endian swapping (for MIXED endian cases) and we do test this with the test_zfp_be.h5 and test_zfp_le.h5 test data files.

We observe that builds on little endian succeed and builds on big endian fail. I would hope to resolve the question of mixed endian with your expertise: If the test suite contains little endian data files to be parsed as a test case, then a big endian build will exercise mixed endian features. Am I right in assuming that most tests/*.h5 files and test_zfp_030040.h5 in particular are little endian and thus concluding that this probably is mixed endian?

@helmutg
Copy link
Contributor

helmutg commented Dec 19, 2022

I looked into the zfp source code and all that it does there is verify 4 octects 'z', 'f', 'p', ZFP_CODEC == 5. I can actually locate this sequence in the affected test file, so it seems likely that the outer layer parsing code gets the offset wrong somehow. This is a bit tricky as we're dealing with libhdf5 and libzfp and seeing them all in action at the same time. It could be a bug in either of them in principle. The libhdf5 testsuite seems to succeed on s390x. I suppose we're not going to get far without debugging this on an actual big endian machine.

@markcmiller86
Copy link
Member

Am I right in assuming that most tests/*.h5 files and test_zfp_030040.h5 in particular are little endian and thus concluding that this probably is mixed endian?

Well, what is failing here is before any raw data reading where endienness could be an issue is involved.

That said, the filter does write ZFP's header bytes to the HDF5 dataset's cd_vals which are always treated by HDF5 as unsigned int. The filter uses the space of 6 unsigned ints as the necessary space to write ZFP's header plus some additional information the H5Z-ZFP filter stores. For HDF5 to handle those unsigned int cd_vals[6] properly (I mean apart from any interpretation as ZFP's header) in a mixed endian context, I would think it would be handling the byte-swapping needed to do it. But, maybe there is an issue we haven't addressed here.

@markcmiller86
Copy link
Member

Ok, I think I may know the issue now that I've written the above description. I think the issue is that when the filter writes ZFP's header to the dataset's unsigned int cd_vals[6], those 24 bytes are being treated as a sequence of bytes by ZFP. Ok, thats fine. But, in a mixed endian context, those bytes get byte-swapped for endianness when ZFP is probably expecting that they don't get byte swapped.

I think that is what is going on here.

@lindstro
Copy link
Member

That seems like a plausible explanation. Just to be clear, when ZFP_BIT_STREAM_WORD_SIZE == 8, as required by H5Z-ZFP, zfp reads and writes a stream of bytes. It knows nothing about cd_vals or any potential byte swapping done by H5Z-ZFP or HDF5 internals, and therefore cannot undo such byte swapping. zfp expects the order of bytes on input to match those produced on output in order to avoid any endian dependence.

@spanezz
Copy link
Contributor Author

spanezz commented Dec 22, 2022

To try and confirm these hypotheses, I added this instrumentation to get_zfp_info_from_cd_values in H5Zzfp.c:

--- src/orig	2022-12-22 11:09:49.215971341 +0000
+++ src/H5Zzfp.c	2022-12-22 11:15:44.563971308 +0000
@@ -448,6 +448,15 @@
     /* make a copy of cd_values in case we need to byte-swap it */
     memcpy(cd_values_copy, cd_values, cd_nelmts * sizeof(cd_values[0]));
 
+    for (int i = 0; i < (cd_nelmts > 10 ? 10 : cd_nelmts); ++i)
+	fprintf(stderr, "cd_values[%d] = %x\n", i, cd_values[i]);
+
+    for (int i = 0; i < (cd_nelmts * sizeof(cd_values[0]) > 16 ? 16 : cd_nelmts * sizeof(cd_values[0])); ++i)
+    {
+	unsigned char* buf = (unsigned char*)cd_values;
+	fprintf(stderr, "buffer[%d] = '%c' %02x\n", i, buf[i], (unsigned int)(buf[i]) & 0xff);
+    }
+
     /* treat the cd_values as a zfp bitstream buffer */
     if (0 == (bstr = B stream_open(&cd_values_copy[0], sizeof(cd_values_copy[0]) * cd_nelmts)))
         H5Z_ZFP_PUSH_AND_GOTO(H5E_RESOURCE, H5E_NOSPACE, 0, "opening header bitstream failed");

The resulting output is:

$ HDF5_PLUGIN_PATH=../src/plugin/ ./test_read_lib ifile=test_zfp_030040.h5 max_reldiff=0.025
    ifile="test_zfp_030040.h5"                set input filename
    max_absdiff=0                      set maximum absolute diff
    max_reldiff=0.025                  set maximum relative diff
    doint=0                       check integer datasets instead
    ret=0                  return 1 if diffs (0=all,1=abs,2=rel)
    help=0                                     this help message
cd_values[0] = 570667a
cd_values[1] = ff3
cd_values[2] = 2f00000
buffer[0] = '' 05
buffer[1] = 'p' 70
buffer[2] = 'f' 66
buffer[3] = 'z' 7a
buffer[4] = '' 00
buffer[5] = '' 00
buffer[6] = '' 0f
buffer[7] = '�' f3
buffer[8] = '' 02
buffer[9] = '�' f0
buffer[10] = '' 00
buffer[11] = '' 00
HDF5-DIAG: Error detected in HDF5 (1.10.8) thread 1:
  #000: ../../../src/H5Dio.c line 186 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed
  #001: ../../../src/H5Dio.c line 584 in H5D__read(): can't read data
    major: Dataset
    minor: Read failed
  #002: ../../../src/H5Dchunk.c line 2544 in H5D__chunk_read(): unable to read raw data chunk
    major: Low-level I/O
    minor: Read failed
  #003: ../../../src/H5Dchunk.c line 3898 in H5D__chunk_lock(): data pipeline read failed
    major: Dataset
    minor: Filter operation failed
  #004: ../../../src/H5Z.c line 1400 in H5Z_pipeline(): filter returned failure during read
    major: Data filters
    minor: Read failed
  #005: H5Zzfp.c line 584 in H5Z_filter_zfp(): can't get ZFP mode/meta
    major: Data filters
    minor: Can't get value
  #006: H5Zzfp.c line 473 in get_zfp_info_from_cd_values(): ZFP codec version mismatch
    major: Data filters
    minor: Bad value
H5Dread failed at line 165, errno=2 (No such file or directory)

At a quick glance, it does seem that cd_values[0] does indeed contain the byte-swapped ZFP header

@markcmiller86
Copy link
Member

@spanezz ok, thanks for that experiment. When I am back from holidays, I will work on a fix.

@markcmiller86
Copy link
Member

And, I think the right answer will be read "normally", check for possibility of it having been byte-swapped and if so, un-byte-swap it before proceeding.

@spanezz
Copy link
Contributor Author

spanezz commented Jan 10, 2023

Hi, were you able to make any progress? Let me know if/how I can help

helmutg added a commit to helmutg/H5Z-ZFP that referenced this issue Jan 31, 2023
When reading a byte-swapped file, the input is grouped to 4-byte words
and each of them is swapped individually. When we try to read such a
file, we first validate its header using zfp_read_header with the
ZFP_HEADER_MAGIC flag. This flag causes it to only validate the first
word to be "zfp\x05". If it is not exactly that, it gives up.
Unfortunately, this magic word can already be swapped. The actual byte
swapping code would only be tried once the full header would fail to
read, so automatic byte swapping never worked.

Instead, when encountering a header with bad magic, try swapping it
already and only try reading the full header once the magic (normal or
swapped) has been read successfully.

Thanks to Mark C. Miller, Peter Lindstrom and Enrico Zini for doing most
of the debugging to get here.
helmutg added a commit to helmutg/H5Z-ZFP that referenced this issue Jan 31, 2023
When reading a byte-swapped file, the input is grouped to 4-byte words
and each of them is swapped individually. When we try to read such a
file, we first validate its header using zfp_read_header with the
ZFP_HEADER_MAGIC flag. This flag causes it to only validate the first
word to be "zfp\x05". If it is not exactly that, it gives up.
Unfortunately, this magic word can already be swapped. The actual byte
swapping code would only be tried once the full header would fail to
read, so automatic byte swapping never worked.

Instead, when encountering a header with bad magic, try swapping it
already and only try reading the full header once the magic (normal or
swapped) has been read successfully.

Thanks to Mark C. Miller, Peter Lindstrom and Enrico Zini for doing most
of the debugging to get here.
@helmutg
Copy link
Contributor

helmutg commented Jan 31, 2023

I have split this issue into #95 (the byte swapped reading that has been discussed here for long) and #100 (test-h5repack failing to use h5z-zfp). I've also created a PR #101 to fix the #95 part, but I couldn't get down to the bottom of #100 yet.

markcmiller86 pushed a commit that referenced this issue Feb 17, 2023
When reading a byte-swapped file, the input is grouped to 4-byte words
and each of them is swapped individually. When we try to read such a
file, we first validate its header using zfp_read_header with the
ZFP_HEADER_MAGIC flag. This flag causes it to only validate the first
word to be "zfp\x05". If it is not exactly that, it gives up.
Unfortunately, this magic word can already be swapped. The actual byte
swapping code would only be tried once the full header would fail to
read, so automatic byte swapping never worked.

Instead, when encountering a header with bad magic, try swapping it
already and only try reading the full header once the magic (normal or
swapped) has been read successfully.

Thanks to Mark C. Miller, Peter Lindstrom and Enrico Zini for doing most
of the debugging to get here.
@markcmiller86 markcmiller86 self-assigned this Mar 3, 2023
@markcmiller86 markcmiller86 added this to the 1.1.1 milestone Mar 3, 2023
@markcmiller86
Copy link
Member

I believe this issue has been resolved by prior work.

Capturing here results from running most up to date code on s390x system on HDF5-1.10.7

ZFP-0.5.0

gcc test_write_lib.o -o test_write_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.0/lib -lh5zzfp -lhdf5 -lzfp -lm 
gcc -c test_read.c -o test_read_lib.o -fPIC -I../src -I/home/zfp-0.5.0/inc -I/usr/include/hdf5/serial
gcc test_read_lib.o -o test_read_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.0/lib -lh5zzfp -lhdf5 -lzfp 
 
./test_write_lib rate=32 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=16 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=8 zfpmode=1 ........................... [PASSED] 
Library rate tests .......................................... [PASSED] 
 
./test_write_lib acc=0.1 zfpmode=3 .......................... [PASSED] 
./test_write_lib acc=0.01 zfpmode=3 ......................... [PASSED] 
./test_write_lib acc=0.001 zfpmode=3 ........................ [PASSED] 
./test_write_lib acc=0.0001 zfpmode=3 ....................... [PASSED] 
Library accuracy tests ...................................... [PASSED] 
 
./test_write_lib prec=12 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=16 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=20 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=24 zfpmode=2 .......................... [PASSED] 
Library precision tests ..................................... [PASSED] 
gcc -c test_error.c -o test_error.o -fPIC -DZFP_LIB_VERSION=0x050 -I../src -I/home/zfp-0.5.0/inc -I/usr/include/hdf5/serial
gcc test_error.o -o test_error -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.0/lib -lh5zzfp -lhdf5 -lzfp -lm 
 
./test_error ................................................ [PASSED] 
cd ../src; make ZFP_HOME=/home/zfp-0.5.0  PREFIX=/home/H5Z-ZFP/install plugin
make[2]: Entering directory '/home/H5Z-ZFP/src'
make[2]: Nothing to be done for 'plugin'.
make[2]: Leaving directory '/home/H5Z-ZFP/src'
gcc -c test_write.c -o test_write_plugin.o -DH5Z_ZFP_USE_PLUGIN -DZFP_LIB_VERSION=0x050 -fPIC -I../src -I/home/zfp-0.5.0/inc -I/usr/include/hdf5/serial
gcc test_write_plugin.o -o test_write_plugin -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.0/lib -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.0/lib -lhdf5 -lzfp -lm 
 
./test_write_plugin zfpmode=1 rate=32 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=16 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=8 ........................ [PASSED] 
./test_write_plugin zfpmode=1 rate=4 ........................ [PASSED] 
Plugin rate tests ........................................... [PASSED] 
 
./test_write_plugin zfpmode=3 acc=0.1 ....................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.01 ...................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.001 ..................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.0001 .................... [PASSED] 
Plugin accuracy tests ....................................... [PASSED] 
 
./test_write_plugin zfpmode=2 prec=12 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=16 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=20 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=24 ....................... [PASSED] 
Plugin precision tests ...................................... [PASSED] 
If using HDF5-1.8, make sure you have patched repack
gcc -c print_h5repack_farg.c -o print_h5repack_farg.o -fPIC -I../src -I/usr/include/hdf5/serial
gcc print_h5repack_farg.o -o print_h5repack_farg 
 
h5repack -n     -f UD=32013,0,4,3,0,1062232653,3539053052 ... [PASSED] 
 
h5diff -v -d 0.00001 test_zfp_le.h5 test_zfp_be.h5 compressed compressed ........ [PASSED] 
 
h5dump bigendian.h5 ............................................................. [PASSED] 
 
./test_read_lib ifile=test_zfp_030040.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_030235.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110050.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110xxx.h5 max_reldiff=0.025 .. [PASSED] 
Version compatibility tests ................................. [PASSED] 
 
./test_write_lib zfpmode=3 doint=1 .......................... [SKIPPED]
 
./test_write_lib highd=1 .................................... [PASSED] 
 
./test_write_lib sixd=1 ..................................... [SKIPPED]
 
./test_write_lib zfparr=1 rate=10 ........................... [SKIPPED]

ZFP-0.5.5

gcc test_write_lib.o -o test_write_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.5/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.5/lib -lh5zzfp -lhdf5 -lzfp -lm 
gcc -c test_read.c -o test_read_lib.o -fPIC -I../src -I/home/zfp-0.5.5/include -I/usr/include/hdf5/serial
gcc test_read_lib.o -o test_read_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.5/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.5/lib -lh5zzfp -lhdf5 -lzfp 
 
./test_write_lib rate=32 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=16 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=8 zfpmode=1 ........................... [PASSED] 
Library rate tests .......................................... [PASSED] 
 
./test_write_lib acc=0.1 zfpmode=3 .......................... [PASSED] 
./test_write_lib acc=0.01 zfpmode=3 ......................... [PASSED] 
./test_write_lib acc=0.001 zfpmode=3 ........................ [PASSED] 
./test_write_lib acc=0.0001 zfpmode=3 ....................... [PASSED] 
Library accuracy tests ...................................... [PASSED] 
 
./test_write_lib prec=12 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=16 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=20 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=24 zfpmode=2 .......................... [PASSED] 
Library precision tests ..................................... [PASSED] 
gcc -c test_error.c -o test_error.o -fPIC -DZFP_LIB_VERSION=0x055 -I../src -I/home/zfp-0.5.5/include -I/usr/include/hdf5/serial
gcc test_error.o -o test_error -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.5/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.5/lib -lh5zzfp -lhdf5 -lzfp -lm 
 
./test_error ................................................ [PASSED] 
 
./test_write_lib zfpmode=5 .................................. [PASSED] 
cd ../src; make ZFP_HOME=/home/zfp-0.5.5  PREFIX=/home/H5Z-ZFP/install plugin
make[2]: Entering directory '/home/H5Z-ZFP/src'
make[2]: Nothing to be done for 'plugin'.
make[2]: Leaving directory '/home/H5Z-ZFP/src'
gcc -c test_write.c -o test_write_plugin.o -DH5Z_ZFP_USE_PLUGIN -DZFP_LIB_VERSION=0x055 -fPIC -I../src -I/home/zfp-0.5.5/include -I/usr/include/hdf5/serial
gcc test_write_plugin.o -o test_write_plugin -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-0.5.5/lib -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-0.5.5/lib -lhdf5 -lzfp -lm 
 
./test_write_plugin zfpmode=1 rate=32 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=16 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=8 ........................ [PASSED] 
./test_write_plugin zfpmode=1 rate=4 ........................ [PASSED] 
Plugin rate tests ........................................... [PASSED] 
 
./test_write_plugin zfpmode=3 acc=0.1 ....................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.01 ...................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.001 ..................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.0001 .................... [PASSED] 
Plugin accuracy tests ....................................... [PASSED] 
 
./test_write_plugin zfpmode=2 prec=12 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=16 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=20 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=24 ....................... [PASSED] 
Plugin precision tests ...................................... [PASSED] 
If using HDF5-1.8, make sure you have patched repack
gcc -c print_h5repack_farg.c -o print_h5repack_farg.o -fPIC -I../src -I/usr/include/hdf5/serial
gcc print_h5repack_farg.o -o print_h5repack_farg 
 
h5repack -n     -f UD=32013,0,4,3,0,1062232653,3539053052 ... [PASSED] 
 
./test_write_plugin zfpmode=5 ............................... [PASSED] 
 
h5diff -v -d 0.00001 test_zfp_le.h5 test_zfp_be.h5 compressed compressed ........ [PASSED] 
 
h5dump bigendian.h5 ............................................................. [PASSED] 
 
./test_read_lib ifile=test_zfp_030040.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_030235.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110050.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110xxx.h5 max_reldiff=0.025 .. [PASSED] 
Version compatibility tests ................................. [PASSED] 
 
./test_write_lib zfpmode=3 doint=1 .......................... [PASSED] 
 
./test_write_lib highd=1 .................................... [PASSED] 
 
./test_write_lib sixd=1 ..................................... [PASSED] 
 
./test_write_lib zfparr=1 rate=10 ........................... [SKIPPED]

ZFP-1.0.0 with BUILD_CFP=1 (CFP arrays)

gcc test_write_lib.o -o test_write_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-1.0.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-1.0.0/lib -lh5zzfp -lhdf5 -lzfp -lcfp -lstdc++ -lm 
gcc -c test_read.c -o test_read_lib.o -fPIC -I../src -I/home/zfp-1.0.0/include -I/usr/include/hdf5/serial
gcc test_read_lib.o -o test_read_lib -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-1.0.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-1.0.0/lib -lh5zzfp -lhdf5 -lzfp -lcfp -lstdc++ 
 
./test_write_lib rate=32 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=16 zfpmode=1 .......................... [PASSED] 
./test_write_lib rate=8 zfpmode=1 ........................... [PASSED] 
Library rate tests .......................................... [PASSED] 
 
./test_write_lib acc=0.1 zfpmode=3 .......................... [PASSED] 
./test_write_lib acc=0.01 zfpmode=3 ......................... [PASSED] 
./test_write_lib acc=0.001 zfpmode=3 ........................ [PASSED] 
./test_write_lib acc=0.0001 zfpmode=3 ....................... [PASSED] 
Library accuracy tests ...................................... [PASSED] 
 
./test_write_lib prec=12 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=16 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=20 zfpmode=2 .......................... [PASSED] 
./test_write_lib prec=24 zfpmode=2 .......................... [PASSED] 
Library precision tests ..................................... [PASSED] 
gcc -c test_error.c -o test_error.o -fPIC -DZFP_LIB_VERSION=0x1000 -I../src -I/home/zfp-1.0.0/include -I/usr/include/hdf5/serial
gcc test_error.o -o test_error -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-1.0.0/lib -L../src -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-1.0.0/lib -lh5zzfp -lhdf5 -lzfp -lcfp -lstdc++ -lm 
 
./test_error ................................................ [PASSED] 
 
./test_write_lib zfpmode=5 .................................. [PASSED] 
cd ../src; make ZFP_HOME=/home/zfp-1.0.0  PREFIX=/home/H5Z-ZFP/install plugin
make[2]: Entering directory '/home/H5Z-ZFP/src'
make[2]: Nothing to be done for 'plugin'.
make[2]: Leaving directory '/home/H5Z-ZFP/src'
gcc -c test_write.c -o test_write_plugin.o -DH5Z_ZFP_USE_PLUGIN -DZFP_LIB_VERSION=0x1000 -fPIC -I../src -I/home/zfp-1.0.0/include -I/usr/include/hdf5/serial
gcc test_write_plugin.o -o test_write_plugin -fPIC -Wl,-rpath,/usr/lib/s390x-linux-gnu/hdf5/serial -Wl,-rpath,/home/zfp-1.0.0/lib -L/usr/lib/s390x-linux-gnu/hdf5/serial -L/home/zfp-1.0.0/lib -lhdf5 -lzfp -lcfp -lstdc++ -lm 
 
./test_write_plugin zfpmode=1 rate=32 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=16 ....................... [PASSED] 
./test_write_plugin zfpmode=1 rate=8 ........................ [PASSED] 
./test_write_plugin zfpmode=1 rate=4 ........................ [PASSED] 
Plugin rate tests ........................................... [PASSED] 
 
./test_write_plugin zfpmode=3 acc=0.1 ....................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.01 ...................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.001 ..................... [PASSED] 
./test_write_plugin zfpmode=3 acc=0.0001 .................... [PASSED] 
Plugin accuracy tests ....................................... [PASSED] 
 
./test_write_plugin zfpmode=2 prec=12 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=16 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=20 ....................... [PASSED] 
./test_write_plugin zfpmode=2 prec=24 ....................... [PASSED] 
Plugin precision tests ...................................... [PASSED] 
If using HDF5-1.8, make sure you have patched repack
gcc -c print_h5repack_farg.c -o print_h5repack_farg.o -fPIC -I../src -I/usr/include/hdf5/serial
gcc print_h5repack_farg.o -o print_h5repack_farg 
 
h5repack -n     -f UD=32013,0,4,3,0,1062232653,3539053052 ... [PASSED] 
 
./test_write_plugin zfpmode=5 ............................... [PASSED] 
 
h5diff -v -d 0.00001 test_zfp_le.h5 test_zfp_be.h5 compressed compressed ........ [PASSED] 
 
h5dump bigendian.h5 ............................................................. [PASSED] 
 
./test_read_lib ifile=test_zfp_030040.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_030235.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110050.h5 max_reldiff=0.025 .. [PASSED] 
./test_read_lib ifile=test_zfp_110xxx.h5 max_reldiff=0.025 .. [PASSED] 
Version compatibility tests ................................. [PASSED] 
 
./test_write_lib zfpmode=3 doint=1 .......................... [PASSED] 
 
./test_write_lib highd=1 .................................... [PASSED] 
 
./test_write_lib sixd=1 ..................................... [PASSED] 
 
./test_write_lib zfparr=1 rate=10 ........................... [PASSED] 

@helmutg
Copy link
Contributor

helmutg commented Apr 28, 2023

I've uploaded git to Debian experimental and confirm that it builds on s390x. Thank you.

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

No branches or pull requests

5 participants