1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Update to enable multiple records per file more consistent with SciDAC.

open, close, write records...
This commit is contained in:
paboyle
2017-06-19 01:01:48 +01:00
parent e6d984b484
commit 1300b0b04b
4 changed files with 173 additions and 137 deletions

View File

@ -78,13 +78,19 @@ int main (int argc, char ** argv)
std::cout <<GridLogMessage<<"** Writing out ILDG conf *********"<<std::endl;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
std::string file("./ckpoint_ildg.4000");
IldgIO::writeConfiguration(file,Umu);
IldgWriter _IldgWriter;
_IldgWriter.open(file);
_IldgWriter.writeConfiguration(Umu,4000,std::string("dummy_ildg_LFN"),std::string("dummy_config"));
_IldgWriter.close();
Umu_saved = Umu;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
std::cout <<GridLogMessage<<"** Reading back ILDG conf *********"<<std::endl;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
IldgIO::readConfiguration(file,Umu,header);
IldgReader _IldgReader;
_IldgReader.open(file);
_IldgReader.readConfiguration(Umu,header);
_IldgReader.close();
Umu_diff = Umu - Umu_saved;
std::cout <<GridLogMessage<< "norm2 Gauge Diff = "<<norm2(Umu_diff)<<std::endl;

View File

@ -52,7 +52,10 @@ int main (int argc, char ** argv)
FieldMetaData header;
std::string file("./ildg.file");
IldgIO::readConfiguration(file,Umu,header);
IldgReader IR;
IR.open(file);
IR.readConfiguration(Umu,header);
IR.close();
for(int mu=0;mu<Nd;mu++){
U[mu] = PeekIndex<LorentzIndex>(Umu,mu);