-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The test script src/mgard_test.c does not use the s parameter. Two illustrations:
- The output does not vary with
s. Try running the following script. It is possible, but very unlikely, that this is due to the data.
#!/bin/bash
S_VALUES="-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 inf"
for s in $S_VALUES
do
./mgard_test data/zort_111_160_15.{dat,mgard.$s} 111 160 15 1e-3 $s
done
for s in $S_VALUES
do
diff --report-identical-files data/zort_111_160_15.mgard.{0.0,$s}
done- As far as I can tell,
sis used this way:-
maininmgard_test.cpassesstomgard_compress. -
mgard_compresspassesstomgard::refactor_qz. -
mgard::refactor_qzdoesn't uses! To see this, compile with-Wunused-parameter:$ g++ -std=c++11 -c -Wall -Wfatal-errors -Wunused-parameter -Iinclude -Iblosc/include -O3 -fPIC -c src/mgard.cpp -o obj/mgard.o 2>&1 | grep --after-context 1 "unused parameter ‘s’" src/mgard.cpp:45:94: warning: unused parameter ‘s’ [-Wunused-parameter] refactor_qz (int nrow, int ncol, int nfib, const double *u, int &outsize, double tol, double s) -- src/mgard.cpp:110:97: warning: unused parameter ‘s’ [-Wunused-parameter] double* recompose_udq(int nrow, int ncol, int nfib, unsigned char *data, int data_len, double s)
-
Additionally, the script improperly compares the tolerance tol (which, if I understand correctly, is on the relative error in the s norm) with the relative error in the L^∞ norm. Hopefully as a result, it reports a failure with this dataset (run after applying the commits in #8).
$ ./mgard_test data.{bin,mgard} 64 64 64 0.1 0
compress_memory_blosc: 1048584
compressor = zstd ;csize = 1946
compress_memory_blosc done: 137 milliseconds
In size: 2097152 Out size: 1946 Compression ratio: 1077
Rel. L^2 error tolerance: 1.00000E-01
Rel. L^infty error: 1.61896E-01
FAILURE: Error tolerance NOT met!Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working