1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 13:57:07 +01:00

Adding a norm of a general field check, so that for things other than gauge configs there is an analogue of plaquette norm.

Improve argument checking in the BinaryIO.h, as there looks to be some corruption issue intermittently on tesseract jobs.
Not clear where the root bug is.
This commit is contained in:
Peter Boyle
2019-01-16 22:35:58 +00:00
parent 91a7fe247b
commit 9b6ddb6e54
4 changed files with 99 additions and 16 deletions

View File

@ -53,7 +53,6 @@ int main (int argc, char ** argv)
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
GridCartesian Coarse(clatt_size,simd_layout,mpi_layout);
GridParallelRNG pRNGa(&Fine);
GridParallelRNG pRNGb(&Fine);
GridSerialRNG sRNGa;
@ -94,6 +93,27 @@ int main (int argc, char ** argv)
_IldgReader.close();
Umu_diff = Umu - Umu_saved;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
std::cout <<GridLogMessage<<"** Writing out ILDG conf *********"<<std::endl;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
file = std::string("./ckpoint_scidac.4000");
emptyUserRecord record;
ScidacWriter _ScidacWriter(Fine.IsBoss());
_ScidacWriter.open(file);
_ScidacWriter.writeScidacFieldRecord(Umu,record);
_ScidacWriter.close();
Umu_saved = Umu;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
std::cout <<GridLogMessage<<"** Reading back ILDG conf *********"<<std::endl;
std::cout <<GridLogMessage<<"**************************************"<<std::endl;
ScidacReader _ScidacReader;
_ScidacReader.open(file);
_ScidacReader.readScidacFieldRecord(Umu,record);
_ScidacReader.close();
Umu_diff = Umu - Umu_saved;
std::cout <<GridLogMessage<< "norm2 Gauge Diff = "<<norm2(Umu_diff)<<std::endl;
Grid_finalize();