14 #define SZIN_WILSON_FERMIONS 1
41 BinaryFileReader cfg_in(cfg_file);
43 read(cfg_in,date_size);
44 read(cfg_in,banner_size);
45 read(cfg_in,cfg_record_size);
47 if( date_size < 1 || date_size > 99)
49 QDPIO::cerr << __func__
50 <<
": apparently wrong SZIN configuration file, date_size="
51 << date_size << std::endl;
61 char *date_tmp =
new char[date_size+1];
62 for(
int i=0;
i < date_size; ++
i)
68 date_tmp[date_size] =
'\0';
69 header.
date = date_tmp;
72 char *banner_tmp =
new char[banner_size+1];
73 for(
int i=0;
i < banner_size; ++
i)
79 banner_tmp[banner_size] =
'\0';
80 header.
banner = banner_tmp;
214 QDPIO::cerr << __func__ <<
": SZIN configuration file version is invalid: version"
220 if (
Nd != header.
Nd )
222 QDPIO::cerr << __func__
223 <<
": num dimensions different from SZIN config file: header.Nd="
224 << header.
Nd << std::endl;
228 if ( Nc != header.
Nc )
230 QDPIO::cerr << __func__
231 <<
": number of colors specified different from SZIN config file: header.Nc="
232 << header.
Nc << std::endl;
239 for(
int j = 0;
j <
Nd; ++
j)
240 if ( header.
nrow[
j] != Layout::lattSize()[
j] )
242 QDPIO::cerr << __func__
243 <<
": lattice size specified different from configuration file: nrow["
244 <<
j <<
"]=" << header.
nrow[
j] << std::endl;
250 multi1d<Real32> wstat(41*20);
251 read(cfg_in, wstat, wstat.size());
260 multi1d<int> lattsize_cb = Layout::lattSize();
264 for(
int j = 0;
j <
Nd;
j++)
266 LatticeColorMatrixF u_old;
268 for(
int cb=0;
cb < 2; ++
cb) {
269 for(
int sitecb=0; sitecb < Layout::vol()/2; ++sitecb)
271 multi1d<int>
coord = crtesn(sitecb, lattsize_cb);
275 for(
int m=1;
m<
Nd;
m++)
284 LatticeColorMatrix u_old_prec(u_old);
321 XMLBufferWriter xml_buf;
322 write(xml_buf,
"szin", header);
330 QDPIO::cerr << __func__ <<
": Error in readszin: " << e.c_str() << std::endl;
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 readSzin(SzinGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Read a SZIN configuration file.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
void transpose(multi2d< LatticeColorVector > &dist_rep, const multi2d< LatticeColorVector > &prop_rep)
Take transpose of a matrix in (explicit) spin space.
#define SZIN_WILSON_FERMIONS
Read in a configuration written by SZIN up to configuration version 7.
Routines associated with SZIN gauge field IO.