1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

deterministic initialisation of field metadata

This commit is contained in:
Antonin Portelli 2018-03-30 16:03:01 +01:00
parent ab6afd18ac
commit a13c109111
2 changed files with 11 additions and 12 deletions

View File

@ -136,8 +136,9 @@ struct scidacRecord : Serializable {
int, typesize, int, typesize,
int, datacount); int, datacount);
scidacRecord() { version =1.0; } scidacRecord()
: version(1.0), recordtype(0), colors(0), spins(0), typesize(0), datacount(0)
{}
}; };
//////////////////////// ////////////////////////

View File

@ -81,18 +81,16 @@ namespace Grid {
std::string, creation_date, std::string, creation_date,
std::string, archive_date, std::string, archive_date,
std::string, floating_point); std::string, floating_point);
FieldMetaData(void) { // WARNING: non-initialised values might lead to twisted parallel IO
nd=4; // issues, std::string are fine because they initliase to size 0
dimension.resize(4); // as per C++ standard.
boundary.resize(4); FieldMetaData(void)
scidac_checksuma=0; : nd(4), dimension(4,0), boundary(4, ""), data_start(0),
scidac_checksumb=0; link_trace(0.), plaquette(0.), checksum(0),
checksum=0; scidac_checksuma(0), scidac_checksumb(0), sequence_number(0)
} {}
}; };
namespace QCD { namespace QCD {
using namespace Grid; using namespace Grid;