28 BinaryFileReader cfg_in(cfg_file);
31 read(cfg_in, magic_number);
33 bool byterev = false ;
34 if( magic_number != 20103){
38 QDPUtil::byte_swap((
void *)&magic_number,
sizeof(
int), 1 );
40 if( magic_number != 20103){
49 QDPUtil::byte_swap((
void *)&header.
nrow[0],
sizeof(
int),
Nd );
51 for(
int j = 0;
j <
Nd; ++
j)
52 if ( header.
nrow[
j] != Layout::lattSize()[
j] )
53 QDP_error_exit(
"readMILC: unexpected lattice size: header.nrow[%d]=%d",
58 cfg_in.readArray(date_tmp, 1, 64);
60 header.
date = date_tmp;
70 unsigned int sum29, sum31;
74 QDPUtil::byte_swap((
void *)&sum29,
sizeof(
int),1);
75 QDPUtil::byte_swap((
void *)&sum31,
sizeof(
int),1);
77 QDPIO::cout<<
"Global sums (sum29, sum31): "<<sum29<<
" "<<sum31<<std::endl;
84 for(
int site=0; site < Layout::vol(); ++site)
86 multi1d<int>
coord = crtesn(site, Layout::lattSize());
98 QDPIO::cout<<
"Doing bytereversal on the links...\n" ;
101 for(
int s(0);
s < Layout::sitesOnNode();
s++)
102 QDPUtil::byte_swap((
void *)&
u[
mu].elem(
s).elem(),
sizeof(RealF),2*Nc*Nc);
130 XMLBufferWriter xml_buf;
131 write(xml_buf,
"MILC", header);
159 multi1d<LatticeColorMatrixF> uu;
163 for(
int mu=0;
mu<uu.size(); ++
mu)
Primary include file for CHROMA library code.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void readMILC(MILCGauge_t &header, multi1d< LatticeColorMatrixF > &u, const std::string &cfg_file)
Read a MILC configuration file.
MILC gauge format routines.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
multi1d< LatticeFermion > s(Ncb)
Read a MILC gauge configuration written in the 1997 format.