14 #define INVALID_INT QUDA_INVALID_ENUM
15 #define INVALID_DOUBLE DBL_MIN
19 #if defined INIT_PARAM
20 #define P(x, val) ret.x = val
21 #elif defined CHECK_PARAM
22 #define P(x, val) if (param->x == val) errorQuda("Parameter " #x " undefined")
23 #elif defined PRINT_PARAM
25 { if (val == INVALID_DOUBLE) printfQuda(#x " = %g\n", (double)param->x); \
26 else printfQuda(#x " = %d\n", (int)param->x); }
28 #error INIT_PARAM, CHECK_PARAM, and PRINT_PARAM all undefined in check_params.h
34 #if defined INIT_PARAM
37 #elif defined CHECK_PARAM
44 #if defined CHECK_PARAM
51 #if defined INIT_PARAM
59 #if defined INIT_PARAM
109 #if defined INIT_PARAM
111 P(staggered_phase_applied, 0);
121 #if defined INIT_PARAM
123 P(use_resident_gauge, 0);
124 P(use_resident_mom, 0);
125 P(make_resident_gauge, 0);
126 P(make_resident_mom, 0);
127 P(return_result_gauge, 1);
128 P(return_result_mom, 1);
152 #if defined INIT_PARAM
155 #elif defined CHECK_PARAM
162 #if defined CHECK_PARAM
169 #if defined INIT_PARAM
176 P(preserve_deflation_space, 0);
187 P(batched_rotate, 0);
190 P(check_interval, 0);
233 #if defined INIT_PARAM
239 #if defined INIT_PARAM
245 #if defined INIT_PARAM
257 #if defined INIT_PARAM
261 #elif defined CHECK_PARAM
269 #if defined CHECK_PARAM
276 #if defined INIT_PARAM
296 param->clover_cuda_prec_sloppy =
param->clover_cuda_prec;
298 param->clover_cuda_prec_refinement_sloppy =
param->clover_cuda_prec_sloppy;
300 param->clover_cuda_prec_precondition =
param->clover_cuda_prec_sloppy;
302 param->clover_cuda_prec_eigensolver =
param->clover_cuda_prec_sloppy;
306 P(compute_clover_trlog, 0);
308 P(compute_clover_inverse, 0);
310 P(return_clover_inverse, 0);
334 #if defined INIT_PARAM
339 #elif defined CHECK_PARAM
340 static void checkInvertParam(
QudaInvertParam *
param,
void *out_ptr=
nullptr,
void *in_ptr=
nullptr) {
346 #if defined CHECK_PARAM
356 #if defined INIT_PARAM
406 P(use_alternative_reliable, 0);
407 P(use_sloppy_partial_accumulator, 0);
409 P(max_res_increase, 1);
410 P(max_res_increase_total, 10);
411 P(max_hq_res_increase, 1);
412 P(max_hq_res_restart_total, 10);
413 P(heavy_quark_check, 10);
433 for (
int d = 0; d < 4; d++) { P(split_grid[d], 1); }
434 P(num_src_per_sub_partition, 1);
436 for (
int d = 0; d < 4; d++) { P(split_grid[d],
INVALID_INT); }
441 P(compute_action, 0);
442 P(compute_true_res, 1);
448 if (
param->num_offset > 0) {
450 for (
int i=0; i<
param->num_offset; i++) {
495 #if defined INIT_PARAM
521 #if defined INIT_PARAM
529 #if defined INIT_PARAM
543 #if defined INIT_PARAM
545 P(preconditioner, 0);
550 P(precondition_cycle, 1);
557 P(precondition_cycle, 0);
561 #if defined(INIT_PARAM)
573 #if defined(INIT_PARAM)
574 newQudaCloverParam(
param);
575 #elif defined(CHECK_PARAM)
576 checkCloverParam(
param);
603 #elif defined(PRINT_PARAM)
610 #if defined INIT_PARAM
635 #if defined INIT_PARAM
636 P(use_resident_solution, 0);
637 P(make_resident_solution, 0);
644 #if defined INIT_PARAM
645 P(chrono_use_resident, 0);
646 P(chrono_make_resident, 0);
647 P(chrono_replace_last, 0);
648 P(chrono_max_dim, 0);
658 #if !defined CHECK_PARAM
665 #if defined INIT_PARAM
671 #if defined INIT_PARAM
683 #if defined INIT_PARAM
686 #elif defined CHECK_PARAM
693 #if defined CHECK_PARAM
702 #elif defined CHECK_PARAM
703 checkInvertParam(
param->invert_param);
713 int n_level =
param->n_level;
734 for (
int i=0; i<n_level; i++) {
803 P(smoother_schwarz_cycle[i], 1);
875 for (
int i=1; i<n_level-1; i++)
877 errorQuda(
"n_vec %d != %d must be equal on all levels if generate_all_levels == false",
896 for (
int i = 0; i < n_level - 1; i++) {
909 #elif defined(PRINT_PARAM)
915 #if (CUDA_VERSION >= 10010 && __COMPUTE_CAPABILITY__ >= 700)
935 #if defined INIT_PARAM
939 #elif defined CHECK_PARAM
945 printfQuda(
"QUDA Gauge-Observable Parameters:\n");
948 #if defined CHECK_PARAM
960 P(qcharge_density,
nullptr);
973 #if defined INIT_PARAM
977 #elif defined CHECK_PARAM
986 #if defined CHECK_PARAM
1039 #undef INVALID_DOUBLE
void checkBLASParam(QudaBLASParam ¶m)
void printQudaMultigridParam(QudaMultigridParam *param)
void printQudaInvertParam(QudaInvertParam *param)
void printQudaEigParam(QudaEigParam *param)
void printQudaCloverParam(QudaInvertParam *param)
void printQudaBLASParam(QudaBLASParam *param)
void printQudaGaugeParam(QudaGaugeParam *param)
void printQudaGaugeObservableParam(QudaGaugeObservableParam *param)
quda::mgarray< int > num_setup_iter
QudaInverterType inv_type
quda::mgarray< double > setup_ca_lambda_max
quda::mgarray< QudaInverterType > coarse_solver
quda::mgarray< QudaCABasis > coarse_solver_ca_basis
quda::mgarray< int > n_block_ortho
QudaTwistFlavorType twist_flavor
quda::mgarray< int > coarse_solver_maxiter
quda::mgarray< int > nu_post
quda::mgarray< int > nu_pre
quda::mgarray< int > setup_ca_basis_size
quda::mgarray< int > coarse_solver_ca_basis_size
quda::mgarray< double > setup_ca_lambda_min
quda::mgarray< int > setup_maxiter
quda::mgarray< QudaCABasis > setup_ca_basis
QudaMemoryType mem_type_ritz
QudaSolutionType solution_type
QudaDslashType dslash_type
quda::mgarray< double > mu_factor
quda::mgarray< double > coarse_solver_ca_lambda_max
int solution_accumulator_pipeline
quda::mgarray< double > setup_tol
quda::mgarray< double > coarse_solver_ca_lambda_min
quda::mgarray< double > smoother_tol
quda::mgarray< QudaSolveType > smoother_solve_type
quda::mgarray< double > coarse_solver_tol
quda::mgarray< int > setup_maxiter_refresh
quda::mgarray< std::array< int, 4 > > geo_block_size
@ QUDA_DEFAULT_NORMALIZATION
@ QUDA_INVALID_CLOVER_ORDER
@ QUDA_INVALID_SETUP_TYPE
@ QUDA_STAGGERED_PHASE_NO
@ QUDA_STAGGERED_PHASE_INVALID
@ QUDA_TWISTED_CLOVER_DSLASH
@ QUDA_CLOVER_WILSON_DSLASH
@ QUDA_TWISTED_MASS_DSLASH
@ QUDA_DOMAIN_WALL_DSLASH
@ QUDA_CLOVER_HASENBUSCH_TWIST_DSLASH
@ QUDA_DOMAIN_WALL_4D_DSLASH
@ QUDA_CUDA_FIELD_LOCATION
@ QUDA_CPU_FIELD_LOCATION
@ QUDA_INVALID_FIELD_LOCATION
@ QUDA_INVALID_NORMALIZATION
@ QUDA_USE_INIT_GUESS_INVALID
@ QUDA_BLAS_DATATYPE_INVALID
@ QUDA_INVALID_GAMMA_BASIS
@ QUDA_RECONSTRUCT_INVALID
@ QUDA_INVALID_T_BOUNDARY
@ QUDA_INVALID_DIRAC_ORDER
@ QUDA_HEAVY_QUARK_RESIDUAL
@ QUDA_L2_RELATIVE_RESIDUAL
@ QUDA_TRANSFER_AGGREGATE
@ QUDA_EIG_BLK_TR_LANCZOS
@ QUDA_GAUGE_FIXED_INVALID
@ QUDA_BLAS_DATAORDER_ROW
@ QUDA_BLAS_DATAORDER_INVALID
@ QUDA_MPBICGSTAB_INVERTER
@ QUDA_PRESERVE_SOURCE_INVALID
@ QUDA_INVALID_GAUGE_ORDER
@ QUDA_COMPUTE_NULL_VECTOR_INVALID
@ QUDA_COMPUTE_NULL_VECTOR_YES
QudaGaugeFieldOrder gauge_order
QudaPrecision & cuda_prec
QudaPrecision & cuda_prec_sloppy
QudaPrecision & cuda_prec_eigensolver
QudaPrecision & cuda_prec_precondition
QudaPrecision & cuda_prec_refinement_sloppy
QudaPrecision & cuda_prec_ritz
QudaFieldLocation get_pointer_location(const void *ptr)
QudaBLASParam newQudaBLASParam(void)
QudaGaugeParam newQudaGaugeParam(void)
QudaMultigridParam newQudaMultigridParam(void)
QudaGaugeObservableParam newQudaGaugeObservableParam(void)
QudaInvertParam newQudaInvertParam(void)
QudaEigParam newQudaEigParam(void)
#define QUDA_MAX_MG_LEVEL
Maximum number of multi-grid levels. This number may be increased if needed.
QudaReconstructType reconstruct_precondition
QudaReconstructType reconstruct
QudaPrecision cuda_prec_precondition
QudaPrecision cuda_prec_refinement_sloppy
QudaPrecision cuda_prec_sloppy
QudaReconstructType reconstruct_sloppy
QudaReconstructType reconstruct_eigensolver
QudaReconstructType reconstruct_refinement_sloppy
QudaPrecision cuda_prec_eigensolver