QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions | Variables
staggered_eigensolve_test.cpp File Reference
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <quda_internal.h>
#include <dirac_quda.h>
#include <dslash_quda.h>
#include <invert_quda.h>
#include <util_quda.h>
#include <blas_quda.h>
#include <misc.h>
#include <test_util.h>
#include <dslash_util.h>
#include <staggered_gauge_utils.h>
#include <unitarization_links.h>
#include <llfat_reference.h>
#include <gauge_field.h>
#include <blas_reference.h>
#include <qio_field.h>
#include <quda.h>
Include dependency graph for staggered_eigensolve_test.cpp:

Go to the source code of this file.

Macros

#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define mySpinorSiteSize   6
 

Functions

void usage (char **argv)
 
void display_test_info ()
 
void usage_extra (char **argv)
 
void setGaugeParam (QudaGaugeParam &gauge_param)
 
void setInvertParam (QudaInvertParam &inv_param)
 
void setEigParam (QudaEigParam &eig_param)
 
void eigensolve_test ()
 
int main (int argc, char **argv)
 

Variables

void ** ghost_fatlink
 
void ** ghost_longlink
 
int device
 
QudaPrecision cpu_prec = QUDA_DOUBLE_PRECISION
 
size_t gSize = sizeof(double)
 
double reliable_delta
 
bool alternative_reliable
 
int test_type
 
int xdim
 
int ydim
 
int zdim
 
int tdim
 
int gridsize_from_cmdline []
 
QudaReconstructType link_recon
 
QudaPrecision prec
 
QudaPrecision prec_sloppy
 
QudaPrecision prec_refinement_sloppy
 
QudaReconstructType link_recon_sloppy
 
double mass
 
double kappa
 
int laplace3D
 
double tol
 
double tol_hq
 
char latfile []
 
int Nsrc
 
int niter
 
int gcrNkrylov
 
int pipeline
 
int solution_accumulator_pipeline
 
QudaCABasis ca_basis
 
double ca_lambda_min
 
double ca_lambda_max
 
QudaDslashType dslash_type
 
QudaMatPCType matpc_type
 
QudaSolutionType solution_type
 
QudaSolveType solve_type
 
bool compute_fatlong
 
double eps_naik
 
static int n_naiks = 1
 
int argc_copy
 
char ** argv_copy
 
int eig_nEv
 
int eig_nKr
 
int eig_nConv
 
bool eig_require_convergence
 
int eig_check_interval
 
int eig_max_restarts
 
double eig_tol
 
int eig_maxiter
 
bool eig_use_poly_acc
 
int eig_poly_deg
 
double eig_amin
 
double eig_amax
 
bool eig_use_normop
 
bool eig_use_dagger
 
bool eig_compute_svd
 
QudaEigSpectrumType eig_spectrum
 
QudaEigType eig_type
 
bool eig_arpack_check
 
char eig_arpack_logfile []
 
char eig_QUDA_logfile []
 
char eig_vec_infile []
 
char eig_vec_outfile []
 
bool verify_results
 
int X [4]
 

Macro Definition Documentation

◆ MAX

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 31 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), setGaugeParam(), and setInvertParam().

◆ mySpinorSiteSize

#define mySpinorSiteSize   6

Function Documentation

◆ display_test_info()

void display_test_info ( )

Definition at line 120 of file staggered_eigensolve_test.cpp.

References dimPartitioned(), get_prec_str(), get_recon_str(), get_staggered_test_type(), link_recon, link_recon_sloppy, prec, prec_sloppy, printfQuda, tdim, test_type, xdim, ydim, and zdim.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eigensolve_test()

void eigensolve_test ( )

Definition at line 324 of file staggered_eigensolve_test.cpp.

References applyGaugeFieldScaling_long(), argc_copy, argv_copy, QudaEigParam_s::arpack_check, compute_fatlong, computeFatLongGPU(), computeStaggeredPlaquetteQDPOrder(), construct_fat_long_gauge_field(), construct_gauge_field(), QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, cpuFat, cpuLong, QudaGaugeParam_s::cuda_prec_precondition, QudaGaugeParam_s::cuda_prec_sloppy, device, dslash_type, dw_setDims(), eig_nConv, eigensolveQuda(), eps_naik, errorQuda, QudaGaugeParam_s::ga_pad, gauge_param, gaugeSiteSize, quda::GaugeField::Ghost(), ghost_fatlink, ghost_longlink, quda::LatticeFieldParam::ghostExchange, gSize, initQuda(), QudaEigParam_s::invert_param, latfile, link_recon, link_recon_sloppy, loadGaugeQuda(), MAX, memset(), mySpinorSiteSize, n_naiks, QudaEigParam_s::nEv, newQudaEigParam(), newQudaGaugeParam(), newQudaInvertParam(), Nsrc, prec, printfQuda, qdp_fatlink, qdp_inlink, qdp_longlink, QUDA_ASQTAD_DSLASH, QUDA_ASQTAD_FAT_LINKS, QUDA_ASQTAD_LONG_LINKS, QUDA_DOUBLE_PRECISION, QUDA_GHOST_EXCHANGE_PAD, QUDA_LAPLACE_DSLASH, QUDA_RECONSTRUCT_NO, QUDA_STAGGERED_DSLASH, QUDA_STAGGERED_PHASE_NO, QUDA_SU3_LINKS, read_gauge_field(), QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_precondition, QudaGaugeParam_s::reconstruct_sloppy, reorderQDPtoMILC(), setDims(), setEigParam(), setGaugeParam(), setInvertParam(), setSpinorSiteSize(), QudaGaugeParam_s::staggered_phase_type, tdim, test_type, QudaGaugeParam_s::type, V, Vh, QudaGaugeParam_s::X, xdim, ydim, and zdim.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

◆ setEigParam()

void setEigParam ( QudaEigParam eig_param)

◆ setGaugeParam()

void setGaugeParam ( QudaGaugeParam gauge_param)

◆ setInvertParam()

void setInvertParam ( QudaInvertParam inv_param)

Definition at line 196 of file staggered_eigensolve_test.cpp.

References alternative_reliable, ca_basis, QudaInvertParam_s::ca_basis, ca_lambda_max, QudaInvertParam_s::ca_lambda_max, ca_lambda_min, QudaInvertParam_s::ca_lambda_min, cpu_prec, QudaInvertParam_s::cpu_prec, QudaInvertParam_s::cuda_prec, QudaInvertParam_s::cuda_prec_precondition, QudaInvertParam_s::cuda_prec_refinement_sloppy, QudaInvertParam_s::cuda_prec_sloppy, QudaInvertParam_s::dagger, QudaInvertParam_s::dirac_order, dslash_type, QudaInvertParam_s::dslash_type, errorQuda, QudaInvertParam_s::gamma_basis, gcrNkrylov, QudaInvertParam_s::gcrNkrylov, QudaInvertParam_s::heavy_quark_check, QudaInvertParam_s::input_location, QudaInvertParam_s::inv_type, QudaInvertParam_s::inv_type_precondition, kappa, QudaInvertParam_s::kappa, laplace3D, QudaInvertParam_s::laplace3D, QudaInvertParam_s::Ls, mass, QudaInvertParam_s::mass, QudaInvertParam_s::mass_normalization, matpc_type, QudaInvertParam_s::matpc_type, MAX, QudaInvertParam_s::maxiter, QudaInvertParam_s::maxiter_precondition, niter, Nsrc, QudaInvertParam_s::Nsteps, QudaInvertParam_s::output_location, pipeline, QudaInvertParam_s::pipeline, prec, prec_refinement_sloppy, prec_sloppy, QudaInvertParam_s::preserve_source, QUDA_BICGSTAB_INVERTER, QUDA_CPU_FIELD_LOCATION, QUDA_DAG_NO, QUDA_DEGRAND_ROSSI_GAMMA_BASIS, QUDA_DIRAC_ORDER, QUDA_HEAVY_QUARK_RESIDUAL, QUDA_L2_RELATIVE_RESIDUAL, QUDA_MASS_NORMALIZATION, QUDA_PRESERVE_SOURCE_YES, QUDA_SD_INVERTER, QUDA_SILENT, QUDA_VERBOSE, reliable_delta, QudaInvertParam_s::reliable_delta, QudaInvertParam_s::residual_type, solution_accumulator_pipeline, QudaInvertParam_s::solution_accumulator_pipeline, solution_type, QudaInvertParam_s::solution_type, solve_type, QudaInvertParam_s::solve_type, QudaInvertParam_s::sp_pad, tol, QudaInvertParam_s::tol, tol_hq, QudaInvertParam_s::tol_hq, QudaInvertParam_s::tol_precondition, QudaInvertParam_s::tol_restart, QudaInvertParam_s::use_alternative_reliable, QudaInvertParam_s::use_sloppy_partial_accumulator, QudaInvertParam_s::verbosity, QudaInvertParam_s::verbosity_precondition, and X.

Referenced by eigensolve_test().

Here is the caller graph for this function:

◆ usage()

void usage ( char **  argv)

Definition at line 1783 of file test_util.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ usage_extra()

void usage_extra ( char **  argv)

Definition at line 135 of file staggered_eigensolve_test.cpp.

References printfQuda.

Variable Documentation

◆ alternative_reliable

bool alternative_reliable

Definition at line 1659 of file test_util.cpp.

Referenced by setInvertParam().

◆ argc_copy

int argc_copy

Definition at line 89 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), and main().

◆ argv_copy

char** argv_copy

Definition at line 90 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), and main().

◆ ca_basis

QudaCABasis ca_basis

Definition at line 1631 of file test_util.cpp.

Referenced by setInvertParam().

◆ ca_lambda_max

double ca_lambda_max

Definition at line 1633 of file test_util.cpp.

Referenced by setInvertParam().

◆ ca_lambda_min

double ca_lambda_min

Definition at line 1632 of file test_util.cpp.

Referenced by setInvertParam().

◆ compute_fatlong

bool compute_fatlong

Definition at line 1655 of file test_util.cpp.

Referenced by eigensolve_test(), and main().

◆ cpu_prec

Definition at line 44 of file staggered_eigensolve_test.cpp.

Referenced by setGaugeParam(), and setInvertParam().

◆ device

int device

Definition at line 1602 of file test_util.cpp.

Referenced by eigensolve_test().

◆ dslash_type

QudaDslashType dslash_type

Definition at line 1621 of file test_util.cpp.

Referenced by eigensolve_test(), main(), setGaugeParam(), and setInvertParam().

◆ eig_amax

double eig_amax

Definition at line 1733 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_amin

double eig_amin

Definition at line 1732 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_arpack_check

bool eig_arpack_check

Definition at line 1739 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_arpack_logfile

char eig_arpack_logfile[]

Definition at line 1740 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_check_interval

int eig_check_interval

Definition at line 1727 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_compute_svd

bool eig_compute_svd

Definition at line 1736 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_max_restarts

int eig_max_restarts

Definition at line 1728 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_maxiter

int eig_maxiter

◆ eig_nConv

int eig_nConv

Definition at line 1725 of file test_util.cpp.

Referenced by eigensolve_test(), process_command_line_option(), and setEigParam().

◆ eig_nEv

int eig_nEv

Definition at line 1723 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_nKr

int eig_nKr

Definition at line 1724 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_poly_deg

int eig_poly_deg

Definition at line 1731 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_QUDA_logfile

char eig_QUDA_logfile[]

Definition at line 1741 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_require_convergence

bool eig_require_convergence

Definition at line 1726 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_spectrum

QudaEigSpectrumType eig_spectrum

Definition at line 1737 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_tol

double eig_tol

Definition at line 1729 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_type

QudaEigType eig_type

Definition at line 1738 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_use_dagger

bool eig_use_dagger

Definition at line 1735 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_use_normop

bool eig_use_normop

Definition at line 1734 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_use_poly_acc

bool eig_use_poly_acc

Definition at line 1730 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_vec_infile

char eig_vec_infile[]

Definition at line 1742 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eig_vec_outfile

char eig_vec_outfile[]

Definition at line 1743 of file test_util.cpp.

Referenced by process_command_line_option(), and setEigParam().

◆ eps_naik

double eps_naik

Definition at line 1652 of file test_util.cpp.

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

◆ gcrNkrylov

int gcrNkrylov

Definition at line 1630 of file test_util.cpp.

Referenced by setInvertParam().

◆ ghost_fatlink

void** ghost_fatlink

Definition at line 40 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), and invert_test().

◆ ghost_longlink

void ** ghost_longlink

Definition at line 40 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), invert_test(), and staggered_dslash().

◆ 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().

◆ gSize

size_t gSize = sizeof(double)

Definition at line 45 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test().

◆ kappa

double kappa

Definition at line 1647 of file test_util.cpp.

Referenced by setInvertParam().

◆ laplace3D

int laplace3D

Definition at line 1622 of file test_util.cpp.

Referenced by setInvertParam().

◆ latfile

char latfile[]

Definition at line 1623 of file test_util.cpp.

Referenced by eigensolve_test().

◆ link_recon

QudaReconstructType link_recon

Definition at line 1605 of file test_util.cpp.

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

◆ link_recon_sloppy

QudaReconstructType link_recon_sloppy

Definition at line 1606 of file test_util.cpp.

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

◆ mass

double mass

Definition at line 1646 of file test_util.cpp.

Referenced by setInvertParam().

◆ matpc_type

QudaMatPCType matpc_type

Definition at line 1662 of file test_util.cpp.

Referenced by main(), and setInvertParam().

◆ n_naiks

int n_naiks = 1
static

Definition at line 86 of file staggered_eigensolve_test.cpp.

Referenced by eigensolve_test(), and main().

◆ niter

int niter

Definition at line 1629 of file test_util.cpp.

Referenced by setInvertParam().

◆ Nsrc

int Nsrc

Definition at line 1627 of file test_util.cpp.

Referenced by eigensolve_test(), and setInvertParam().

◆ pipeline

int pipeline

Definition at line 1634 of file test_util.cpp.

Referenced by setInvertParam().

◆ prec

◆ prec_refinement_sloppy

QudaPrecision prec_refinement_sloppy

Definition at line 1610 of file test_util.cpp.

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

◆ prec_sloppy

QudaPrecision prec_sloppy

Definition at line 1609 of file test_util.cpp.

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

◆ reliable_delta

double reliable_delta

Definition at line 1658 of file test_util.cpp.

Referenced by setInvertParam().

◆ solution_accumulator_pipeline

int solution_accumulator_pipeline

Definition at line 1635 of file test_util.cpp.

Referenced by setInvertParam().

◆ solution_type

QudaSolutionType solution_type

Definition at line 1664 of file test_util.cpp.

Referenced by main(), and setInvertParam().

◆ solve_type

QudaSolveType solve_type

Definition at line 1663 of file test_util.cpp.

Referenced by main(), and setInvertParam().

◆ tdim

int tdim

Definition at line 1618 of file test_util.cpp.

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

◆ test_type

int test_type

Definition at line 1636 of file test_util.cpp.

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

◆ tol

double tol

Definition at line 1656 of file test_util.cpp.

Referenced by setInvertParam().

◆ tol_hq

double tol_hq

Definition at line 1657 of file test_util.cpp.

Referenced by setInvertParam().

◆ verify_results

bool verify_results

Definition at line 1643 of file test_util.cpp.

◆ X

int X[4]

Definition at line 118 of file staggered_eigensolve_test.cpp.

Referenced by setInvertParam().

◆ xdim

int xdim

Definition at line 1615 of file test_util.cpp.

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

◆ ydim

int ydim

Definition at line 1616 of file test_util.cpp.

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

◆ zdim

int zdim

Definition at line 1617 of file test_util.cpp.

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