Commit b060d3c8 authored by Hal Finkel's avatar Hal Finkel
Browse files

add a test that can use SZ - run with -c -l

parent eeacdada
......@@ -99,6 +99,7 @@ int main(int argc, char *argv[]) {
MPI_Comm_size(MPI_COMM_WORLD, &commRanks);
bool UseAOS = false;
bool UseLC = false;
int a = 1;
if (argc > 1 && string(argv[a]) == "-a") {
UseAOS = true;
......@@ -112,8 +113,15 @@ int main(int argc, char *argv[]) {
++a;
}
if (argc > 1 && string(argv[a]) == "-l") {
UseLC = true;
--argc;
++a;
}
if(argc != 4) {
fprintf(stderr,"USAGE: %s [-a] [-c] <mpiioName> <NP> <seed>\n", argv[0]);
fprintf(stderr,"USAGE: %s [-a] [-c] [-l] <mpiioName> <NP> <seed>\n", argv[0]);
exit(-1);
}
......@@ -183,14 +191,20 @@ int main(int argc, char *argv[]) {
std::generate(id.begin(), id.end(), Generator<ID_T>(25, 3));
std::fill(mask.begin(), mask.end(), 25);
GenericIO::LossyCompressionInfo LCI;
if (UseLC) {
LCI.Mode = GenericIO::LossyCompressionInfo::LCModeRel;
LCI.RelErrThreshold = 1e-3;
}
if (UseAOS) {
GIO.addVariable("pos", pos, CoordFlagsX | CoordFlagsY | CoordFlagsZ |
GenericIO::VarHasExtraSpace);
GenericIO::VarHasExtraSpace, LCI);
GIO.addVariable("vel", vel, GenericIO::VarHasExtraSpace);
} else {
GIO.addVariable("x", xx, CoordFlagsX | GenericIO::VarHasExtraSpace);
GIO.addVariable("y", yy, CoordFlagsY | GenericIO::VarHasExtraSpace);
GIO.addVariable("z", zz, CoordFlagsZ | GenericIO::VarHasExtraSpace);
GIO.addVariable("x", xx, CoordFlagsX | GenericIO::VarHasExtraSpace, LCI);
GIO.addVariable("y", yy, CoordFlagsY | GenericIO::VarHasExtraSpace, LCI);
GIO.addVariable("z", zz, CoordFlagsZ | GenericIO::VarHasExtraSpace, LCI);
GIO.addVariable("vx", vx, GenericIO::VarHasExtraSpace);
GIO.addVariable("vy", vy, GenericIO::VarHasExtraSpace);
GIO.addVariable("vz", vz, GenericIO::VarHasExtraSpace);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment