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 |
|
|
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 |
|
|
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 |
|
|