QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Functions | Variables
deflated_invert_test.cpp File Reference
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <util_quda.h>
#include <test_util.h>
#include <dslash_util.h>
#include <blas_reference.h>
#include <wilson_dslash_reference.h>
#include <domain_wall_dslash_reference.h>
#include "misc.h"
#include <qio_field.h>
#include <quda.h>
Include dependency graph for deflated_invert_test.cpp:

Go to the source code of this file.

Namespaces

 quda
 

Functions

void usage (char **)
 
void quda::setTransferGPU (bool)
 
void display_test_info ()
 
void setGaugeParam (QudaGaugeParam &gauge_param)
 
void setInvertParam (QudaInvertParam &inv_param)
 
void setDeflationParam (QudaEigParam &df_param)
 
int main (int argc, char **argv)
 

Variables

QudaDslashType dslash_type
 
int device
 
int xdim
 
int ydim
 
int zdim
 
int tdim
 
int Lsdim
 
int gridsize_from_cmdline []
 
QudaReconstructType link_recon
 
QudaPrecision prec
 
QudaPrecision prec_sloppy
 
QudaPrecision prec_precondition
 
QudaPrecision prec_ritz
 
QudaPrecision prec_refinement_sloppy
 
QudaReconstructType link_recon_sloppy
 
QudaReconstructType link_recon_precondition
 
double mass
 
double kappa
 
double mu
 
double anisotropy
 
double epsilon
 
double tol
 
double tol_hq
 
char latfile []
 
bool unit_gauge
 
int Nsrc
 
int niter
 
int nvec []
 
QudaInverterType inv_type
 
QudaInverterType precon_type
 
QudaMatPCType matpc_type
 
QudaSolveType solve_type
 
char eig_vec_infile []
 
char eig_vec_outfile []
 
QudaTwistFlavorType twist_flavor
 
double clover_coeff
 
bool compute_clover
 
int nev
 
int max_search_dim
 
int deflation_grid
 
double tol_restart
 
int eigcg_max_restarts
 
int max_restart_num
 
double inc_tol
 
double eigenval_tol
 
QudaExtLibType solver_ext_lib
 
QudaExtLibType deflation_ext_lib
 
QudaFieldLocation location_ritz
 
QudaMemoryType mem_type_ritz
 
QudaMassNormalization normalization
 
QudaVerbosity verbosity
 
QudaPrecisioncpu_prec = prec
 
QudaPrecisioncuda_prec = prec
 
QudaPrecisioncuda_prec_sloppy = prec_sloppy
 
QudaPrecisioncuda_prec_precondition = prec_precondition
 
QudaPrecisioncuda_prec_refinement_sloppy = prec_refinement_sloppy
 
QudaPrecisioncuda_prec_ritz = prec_ritz
 

Function Documentation

◆ display_test_info()

void display_test_info ( )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 305 of file deflated_invert_test.cpp.

References quda::ax(), QudaInvertParam_s::b_5, QudaInvertParam_s::c_5, QudaInvertParam_s::clover_cpu_prec, cloverSiteSize, compute_clover, QudaInvertParam_s::compute_clover, QudaInvertParam_s::compute_clover_inverse, construct_clover_field(), construct_gauge_field(), QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, QudaInvertParam_s::dagger, QudaInvertParam_s::deflation_op, destroyDeflationQuda(), device, display_test_info(), dslash_type, dw_4d_mat(), dw_4d_matpc(), dw_mat(), dw_matpc(), dw_setDims(), endQuda(), epsilon, QudaInvertParam_s::epsilon, finalizeComms(), freeCloverQuda(), freeGaugeQuda(), gauge_param, gaugeSiteSize, QudaInvertParam_s::gflops, gridsize_from_cmdline, gSize, initComms(), initQuda(), initRand(), inv_param, QudaEigParam_s::invert_param, invertQuda(), QudaInvertParam_s::iter, QudaInvertParam_s::kappa, kappa5, latfile, link_recon, link_recon_precondition, link_recon_sloppy, loadCloverQuda(), loadGaugeQuda(), QudaInvertParam_s::Ls, Lsdim, QudaInvertParam_s::m5, QudaInvertParam_s::mass, QudaInvertParam_s::mass_normalization, QudaInvertParam_s::matpc_type, mdw_mat(), mdw_matpc(), memset(), QudaInvertParam_s::mu, quda::blas::mxpy(), newDeflationQuda(), newQudaEigParam(), newQudaGaugeParam(), newQudaInvertParam(), quda::norm(), norm_2(), Nsrc, prec, prec_precondition, prec_refinement_sloppy, prec_ritz, prec_sloppy, printfQuda, process_command_line_option(), QUDA_CLOVER_WILSON_DSLASH, QUDA_DOMAIN_WALL_4D_DSLASH, QUDA_DOMAIN_WALL_DSLASH, QUDA_DOUBLE_PRECISION, QUDA_INVALID_PRECISION, QUDA_MASS_NORMALIZATION, QUDA_MAT_SOLUTION, QUDA_MATPC_SOLUTION, QUDA_MOBIUS_DWF_DSLASH, QUDA_RECONSTRUCT_INVALID, QUDA_SINGLE_PRECISION, QUDA_TWIST_NONDEG_DOUBLET, QUDA_TWIST_SINGLET, QUDA_TWISTED_CLOVER_DSLASH, QUDA_TWISTED_MASS_DSLASH, QUDA_WILSON_DSLASH, read_gauge_field(), QudaInvertParam_s::return_clover, QudaInvertParam_s::return_clover_inverse, QudaInvertParam_s::rhs_idx, QudaInvertParam_s::secs, setDeflationParam(), setDims(), setGaugeParam(), setInvertParam(), setSpinorSiteSize(), QudaInvertParam_s::solution_type, spinorOut, spinorSiteSize, quda::sqrt(), tm_mat(), tm_matpc(), QudaInvertParam_s::tol, QudaInvertParam_s::tol_hq, QudaInvertParam_s::true_res, QudaInvertParam_s::true_res_hq, twist_flavor, QudaInvertParam_s::twist_flavor, unit_gauge, usage(), V, Vh, wil_mat(), wil_matpc(), and QudaGaugeParam_s::X.

Here is the call graph for this function:

◆ setDeflationParam()

void setDeflationParam ( QudaEigParam df_param)

◆ setGaugeParam()

void setGaugeParam ( QudaGaugeParam gauge_param)

◆ setInvertParam()

void setInvertParam ( QudaInvertParam inv_param)

For deflated solvers only:

Definition at line 170 of file deflated_invert_test.cpp.

References anisotropy, QudaInvertParam_s::cl_pad, clover_coeff, QudaInvertParam_s::clover_coeff, QudaInvertParam_s::clover_cpu_prec, QudaInvertParam_s::clover_cuda_prec, QudaInvertParam_s::clover_cuda_prec_precondition, QudaInvertParam_s::clover_cuda_prec_sloppy, QudaInvertParam_s::clover_order, cpu_prec, QudaInvertParam_s::cpu_prec, cuda_prec, QudaInvertParam_s::cuda_prec, cuda_prec_precondition, QudaInvertParam_s::cuda_prec_precondition, cuda_prec_refinement_sloppy, QudaInvertParam_s::cuda_prec_refinement_sloppy, cuda_prec_ritz, QudaInvertParam_s::cuda_prec_ritz, cuda_prec_sloppy, QudaInvertParam_s::cuda_prec_sloppy, QudaInvertParam_s::dagger, deflation_grid, QudaInvertParam_s::deflation_grid, QudaInvertParam_s::dirac_order, dslash_type, QudaInvertParam_s::dslash_type, eigcg_max_restarts, QudaInvertParam_s::eigcg_max_restarts, eigenval_tol, QudaInvertParam_s::eigenval_tol, errorQuda, QudaInvertParam_s::extlib_type, QudaInvertParam_s::gamma_basis, QudaInvertParam_s::gcrNkrylov, inc_tol, QudaInvertParam_s::inc_tol, QudaInvertParam_s::input_location, inv_type, QudaInvertParam_s::inv_type, QudaInvertParam_s::inv_type_precondition, kappa, QudaInvertParam_s::kappa, QudaInvertParam_s::Ls, mass, QudaInvertParam_s::mass, QudaInvertParam_s::mass_normalization, matpc_type, QudaInvertParam_s::matpc_type, max_restart_num, QudaInvertParam_s::max_restart_num, max_search_dim, QudaInvertParam_s::max_search_dim, QudaInvertParam_s::maxiter, QudaInvertParam_s::maxiter_precondition, mu, QudaInvertParam_s::mu, nev, QudaInvertParam_s::nev, niter, normalization, QudaInvertParam_s::num_offset, QudaInvertParam_s::omega, QudaInvertParam_s::output_location, precon_type, QudaInvertParam_s::precondition_cycle, QudaInvertParam_s::preserve_source, printfQuda, QUDA_ADDITIVE_SCHWARZ, QUDA_CLOVER_WILSON_DSLASH, QUDA_CPU_FIELD_LOCATION, QUDA_DAG_NO, QUDA_DEGRAND_ROSSI_GAMMA_BASIS, QUDA_DIRAC_ORDER, QUDA_DIRECT_PC_SOLVE, QUDA_EIGCG_INVERTER, QUDA_GMRESDR_INVERTER, QUDA_INC_EIGCG_INVERTER, QUDA_L2_RELATIVE_RESIDUAL, QUDA_MAT_SOLUTION, QUDA_NORMOP_PC_SOLVE, QUDA_PACKED_CLOVER_ORDER, QUDA_PRESERVE_SOURCE_NO, QUDA_TWIST_NONDEG_DOUBLET, QUDA_TWISTED_CLOVER_DSLASH, QUDA_TWISTED_MASS_DSLASH, QudaInvertParam_s::reliable_delta, QudaInvertParam_s::residual_type, QudaInvertParam_s::rhs_idx, QudaInvertParam_s::schwarz_type, QudaInvertParam_s::solution_type, solve_type, QudaInvertParam_s::solve_type, solver_ext_lib, QudaInvertParam_s::sp_pad, tol, QudaInvertParam_s::tol, tol_hq, QudaInvertParam_s::tol_hq, QudaInvertParam_s::tol_hq_offset, QudaInvertParam_s::tol_offset, QudaInvertParam_s::tol_precondition, tol_restart, QudaInvertParam_s::tol_restart, twist_flavor, QudaInvertParam_s::twist_flavor, verbosity, QudaInvertParam_s::verbosity, and QudaInvertParam_s::verbosity_precondition.

Referenced by main().

Here is the caller graph for this function:

◆ usage()

void usage ( char **  )

Definition at line 1783 of file test_util.cpp.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

◆ anisotropy

double anisotropy

◆ clover_coeff

double clover_coeff

Definition at line 1653 of file test_util.cpp.

Referenced by printQudaCloverParam(), and setInvertParam().

◆ compute_clover

bool compute_clover

Definition at line 1654 of file test_util.cpp.

Referenced by main(), and printQudaCloverParam().

◆ cpu_prec

QudaPrecision& cpu_prec = prec

Definition at line 121 of file deflated_invert_test.cpp.

Referenced by setGaugeParam(), and setInvertParam().

◆ cuda_prec

QudaPrecision& cuda_prec = prec

Definition at line 122 of file deflated_invert_test.cpp.

Referenced by setGaugeParam(), and setInvertParam().

◆ cuda_prec_precondition

QudaPrecision& cuda_prec_precondition = prec_precondition

Definition at line 124 of file deflated_invert_test.cpp.

Referenced by setGaugeParam(), and setInvertParam().

◆ cuda_prec_refinement_sloppy

QudaPrecision& cuda_prec_refinement_sloppy = prec_refinement_sloppy

◆ cuda_prec_ritz

QudaPrecision& cuda_prec_ritz = prec_ritz

Definition at line 126 of file deflated_invert_test.cpp.

Referenced by printQudaInvertParam(), and setInvertParam().

◆ cuda_prec_sloppy

QudaPrecision& cuda_prec_sloppy = prec_sloppy

Definition at line 123 of file deflated_invert_test.cpp.

Referenced by setGaugeParam(), and setInvertParam().

◆ deflation_ext_lib

QudaExtLibType deflation_ext_lib

Definition at line 1718 of file test_util.cpp.

Referenced by process_command_line_option(), and setDeflationParam().

◆ deflation_grid

int deflation_grid

◆ device

int device

Definition at line 1602 of file test_util.cpp.

Referenced by main().

◆ dslash_type

QudaDslashType dslash_type

Definition at line 1621 of file test_util.cpp.

Referenced by display_test_info(), main(), and setInvertParam().

◆ eig_vec_infile

char eig_vec_infile[]

Definition at line 1742 of file test_util.cpp.

Referenced by setDeflationParam().

◆ eig_vec_outfile

char eig_vec_outfile[]

Definition at line 1743 of file test_util.cpp.

Referenced by setDeflationParam().

◆ eigcg_max_restarts

int eigcg_max_restarts

◆ eigenval_tol

double eigenval_tol

◆ epsilon

double epsilon

◆ gridsize_from_cmdline

int gridsize_from_cmdline[]

For MPI, the default node mapping is lexicographical with t varying fastest.

Definition at line 49 of file test_util.cpp.

Referenced by main().

◆ inc_tol

double inc_tol

◆ inv_type

QudaInverterType inv_type

Definition at line 1640 of file test_util.cpp.

Referenced by setInvertParam().

◆ kappa

double kappa

◆ latfile

char latfile[]

Definition at line 1623 of file test_util.cpp.

Referenced by main().

◆ link_recon

QudaReconstructType link_recon

Definition at line 1605 of file test_util.cpp.

Referenced by display_test_info(), main(), and setGaugeParam().

◆ link_recon_precondition

QudaReconstructType link_recon_precondition

Definition at line 1607 of file test_util.cpp.

Referenced by main(), and setGaugeParam().

◆ link_recon_sloppy

QudaReconstructType link_recon_sloppy

Definition at line 1606 of file test_util.cpp.

Referenced by display_test_info(), main(), and setGaugeParam().

◆ location_ritz

QudaFieldLocation location_ritz

◆ Lsdim

int Lsdim

Definition at line 1619 of file test_util.cpp.

Referenced by display_test_info(), and main().

◆ mass

double mass

Definition at line 1646 of file test_util.cpp.

Referenced by setInvertParam().

◆ matpc_type

QudaMatPCType matpc_type

◆ max_restart_num

int max_restart_num

◆ max_search_dim

int max_search_dim

◆ mem_type_ritz

QudaMemoryType mem_type_ritz

◆ mu

double mu

◆ nev

int nev

◆ niter

int niter

Definition at line 1629 of file test_util.cpp.

Referenced by setInvertParam().

◆ normalization

QudaMassNormalization normalization

Definition at line 1661 of file test_util.cpp.

Referenced by display_test_info(), and setInvertParam().

◆ Nsrc

int Nsrc

Definition at line 1627 of file test_util.cpp.

Referenced by main().

◆ nvec

int nvec[]

Definition at line 1637 of file test_util.cpp.

◆ prec

Definition at line 1608 of file test_util.cpp.

Referenced by display_test_info(), and main().

◆ prec_precondition

QudaPrecision prec_precondition

Definition at line 1611 of file test_util.cpp.

Referenced by main().

◆ prec_refinement_sloppy

QudaPrecision prec_refinement_sloppy

Definition at line 1610 of file test_util.cpp.

Referenced by main().

◆ prec_ritz

QudaPrecision prec_ritz

Definition at line 1613 of file test_util.cpp.

Referenced by main(), process_command_line_option(), and setDeflationParam().

◆ prec_sloppy

QudaPrecision prec_sloppy

Definition at line 1609 of file test_util.cpp.

Referenced by display_test_info(), and main().

◆ precon_type

QudaInverterType precon_type

Definition at line 1641 of file test_util.cpp.

Referenced by setInvertParam().

◆ solve_type

QudaSolveType solve_type

Definition at line 1663 of file test_util.cpp.

Referenced by setInvertParam().

◆ solver_ext_lib

QudaExtLibType solver_ext_lib

Definition at line 1717 of file test_util.cpp.

Referenced by process_command_line_option(), and setInvertParam().

◆ tdim

int tdim

Definition at line 1618 of file test_util.cpp.

Referenced by display_test_info(), and setGaugeParam().

◆ tol

double tol

◆ tol_hq

double tol_hq

Definition at line 1657 of file test_util.cpp.

Referenced by invertMultiShiftQuda(), printQudaInvertParam(), and setInvertParam().

◆ tol_restart

double tol_restart

◆ twist_flavor

QudaTwistFlavorType twist_flavor

Definition at line 1660 of file test_util.cpp.

Referenced by main(), printQudaInvertParam(), and setInvertParam().

◆ unit_gauge

bool unit_gauge

Definition at line 1624 of file test_util.cpp.

Referenced by main().

◆ verbosity

QudaVerbosity verbosity

Definition at line 1614 of file test_util.cpp.

Referenced by setInvertParam().

◆ xdim

int xdim

Definition at line 1615 of file test_util.cpp.

Referenced by display_test_info(), and setGaugeParam().

◆ ydim

int ydim

Definition at line 1616 of file test_util.cpp.

Referenced by display_test_info(), and setGaugeParam().

◆ zdim

int zdim

Definition at line 1617 of file test_util.cpp.

Referenced by display_test_info(), and setGaugeParam().