Closed williamfgc closed 6 years ago
Just a quick information, my initial SZ implementation in Adios2 was based on 1.4.12.x version. To use the most recent SZ, we need to change a few things in Adios2. I will start looking at.
Thanks @jychoi-hpc . Yes, I removed a few things (see the // above) from sz parameters to make ADIOS2 compile with the latest SZ master. Still, shouldn't crash if defaults are passed.
I fixed the issue. Thanks for the feedback. In testdouble_decompress.c, there is an example to show how to call SZ_Init_Params() to do the initialization without reading the configuration file sz.config. Specifically, you can change the following code
status = SZ_Init(cfgFile);
/*sz_params sz;
memset(&sz, 0, sizeof(sz_params));
sz.sol_ID = SZ;
sz.sampleDistance = 100;
sz.quantization_intervals = 0;
sz.max_quant_intervals = 65536;
sz.predThreshold = 0.98;
sz.szMode = SZ_BEST_COMPRESSION;
sz.losslessCompressor = ZSTD_COMPRESSOR;
sz.gzipMode = 1;
sz.errorBoundMode = REL;
sz.absErrBound = 1E-6;
sz.relBoundRatio = 1E-5;
SZ_Init_Params(&sz);*/
to be
//status = SZ_Init(cfgFile);
sz_params sz;
memset(&sz, 0, sizeof(sz_params));
sz.sol_ID = SZ;
sz.sampleDistance = 100;
sz.quantization_intervals = 0;
sz.max_quant_intervals = 65536;
sz.predThreshold = 0.98;
sz.szMode = SZ_BEST_COMPRESSION;
sz.losslessCompressor = ZSTD_COMPRESSOR;
sz.gzipMode = 1;
sz.errorBoundMode = REL;
sz.absErrBound = 1E-6;
sz.relBoundRatio = 1E-5;
SZ_Init_Params(&sz);
Then, execute "make" in the example/ directory. Then, you can test the compression as follows: ./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.dat 8 8 128
Please let me know if you encounter any more questions/problems.
Please also note that the parameters are different between sz 1.4 and sz 2.0, because of some parameters become deprecated in sz 2.0. For instance, the following parameters are removed in SZ 2.0: layers offset segment_size pwr_type
Moreover, the default setting of sz.szMode is SZ_BEST_COMPRESSION now.
In SZ 2.0, we added a parameter called losslessCompressor, which is either GZIP_COMPRESSOR or ZSTD_COMPRSSOR. The latter is the recommended setting. If not set for this parameter, ZSTD_COMPRSSOR will be set by default.
valgrind output signal an invalid write of size 4: