QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
eigensolve_test.cpp
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <time.h>
4 #include <math.h>
5 #include <string.h>
6 #include <algorithm>
7 
8 #include <util_quda.h>
9 #include <test_util.h>
10 #include <dslash_util.h>
11 #include <blas_reference.h>
14 #include "misc.h"
15 
16 #if defined(QMP_COMMS)
17 #include <qmp.h>
18 #elif defined(MPI_COMMS)
19 #include <mpi.h>
20 #endif
21 
22 #include <qio_field.h>
23 
24 #define MAX(a, b) ((a) > (b) ? (a) : (b))
25 
26 // In a typical application, quda.h is the only QUDA header required.
27 #include <quda.h>
28 
29 // Wilson, clover-improved Wilson, twisted mass, and domain wall are supported.
31 extern int device;
32 extern int xdim;
33 extern int ydim;
34 extern int zdim;
35 extern int tdim;
36 extern int Lsdim;
37 extern int gridsize_from_cmdline[];
39 extern QudaPrecision prec;
44 extern double mass;
45 extern double kappa; // kappa of Dirac operator
46 extern int laplace3D;
47 double kappa5; // Derived, not given. Used in matVec checks.
48 extern double mu;
49 extern double anisotropy;
50 extern double tol; // tolerance for inverter
51 extern double tol_hq; // heavy-quark tolerance for inverter
52 extern char latfile[];
53 extern bool unit_gauge;
54 extern int Nsrc; // number of spinors to apply to simultaneously
55 extern int niter;
56 extern int gcrNkrylov; // number of inner iterations for GCR, or l for BiCGstab-l
57 extern int pipeline; // length of pipeline for fused operations in GCR or BiCGstab-l
58 
60 
64 
65 // Twisted mass flavor type
67 
68 extern void usage(char **);
69 
70 extern double clover_coeff;
71 extern bool compute_clover;
72 
73 extern int eig_nEv;
74 extern int eig_nKr;
75 extern int eig_nConv;
76 extern bool eig_require_convergence;
77 extern int eig_check_interval;
78 extern int eig_max_restarts;
79 extern double eig_tol;
80 extern int eig_maxiter;
81 extern bool eig_use_poly_acc;
82 extern int eig_poly_deg;
83 extern double eig_amin;
84 extern double eig_amax;
85 extern bool eig_use_normop;
86 extern bool eig_use_dagger;
87 extern bool eig_compute_svd;
89 extern QudaEigType eig_type;
90 extern bool eig_arpack_check;
91 extern char eig_arpack_logfile[];
92 extern char eig_QUDA_logfile[];
93 extern char eig_vec_infile[];
94 extern char eig_vec_outfile[];
95 
96 extern bool verify_results;
97 
98 namespace quda
99 {
100  extern void setTransferGPU(bool);
101 }
102 
104 {
105  printfQuda("running the following test:\n");
106 
107  printfQuda("prec sloppy_prec link_recon sloppy_link_recon S_dimension T_dimension Ls_dimension\n");
108  printfQuda("%s %s %s %s %d/%d/%d %d %d\n", get_prec_str(prec),
110  tdim, Lsdim);
111 
112  printfQuda("\n Eigensolver parameters\n");
113  printfQuda(" - solver mode %s\n", get_eig_type_str(eig_type));
114  printfQuda(" - spectrum requested %s\n", get_eig_spectrum_str(eig_spectrum));
115  printfQuda(" - number of eigenvectors requested %d\n", eig_nConv);
116  printfQuda(" - size of eigenvector search space %d\n", eig_nEv);
117  printfQuda(" - size of Krylov space %d\n", eig_nKr);
118  printfQuda(" - solver tolerance %e\n", eig_tol);
119  printfQuda(" - convergence required (%s)\n", eig_require_convergence ? "true" : "false");
120  if (eig_compute_svd) {
121  printfQuda(" - Operator: MdagM. Will compute SVD of M\n");
122  printfQuda(" - ***********************************************************\n");
123  printfQuda(" - **** Overriding any previous choices of operator type. ****\n");
124  printfQuda(" - **** SVD demands normal operator, will use MdagM ****\n");
125  printfQuda(" - ***********************************************************\n");
126  } else {
127  printfQuda(" - Operator: daggered (%s) , norm-op (%s)\n", eig_use_dagger ? "true" : "false",
128  eig_use_normop ? "true" : "false");
129  }
130  if (eig_use_poly_acc) {
131  printfQuda(" - Chebyshev polynomial degree %d\n", eig_poly_deg);
132  printfQuda(" - Chebyshev polynomial minumum %e\n", eig_amin);
133  printfQuda(" - Chebyshev polynomial maximum %e\n\n", eig_amax);
134  }
135  printfQuda("Grid partition info: X Y Z T\n");
136  printfQuda(" %d %d %d %d\n", dimPartitioned(0), dimPartitioned(1), dimPartitioned(2),
137  dimPartitioned(3));
138  return;
139 }
140 
145 
147 {
148  gauge_param.X[0] = xdim;
149  gauge_param.X[1] = ydim;
150  gauge_param.X[2] = zdim;
151  gauge_param.X[3] = tdim;
152 
153  gauge_param.anisotropy = anisotropy;
154  gauge_param.type = QUDA_WILSON_LINKS;
155  gauge_param.gauge_order = QUDA_QDP_GAUGE_ORDER;
156  gauge_param.t_boundary = QUDA_PERIODIC_T;
157 
158  gauge_param.cpu_prec = cpu_prec;
159 
160  gauge_param.cuda_prec = cuda_prec;
161  gauge_param.reconstruct = link_recon;
162 
163  gauge_param.cuda_prec_sloppy = cuda_prec_sloppy;
165 
168 
169  gauge_param.gauge_fix = QUDA_GAUGE_FIXED_NO;
170 
171  gauge_param.ga_pad = 0;
172  // For multi-GPU, ga_pad must be large enough to store a time-slice
173 #ifdef MULTI_GPU
174  int x_face_size = gauge_param.X[1] * gauge_param.X[2] * gauge_param.X[3] / 2;
175  int y_face_size = gauge_param.X[0] * gauge_param.X[2] * gauge_param.X[3] / 2;
176  int z_face_size = gauge_param.X[0] * gauge_param.X[1] * gauge_param.X[3] / 2;
177  int t_face_size = gauge_param.X[0] * gauge_param.X[1] * gauge_param.X[2] / 2;
178  int pad_size = MAX(x_face_size, y_face_size);
179  pad_size = MAX(pad_size, z_face_size);
180  pad_size = MAX(pad_size, t_face_size);
181  gauge_param.ga_pad = pad_size;
182 #endif
183 }
184 
186 {
187 
188  if (kappa == -1.0) {
189  inv_param.mass = mass;
190  inv_param.kappa = 1.0 / (2.0 * (1 + 3 / anisotropy + mass));
191  if (dslash_type == QUDA_LAPLACE_DSLASH) inv_param.kappa = 1.0 / (8 + mass);
192  } else {
193  inv_param.kappa = kappa;
194  inv_param.mass = 0.5 / kappa - (1.0 + 3.0 / anisotropy);
195  if (dslash_type == QUDA_LAPLACE_DSLASH) inv_param.mass = 1.0 / kappa - 8.0;
196  }
197  inv_param.laplace3D = laplace3D;
198 
199  printfQuda("Kappa = %.8f Mass = %.8f\n", inv_param.kappa, inv_param.mass);
200 
201  inv_param.Ls = 1;
202 
203  inv_param.sp_pad = 0;
204  inv_param.cl_pad = 0;
205 
206  inv_param.cpu_prec = cpu_prec;
207  inv_param.cuda_prec = cuda_prec;
209 
213  inv_param.dirac_order = QUDA_DIRAC_ORDER;
214 
216  inv_param.clover_cpu_prec = cpu_prec;
217  inv_param.clover_cuda_prec = cuda_prec;
221  }
222 
225 
226  inv_param.dslash_type = dslash_type;
227 
229 
230  inv_param.mu = mu;
231  inv_param.epsilon = 0.1385;
232  inv_param.twist_flavor = twist_flavor;
233  inv_param.Ls = (inv_param.twist_flavor == QUDA_TWIST_NONDEG_DOUBLET) ? 2 : 1;
234 
237  inv_param.m5 = -1.8;
238  kappa5 = 0.5 / (5 + inv_param.m5);
239  inv_param.Ls = Lsdim;
240  for (int k = 0; k < Lsdim; k++) { // for mobius only
241  // b5[k], c[k] values are chosen for arbitrary values,
242  // but the difference of them are same as 1.0
243  inv_param.b_5[k] = 1.452;
244  inv_param.c_5[k] = 0.452;
245  }
246  }
247 
248  inv_param.clover_coeff = clover_coeff;
249 
250  inv_param.dagger = QUDA_DAG_NO;
252 
253  inv_param.solution_type = solution_type;
255 
256  inv_param.matpc_type = matpc_type;
257  inv_param.inv_type = QUDA_GCR_INVERTER;
258  inv_param.verbosity = verbosity;
260  inv_param.tol = tol;
261 
262  // require both L2 relative and heavy quark residual to determine
263  // convergence
264  inv_param.residual_type = static_cast<QudaResidualType>(QUDA_L2_RELATIVE_RESIDUAL);
265  // specify a tolerance for the residual for heavy quark residual
266  inv_param.tol_hq = tol_hq;
267 
268  // these can be set individually
269  for (int i = 0; i < inv_param.num_offset; i++) {
270  inv_param.tol_offset[i] = inv_param.tol;
271  inv_param.tol_hq_offset[i] = inv_param.tol_hq;
272  }
273  inv_param.maxiter = niter;
274  inv_param.gcrNkrylov = 10;
275  inv_param.pipeline = 10;
276  inv_param.reliable_delta = 1e-4;
277 
278  // domain decomposition preconditioner parameters
280  inv_param.precondition_cycle = 1;
281  inv_param.tol_precondition = 1e-1;
282  inv_param.maxiter_precondition = 1;
283  inv_param.omega = 1.0;
284 }
285 
286 // Parameters defining the eigensolver
287 void setEigParam(QudaEigParam &eig_param)
288 {
289  eig_param.eig_type = eig_type;
290  eig_param.spectrum = eig_spectrum;
293  errorQuda("Only real spectrum type (LR or SR) can be passed to Lanczos type solver");
294  }
295 
296  // The solver will exit when nConv extremal eigenpairs have converged
297  if (eig_nConv < 0) {
298  eig_param.nConv = eig_nEv;
299  eig_nConv = eig_nEv;
300  } else {
301  eig_param.nConv = eig_nConv;
302  }
303 
304  eig_param.nEv = eig_nEv;
305  eig_param.nKr = eig_nKr;
306  eig_param.tol = eig_tol;
309  eig_param.max_restarts = eig_max_restarts;
310  eig_param.cuda_prec_ritz = cuda_prec;
311 
315  if (eig_compute_svd) {
316  eig_param.use_dagger = QUDA_BOOLEAN_FALSE;
317  eig_param.use_norm_op = QUDA_BOOLEAN_TRUE;
318  }
319 
321  eig_param.poly_deg = eig_poly_deg;
322  eig_param.a_min = eig_amin;
323  eig_param.a_max = eig_amax;
324 
326  strcpy(eig_param.arpack_logfile, eig_arpack_logfile);
327  strcpy(eig_param.QUDA_logfile, eig_QUDA_logfile);
328 
329  strcpy(eig_param.vec_infile, eig_vec_infile);
330  strcpy(eig_param.vec_outfile, eig_vec_outfile);
331 }
332 
333 int main(int argc, char **argv)
334 {
335  for (int i = 1; i < argc; i++) {
336  if (process_command_line_option(argc, argv, &i) == 0) { continue; }
337  printf("ERROR: Invalid option:%s\n", argv[i]);
338  usage(argv);
339  }
340 
344 
345  // initialize QMP/MPI, QUDA comms grid and RNG (test_util.cpp)
346  initComms(argc, argv, gridsize_from_cmdline);
347 
348  // call srand() with a rank-dependent seed
349  initRand();
350 
351  // QUDA parameters begin here.
352  //------------------------------------------------------------------------------
354  setGaugeParam(gauge_param);
355 
356  QudaEigParam eig_param = newQudaEigParam();
357  // Though no inversions are performed, the inv_param
358  // structure contains all the information we need to
359  // construct the dirac operator. We encapsualte the
360  // inv_param structure inside the eig_param structure
361  // to avoid any confusion
362  QudaInvertParam eig_inv_param = newQudaInvertParam();
363  setInvertParam(eig_inv_param);
364  eig_param.invert_param = &eig_inv_param;
365  setEigParam(eig_param);
366 
367  // All user inputs now defined
369 
370  // set parameters for the reference Dslash, and prepare fields to be loaded
373  dw_setDims(gauge_param.X, eig_inv_param.Ls);
374  } else {
375  setDims(gauge_param.X);
376  }
377 
378  // set spinor site size
379  int sss = 24;
380  if (dslash_type == QUDA_LAPLACE_DSLASH) sss = 6;
381  setSpinorSiteSize(sss);
382 
383  size_t gSize = (gauge_param.cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float);
384 
385  void *gauge[4], *clover = 0, *clover_inv = 0;
386 
387  for (int dir = 0; dir < 4; dir++) { gauge[dir] = malloc(V * gaugeSiteSize * gSize); }
388 
389  if (strcmp(latfile, "")) { // load in the command line supplied gauge field
390  read_gauge_field(latfile, gauge, gauge_param.cpu_prec, gauge_param.X, argc, argv);
391  construct_gauge_field(gauge, 2, gauge_param.cpu_prec, &gauge_param);
392  } else { // else generate an SU(3) field
393  if (unit_gauge) {
394  // unit SU(3) field
395  construct_gauge_field(gauge, 0, gauge_param.cpu_prec, &gauge_param);
396  } else {
397  // random SU(3) field
398  construct_gauge_field(gauge, 1, gauge_param.cpu_prec, &gauge_param);
399  }
400  }
401 
403  double norm = 0.1; // clover components are rands in the range (-norm, norm)
404  double diag = 1.0; // constant added to the diagonal
405 
406  size_t cSize = eig_inv_param.clover_cpu_prec;
407  clover = malloc(V * cloverSiteSize * cSize);
408  clover_inv = malloc(V * cloverSiteSize * cSize);
409  if (!compute_clover) construct_clover_field(clover, norm, diag, eig_inv_param.clover_cpu_prec);
410 
411  eig_inv_param.compute_clover = compute_clover;
412  if (compute_clover) eig_inv_param.return_clover = 1;
413  eig_inv_param.compute_clover_inverse = 1;
414  eig_inv_param.return_clover_inverse = 1;
415  }
416 
417  // initialize the QUDA library
418  initQuda(device);
419 
420  // load the gauge field
421  loadGaugeQuda((void *)gauge, &gauge_param);
422 
423  // this line ensure that if we need to construct the clover inverse
424  // (in either the smoother or the solver) we do so
426  loadCloverQuda(clover, clover_inv, &eig_inv_param);
427  }
428 
429  // QUDA eigensolver test
430  //----------------------------------------------------------------------------
431 
432  // Host side arrays to store the eigenpairs computed by QUDA
433  void **host_evecs = (void **)malloc(eig_nConv * sizeof(void *));
434  for (int i = 0; i < eig_nConv; i++) {
435  host_evecs[i] = (void *)malloc(V * eig_inv_param.Ls * sss * eig_inv_param.cpu_prec);
436  }
437  double _Complex *host_evals = (double _Complex *)malloc(eig_param.nEv * sizeof(double _Complex));
438 
439  // This function returns the host_evecs and host_evals pointers, populated with the
440  // requested data, at the requested prec. All the information needed to perfom the
441  // solve is in the eig_param container. If eig_param.arpack_check == true and
442  // precision is double, the routine will use ARPACK rather than the GPU.
443  double time = -((double)clock());
444  if (eig_param.arpack_check && !(eig_inv_param.cpu_prec == QUDA_DOUBLE_PRECISION)) {
445  errorQuda("ARPACK check only available in double precision");
446  }
447 
448  eigensolveQuda(host_evecs, host_evals, &eig_param);
449  time += (double)clock();
450  printfQuda("Time for %s solution = %f\n", eig_param.arpack_check ? "ARPACK" : "QUDA", time / CLOCKS_PER_SEC);
451 
452  // Deallocate host memory
453  for (int i = 0; i < eig_nConv; i++) free(host_evecs[i]);
454  free(host_evecs);
455  free(host_evals);
456 
457  freeGaugeQuda();
459 
460  // finalize the QUDA library
461  endQuda();
462 
463  // finalize the communications layer
464  finalizeComms();
465 
467  if (clover) free(clover);
468  if (clover_inv) free(clover_inv);
469  }
470  for (int dir = 0; dir < 4; dir++) free(gauge[dir]);
471 
472  return 0;
473 }
int maxiter_precondition
Definition: quda.h:292
static size_t gSize
int dimPartitioned(int dim)
Definition: test_util.cpp:1776
double mass
Definition: test_util.cpp:1646
QudaDiracFieldOrder dirac_order
Definition: quda.h:219
QudaMassNormalization mass_normalization
Definition: quda.h:208
double tol_hq_offset[QUDA_MAX_MULTI_SHIFT]
Definition: quda.h:182
QudaReconstructType reconstruct_sloppy
Definition: quda.h:53
double anisotropy
Definition: quda.h:38
void freeCloverQuda(void)
double kappa
Definition: test_util.cpp:1647
int eig_nConv
Definition: test_util.cpp:1725
QudaBoolean use_dagger
Definition: quda.h:401
void endQuda(void)
void construct_gauge_field(void **gauge, int type, QudaPrecision precision, QudaGaugeParam *param)
Definition: test_util.cpp:1047
int gridsize_from_cmdline[]
Definition: test_util.cpp:49
QudaSolveType solve_type
Definition: quda.h:205
int pipeline
Definition: test_util.cpp:1634
enum QudaPrecision_s QudaPrecision
bool compute_clover
Definition: test_util.cpp:1654
bool unit_gauge
Definition: test_util.cpp:1624
int ga_pad
Definition: quda.h:63
double_complex c_5[QUDA_MAX_DWF_LS]
Definition: quda.h:112
void dw_setDims(int *X, const int L5)
Definition: test_util.cpp:187
bool eig_require_convergence
Definition: test_util.cpp:1726
double mu
Definition: quda.h:114
QudaGaugeFixed gauge_fix
Definition: quda.h:61
QudaSchwarzType schwarz_type
Definition: quda.h:310
__host__ __device__ ValueType norm(const complex< ValueType > &z)
Returns the magnitude of z squared.
int eig_nEv
Definition: test_util.cpp:1723
enum QudaResidualType_s QudaResidualType
QudaInverterType inv_type_precondition
Definition: quda.h:270
QudaTwistFlavorType twist_flavor
Definition: test_util.cpp:1660
QudaLinkType type
Definition: quda.h:42
double kappa
Definition: quda.h:106
#define errorQuda(...)
Definition: util_quda.h:121
double tol
Definition: quda.h:121
QudaDslashType dslash_type
Definition: quda.h:102
QudaReconstructType reconstruct_precondition
Definition: quda.h:59
QudaInverterType inv_type
Definition: quda.h:103
QudaPrecision cuda_prec
Definition: quda.h:214
#define cloverSiteSize
Definition: test_util.h:9
int return_clover_inverse
Definition: quda.h:242
enum QudaSolveType_s QudaSolveType
void loadGaugeQuda(void *h_gauge, QudaGaugeParam *param)
QudaPrecision cpu_prec
Definition: quda.h:213
const char * get_eig_spectrum_str(QudaEigSpectrumType type)
Definition: misc.cpp:1008
QudaPrecision prec
Definition: test_util.cpp:1608
int process_command_line_option(int argc, char **argv, int *idx)
Definition: test_util.cpp:2019
double anisotropy
Definition: test_util.cpp:1650
bool eig_use_dagger
Definition: test_util.cpp:1735
QudaDagType dagger
Definition: quda.h:207
void finalizeComms()
Definition: test_util.cpp:128
QudaGaugeParam gauge_param
QudaGaugeFieldOrder gauge_order
Definition: quda.h:43
QudaReconstructType link_recon_sloppy
Definition: test_util.cpp:1606
double tol_hq
Definition: test_util.cpp:1657
const char * get_prec_str(QudaPrecision prec)
Definition: misc.cpp:701
void loadCloverQuda(void *h_clover, void *h_clovinv, QudaInvertParam *inv_param)
QudaSolveType solve_type
Definition: test_util.cpp:1663
int return_clover
Definition: quda.h:241
enum QudaEigType_s QudaEigType
QudaPrecision clover_cuda_prec_sloppy
Definition: quda.h:226
void setDims(int *)
Definition: test_util.cpp:151
QudaMatPCType matpc_type
Definition: test_util.cpp:1662
char eig_vec_outfile[]
Definition: test_util.cpp:1743
QudaFieldLocation input_location
Definition: quda.h:99
void freeGaugeQuda(void)
QudaBoolean use_poly_acc
Definition: quda.h:387
QudaPrecision cpu_prec
double reliable_delta
Definition: quda.h:129
double mu
Definition: test_util.cpp:1648
double eig_amax
Definition: test_util.cpp:1733
double_complex b_5[QUDA_MAX_DWF_LS]
Definition: quda.h:111
QudaSolutionType solution_type
Definition: quda.h:204
int nConv
Definition: quda.h:420
QudaEigType eig_type
Definition: quda.h:384
QudaPrecision clover_cuda_prec
Definition: quda.h:225
int precondition_cycle
Definition: quda.h:307
void setGaugeParam(QudaGaugeParam &gauge_param)
int eig_check_interval
Definition: test_util.cpp:1727
const char * get_eig_type_str(QudaEigType type)
Definition: misc.cpp:1044
QudaSolutionType solution_type
Definition: test_util.cpp:1664
QudaInvertParam * invert_param
Definition: quda.h:381
bool eig_use_normop
Definition: test_util.cpp:1734
QudaBoolean require_convergence
Definition: quda.h:408
void initQuda(int device)
QudaFieldLocation output_location
Definition: quda.h:100
QudaPrecision clover_cuda_prec_precondition
Definition: quda.h:228
QudaInvertParam inv_param
Definition: covdev_test.cpp:37
int eig_maxiter
void setTransferGPU(bool)
double m5
Definition: quda.h:108
int tdim
Definition: test_util.cpp:1618
QudaPrecision cuda_prec_sloppy
Definition: quda.h:215
QudaVerbosity verbosity
Definition: quda.h:244
void setSpinorSiteSize(int n)
Definition: test_util.cpp:211
int ydim
Definition: test_util.cpp:1616
double tol_offset[QUDA_MAX_MULTI_SHIFT]
Definition: quda.h:179
QudaPrecision & cuda_prec_sloppy
QudaInvertParam newQudaInvertParam(void)
const char * get_recon_str(QudaReconstructType recon)
Definition: misc.cpp:768
QudaPrecision cuda_prec_precondition
Definition: quda.h:58
QudaCloverFieldOrder clover_order
Definition: quda.h:230
double tol_hq
Definition: quda.h:123
enum QudaMatPCType_s QudaMatPCType
void setEigParam(QudaEigParam &eig_param)
void usage(char **)
Definition: test_util.cpp:1783
int eig_poly_deg
Definition: test_util.cpp:1731
int poly_deg
Definition: quda.h:390
enum QudaSolutionType_s QudaSolutionType
void eigensolveQuda(void **h_evecs, double_complex *h_evals, QudaEigParam *param)
QudaGammaBasis gamma_basis
Definition: quda.h:221
QudaBoolean use_norm_op
Definition: quda.h:402
double a_min
Definition: quda.h:393
QudaBoolean compute_svd
Definition: quda.h:405
QudaPrecision cuda_prec_sloppy
Definition: quda.h:52
QudaBoolean arpack_check
Definition: quda.h:429
double tol_precondition
Definition: quda.h:289
int gcrNkrylov
Definition: test_util.cpp:1630
int zdim
Definition: test_util.cpp:1617
QudaPrecision prec_precondition
Definition: test_util.cpp:1611
QudaPrecision & cuda_prec_precondition
QudaReconstructType reconstruct
Definition: quda.h:50
QudaPrecision cuda_prec
Definition: quda.h:49
QudaEigSpectrumType eig_spectrum
Definition: test_util.cpp:1737
int X[4]
Definition: quda.h:36
double mass
Definition: quda.h:105
bool eig_compute_svd
Definition: test_util.cpp:1736
int gcrNkrylov
Definition: quda.h:259
int V
Definition: test_util.cpp:27
int compute_clover_inverse
Definition: quda.h:240
double tol
Definition: test_util.cpp:1656
#define MAX(a, b)
int xdim
Definition: test_util.cpp:1615
void construct_clover_field(void *clover, double norm, double diag, QudaPrecision precision)
Definition: test_util.cpp:1167
int main(int argc, char **argv)
void display_test_info()
QudaReconstructType link_recon
Definition: test_util.cpp:1605
int Lsdim
Definition: test_util.cpp:1619
char vec_outfile[256]
Definition: quda.h:462
bool eig_arpack_check
Definition: test_util.cpp:1739
char eig_arpack_logfile[]
Definition: test_util.cpp:1740
double tol
Definition: quda.h:422
QudaPrecision cuda_prec_precondition
Definition: quda.h:217
int eig_max_restarts
Definition: test_util.cpp:1728
enum QudaEigSpectrumType_s QudaEigSpectrumType
double eig_amin
Definition: test_util.cpp:1732
int laplace3D
Definition: test_util.cpp:1622
enum QudaReconstructType_s QudaReconstructType
Main header file for the QUDA library.
void initRand()
Definition: test_util.cpp:138
char arpack_logfile[512]
Definition: quda.h:431
int eig_nKr
Definition: test_util.cpp:1724
double kappa5
bool verify_results
Definition: test_util.cpp:1643
#define printfQuda(...)
Definition: util_quda.h:115
QudaTboundary t_boundary
Definition: quda.h:45
QudaEigType eig_type
Definition: test_util.cpp:1738
QudaTwistFlavorType twist_flavor
Definition: quda.h:117
bool eig_use_poly_acc
Definition: test_util.cpp:1730
char QUDA_logfile[512]
Definition: quda.h:434
QudaReconstructType link_recon_precondition
Definition: test_util.cpp:1607
QudaPrecision prec_sloppy
Definition: test_util.cpp:1609
enum QudaDslashType_s QudaDslashType
int check_interval
Definition: quda.h:424
int max_restarts
Definition: quda.h:426
char latfile[]
Definition: test_util.cpp:1623
QudaEigSpectrumType spectrum
Definition: quda.h:411
QudaResidualType residual_type
Definition: quda.h:320
int num_offset
Definition: quda.h:169
enum QudaVerbosity_s QudaVerbosity
int compute_clover
Definition: quda.h:239
double epsilon
Definition: quda.h:115
char eig_vec_infile[]
Definition: test_util.cpp:1742
double omega
Definition: quda.h:295
int device
Definition: test_util.cpp:1602
void initComms(int argc, char **argv, int *const commDims)
Definition: test_util.cpp:88
void read_gauge_field(const char *filename, void *gauge[], QudaPrecision prec, const int *X, int argc, char *argv[])
Definition: qio_field.h:14
double a_max
Definition: quda.h:394
QudaVerbosity verbosity
Definition: test_util.cpp:1614
QudaDslashType dslash_type
Definition: test_util.cpp:1621
QudaPrecision clover_cpu_prec
Definition: quda.h:224
QudaPrecision cuda_prec_ritz
Definition: quda.h:447
int niter
Definition: test_util.cpp:1629
double clover_coeff
Definition: test_util.cpp:1653
double eig_tol
Definition: test_util.cpp:1729
QudaMatPCType matpc_type
Definition: quda.h:206
QudaEigParam newQudaEigParam(void)
char vec_infile[256]
Definition: quda.h:459
char eig_QUDA_logfile[]
Definition: test_util.cpp:1741
int Nsrc
Definition: test_util.cpp:1627
QudaPrecision cpu_prec
Definition: quda.h:47
void setInvertParam(QudaInvertParam &inv_param)
#define gaugeSiteSize
Definition: face_gauge.cpp:34
QudaGaugeParam newQudaGaugeParam(void)
QudaPreserveSource preserve_source
Definition: quda.h:211
double clover_coeff
Definition: quda.h:233
enum QudaTwistFlavorType_s QudaTwistFlavorType
QudaPrecision & cuda_prec