1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-11 03:46:55 +01:00

IO working multiple nodes again. Strategy of all nodes writing metadata is unsafe.

Only one rank should do this. must identify this rank. Means pass communicator to the
Objects.
This commit is contained in:
paboyle
2017-07-02 23:33:48 +01:00
parent a2d3643634
commit dee68fc728
4 changed files with 28 additions and 5 deletions

View File

@ -258,10 +258,13 @@ class GridLimeReader : public BinaryIO {
if ( !strncmp(limeReaderType(LimeR), record_name.c_str(),strlen(record_name.c_str()) ) ) {
// std::cout << GridLogMessage<< " readLimeObject matches ! " <<std::endl;
std::cout << GridLogMessage<< " readLimeObject matches ! " << record_name <<std::endl;
std::vector<char> xmlc(nbytes+1,'\0');
limeReaderReadData((void *)&xmlc[0], &nbytes, LimeR);
std::cout << GridLogMessage<< " readLimeObject matches XML " << &xmlc[0] <<std::endl;
XmlReader RD(&xmlc[0],"");
read(RD,object_name,object);
return;
@ -276,8 +279,9 @@ class GridLimeWriter : public BinaryIO {
public:
///////////////////////////////////////////////////
// FIXME: format for RNG? Now just binary out instead
// FIXME: collective calls or not ?
// : must know if I am the I/O boss
///////////////////////////////////////////////////
FILE *File;
LimeWriter *LimeW;
std::string filename;

View File

@ -66,6 +66,7 @@ namespace Grid {
struct emptyUserRecord : Serializable {
GRID_SERIALIZABLE_CLASS_MEMBERS(emptyUserRecord,int,dummy);
emptyUserRecord() { dummy=0; };
};
////////////////////////

View File

@ -85,6 +85,9 @@ namespace Grid {
nd=4;
dimension.resize(4);
boundary.resize(4);
scidac_checksuma=0;
scidac_checksumb=0;
checksum=0;
}
};