30 int cfg_record_size = 0;
32 int date_size = header.
date.length() + 1;
33 int banner_size = header.
banner.length() + 1;
35 if( date_size < 1 || date_size > 99)
36 QDP_error_exit(
"Apparently wrong configuration file, date_size=%d",date_size);
38 write(cfg_out, date_size);
39 write(cfg_out, banner_size);
40 write(cfg_out, cfg_record_size);
45 for(
int i=0;
i < date_size; ++
i)
47 int j = header.
date.c_str()[
i];
51 for(
int i=0;
i < banner_size; ++
i)
89 multi1d<Real32> wstat(41*20);
91 write(cfg_out, wstat, wstat.size());
118 BinaryFileWriter cfg_out(cfg_file);
127 multi1d<int> lattsize_cb = Layout::lattSize();
131 for(
int j = 0;
j <
Nd;
j++)
134 LatticeColorMatrixF u_old_prec(u_old);
136 for(
int cb=0;
cb < 2; ++
cb)
137 for(
int sitecb=0; sitecb < Layout::vol()/2; ++sitecb)
139 multi1d<int>
coord = crtesn(sitecb, lattsize_cb);
143 for(
int m=1;
m<
Nd;
m++)
177 XMLReader xml_in(xml);
178 read(xml_in,
"/szin", header);
199 int j_decay,
int t_start,
int t_end,
205 BinaryFileWriter cfg_out(cfg_file);
210 header.
nrow = Layout::lattSize();
211 if (j_decay < 0 || j_decay >=
Nd)
214 if (t_start < 0 || t_start >= header.
nrow[
j_decay])
220 if (t_start == t_end)
221 QDP_error_exit(
"writeSzinTrunc: invalid t_start=%d t_end=%d", t_start, t_end);
242 QDPIO::cout << __func__ <<
": trunc lattice = ";
243 for(
int j = 0;
j <
Nd;
j++)
245 QDPIO::cout <<
" " << header.
nrow[
j];
247 QDPIO::cout << std::endl;
249 multi1d<int> lattsize_cb = header.
nrow;
254 for(
int j = 0;
j <
Nd;
j++)
255 vol_cb *= lattsize_cb[
j];
258 for(
int j = 0;
j <
Nd;
j++)
261 LatticeColorMatrixF u_old(u_tt);
263 for(
int cb=0;
cb < 2; ++
cb)
264 for(
int sitecb=0; sitecb < vol_cb; ++sitecb)
266 multi1d<int>
coord = crtesn(sitecb, lattsize_cb);
270 for(
int m=1;
m<
Nd;
m++)
307 BinaryFileWriter cfg_out(cfg_file);
310 header.
nrow = Layout::lattSize();
311 if (j_decay < 0 || j_decay >=
Nd)
315 QDP_error_exit(
"writeSzinReplica: invalid n_replica=%d", n_replica);
327 multi1d<int> lattsize_cb = header.
nrow;
332 for(
int j = 0;
j <
Nd;
j++)
333 vol_cb *= lattsize_cb[
j];
336 for(
int j = 0;
j <
Nd;
j++)
340 for(
int cb=0;
cb < 2; ++
cb)
341 for(
int sitecb=0; sitecb < vol_cb; ++sitecb)
343 multi1d<int>
coord = crtesn(sitecb, lattsize_cb);
347 for(
int m=1;
m<
Nd;
m++)
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 writeSzinReplica(SzinGauge_t &header, const multi1d< LatticeColorMatrix > &u, int j_decay, int n_replica, const std::string &cfg_file)
Write a replicated (in time direction) SZIN configuration file.
static void writeSzinHeader(BinaryWriter &cfg_out, const SzinGauge_t &header)
Write a SZIN header to a binary file.
void writeSzin(const SzinGauge_t &header, const multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Write a SZIN configuration file.
void writeSzinTrunc(const SzinGauge_t &header0, const multi1d< LatticeColorMatrix > &u, int j_decay, int t_start, int t_end, const std::string &cfg_file)
Write a truncated SZIN configuration file.
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
void transpose(multi2d< LatticeColorVector > &dist_rep, const multi2d< LatticeColorVector > &prop_rep)
Take transpose of a matrix in (explicit) spin space.
Routines associated with SZIN gauge field IO.
Write a SZIN configuration written at configuration version 7.