# | Line 58 | Line 58 | namespace oopse { | |
---|---|---|
58 | Globals* simParams = info->getSimParams(); | |
59 | needCompression_ = simParams->getCompressDumpFile(); | |
60 | ||
61 | + | #ifdef HAVE_LIBZ |
62 | if (needCompression_) { | |
63 | filename_ += ".gz"; | |
64 | eorFilename_ += ".gz"; | |
65 | } | |
66 | + | #endif |
67 | ||
68 | #ifdef IS_MPI | |
69 | ||
# | Line 97 | Line 99 | namespace oopse { | |
99 | eorFilename_ = filename_.substr(0, filename_.rfind(".")) + ".eor"; | |
100 | ||
101 | needCompression_ = simParams->getCompressDumpFile(); | |
102 | + | |
103 | + | #ifdef HAVE_LIBZ |
104 | if (needCompression_) { | |
105 | filename_ += ".gz"; | |
106 | eorFilename_ += ".gz"; | |
107 | } | |
108 | + | #endif |
109 | ||
110 | #ifdef IS_MPI | |
111 | ||
# | Line 659 | Line 664 | std::ostream* DumpWriter::createOStream(const std::str | |
664 | } | |
665 | ||
666 | std::ostream* DumpWriter::createOStream(const std::string& filename) { | |
667 | + | |
668 | std::ostream* newOStream; | |
669 | + | #ifdef HAVE_LIBZ |
670 | if (needCompression_) { | |
671 | newOStream = new ogzstream(filename.c_str()); | |
672 | } else { | |
673 | newOStream = new std::ofstream(filename.c_str()); | |
674 | } | |
675 | + | #else |
676 | + | newOStream = new std::ofstream(filename.c_str()); |
677 | + | #endif |
678 | return newOStream; | |
679 | } | |
680 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |