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

I/O improvements

This commit is contained in:
paboyle
2017-06-11 23:14:10 +01:00
parent 092dcd4e04
commit 3bfd1f13e6
26 changed files with 779 additions and 579 deletions

View File

@ -64,8 +64,8 @@ int main (int argc, char ** argv)
std::cout <<GridLogMessage<< " ...done "<<std::endl;
std::string rfile("./ckpoint_rng.4000");
FieldMetaData rngheader;
NerscIO::writeRNGState(sRNGa,pRNGa,rfile);
NerscField rngheader;
NerscIO::readRNGState (sRNGb,pRNGb,rngheader,rfile);
LatticeComplex tmpa(&Fine); random(pRNGa,tmpa);
@ -87,7 +87,7 @@ int main (int argc, char ** argv)
SU3::HotConfiguration(pRNGa,Umu);
NerscField header;
FieldMetaData header;
std::string file("./ckpoint_lat.4000");
int precision32 = 0;

View File

@ -50,7 +50,7 @@ int main (int argc, char ** argv)
LatticeGaugeField Umu(&Fine);
std::vector<LatticeColourMatrix> U(4,&Fine);
NerscField header;
FieldMetaData header;
std::string file("./ckpoint_lat");
NerscIO::readConfiguration(Umu,header,file);

View File

@ -31,6 +31,7 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
using namespace Grid;
using namespace Grid::QCD;
GRID_SERIALIZABLE_ENUM(myenum, undef, red, 1, blue, 2, green, 3);
@ -62,6 +63,7 @@ public:
}
};
int16_t i16 = 1;
uint16_t u16 = 2;
int32_t i32 = 3;
@ -237,7 +239,22 @@ int main(int argc,char **argv)
std::cout << "Loaded (JSON) -----------------" << std::endl;
std::cout << jcopy1 << std::endl << jveccopy1 << std::endl;
}
{
ildgFormat format;
format.version =1.0;
format.field =std::string("su3gauge");
format.precision =32;
format.lx =24;
format.ly =24;
format.lz =24;
format.lt =48;
XmlWriter WR("ildg-format.xml","");
XmlWriter WRs("","");
write(WR,"ildgFormat",format);
write(WRs,"ildgFormat",format);
std::cout << " XmlString: " <<WRs.XmlString()<<std::endl;
}
/*
// This is still work in progress
{