diff --git a/lib/parallelIO/NerscIO.h b/lib/parallelIO/NerscIO.h index 9c280397..79572539 100644 --- a/lib/parallelIO/NerscIO.h +++ b/lib/parallelIO/NerscIO.h @@ -213,37 +213,38 @@ class NerscIO : public BinaryIO { static inline void truncate(std::string file){ std::ofstream fout(file,std::ios::out); } + + #define dump_nersc_header(field, s)\ + s << "BEGIN_HEADER" << std::endl;\ + s << "HDR_VERSION = " << field.hdr_version << std::endl;\ + s << "DATATYPE = " << field.data_type << std::endl;\ + s << "STORAGE_FORMAT = " << field.storage_format << std::endl;\ + for(int i=0;i<4;i++){\ + s << "DIMENSION_" << i+1 << " = " << field.dimension[i] << std::endl ;\ + }\ + s << "LINK_TRACE = " << std::setprecision(10) << field.link_trace << std::endl;\ + s << "PLAQUETTE = " << std::setprecision(10) << field.plaquette << std::endl;\ + for(int i=0;i<4;i++){\ + s << "BOUNDARY_"<