QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions | Variables
staggered_invertmsrc_test.cpp File Reference
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <test_util.h>
#include <dslash_util.h>
#include <blas_reference.h>
#include <staggered_dslash_reference.h>
#include <quda.h>
#include <string.h>
#include "misc.h"
#include <gauge_field.h>
#include <blas_quda.h>
Include dependency graph for staggered_invertmsrc_test.cpp:

Go to the source code of this file.

Macros

#define MAX(a, b)   ((a)>(b)?(a):(b))
 
#define mySpinorSiteSize   6
 
#define NUM_SRC   20
 
#define NUM_OFFSETS   12
 

Functions

void usage (char **argv)
 
static void end ()
 
template<typename Float >
void constructSpinorField (Float *res)
 
static void set_params (QudaGaugeParam *gaugeParam, QudaInvertParam *inv_param, int X1, int X2, int X3, int X4, QudaPrecision cpu_prec, QudaPrecision prec, QudaPrecision prec_sloppy, QudaReconstructType link_recon, QudaReconstructType link_recon_sloppy, double mass, double tol, int maxiter, double reliable_delta, double tadpole_coeff)
 
int invert_test (void)
 
void display_test_info ()
 
void usage_extra (char **argv)
 
int main (int argc, char **argv)
 

Variables

void * qdp_fatlink [4]
 
void * qdp_longlink [4]
 
void * fatlink
 
void * longlink
 
int device
 
int niter
 
int Nsrc
 
QudaReconstructType link_recon
 
QudaPrecision prec
 
QudaPrecision cpu_prec = QUDA_DOUBLE_PRECISION
 
QudaReconstructType link_recon_sloppy
 
QudaPrecision prec_sloppy
 
cpuColorSpinorFieldin
 
cpuColorSpinorFieldout
 
cpuColorSpinorFieldref
 
cpuColorSpinorFieldtmp
 
cpuGaugeFieldcpuFat = NULL
 
cpuGaugeFieldcpuLong = NULL
 
double tol
 
double tol_hq
 
int test_type
 
int xdim
 
int ydim
 
int zdim
 
int tdim
 
int gridsize_from_cmdline []
 
QudaDslashType dslash_type
 
QudaInverterType inv_type
 
double mass
 

Macro Definition Documentation

◆ MAX

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

Definition at line 22 of file staggered_invertmsrc_test.cpp.

Referenced by invert_test().

◆ mySpinorSiteSize

#define mySpinorSiteSize   6

Definition at line 23 of file staggered_invertmsrc_test.cpp.

Referenced by invert_test().

◆ NUM_OFFSETS

#define NUM_OFFSETS   12

Referenced by invert_test().

◆ NUM_SRC

#define NUM_SRC   20

Referenced by invert_test().

Function Documentation

◆ constructSpinorField()

template<typename Float >
void constructSpinorField ( Float *  res)

Definition at line 76 of file staggered_invertmsrc_test.cpp.

References quda::s, and Vh.

Referenced by invert_test().

Here is the caller graph for this function:

◆ display_test_info()

void display_test_info ( )

Definition at line 546 of file staggered_invertmsrc_test.cpp.

References dimPartitioned(), get_prec_str(), get_recon_str(), get_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:

◆ end()

static void end ( void  )
static

Definition at line 523 of file staggered_invertmsrc_test.cpp.

References cpuFat, cpuLong, endQuda(), fatlink, in, longlink, out, qdp_fatlink, qdp_longlink, ref, and tmp.

Referenced by invert_test().

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

◆ invert_test()

int invert_test ( void  )

Definition at line 183 of file staggered_invertmsrc_test.cpp.

References construct_fat_long_gauge_field(), constructSpinorField(), cpu_prec, QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, quda::ColorSpinorParam::create, csParam, QudaGaugeParam_s::cuda_prec_precondition, device, dslash_type, dw_setDims(), end(), errorQuda, fatlink, quda::ColorSpinorParam::fieldOrder, QudaGaugeParam_s::ga_pad, QudaInvertParam_s::gamma_basis, quda::ColorSpinorParam::gammaBasis, gaugeParam, gaugeSiteSize, QudaInvertParam_s::gcrNkrylov, QudaInvertParam_s::gflops, quda::GaugeField::Ghost(), ghost_fatlink, ghost_longlink, quda::LatticeFieldParam::ghostExchange, gSize, quda::blas::HeavyQuarkResidualNorm(), in, initQuda(), inv_param, inv_type, QudaInvertParam_s::inv_type, invertMultiShiftQuda(), invertMultiSrcQuda(), invertQuda(), QudaInvertParam_s::iter, link_recon, link_recon_sloppy, loadGaugeQuda(), longlink, mass, matdagmat(), matdagmat_mg4dir(), QudaInvertParam_s::matpc_type, MAX, quda::blas::mxpy(), mySpinorSiteSize, quda::ColorSpinorParam::nColor, quda::LatticeFieldParam::nDim, newQudaGaugeParam(), newQudaInvertParam(), norm_2(), quda::ColorSpinorParam::nSpin, Nsrc, QudaInvertParam_s::num_offset, NUM_OFFSETS, QudaInvertParam_s::num_src, NUM_SRC, QudaInvertParam_s::offset, out, quda::LatticeFieldParam::pad, parity, prec, prec_sloppy, printfQuda, qdp_fatlink, qdp_longlink, QUDA_ASQTAD_DSLASH, QUDA_ASQTAD_FAT_LINKS, QUDA_ASQTAD_LONG_LINKS, QUDA_DOUBLE_PRECISION, QUDA_EVEN_ODD_SITE_ORDER, QUDA_EVEN_PARITY, QUDA_GCR_INVERTER, QUDA_GHOST_EXCHANGE_PAD, QUDA_HALF_PRECISION, QUDA_INVALID_PARITY, QUDA_MATPC_EVEN_EVEN, QUDA_MATPC_ODD_ODD, QUDA_NORMOP_SOLVE, QUDA_ODD_PARITY, QUDA_PARITY_SITE_SUBSET, QUDA_PCG_INVERTER, QUDA_RECONSTRUCT_NO, QUDA_SINGLE_PRECISION, QUDA_SPACE_SPIN_COLOR_FIELD_ORDER, QUDA_STAGGERED_DSLASH, QUDA_SU3_LINKS, QUDA_ZERO_FIELD_CREATE, QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_sloppy, QudaInvertParam_s::secs, set_params(), setDims(), quda::ColorSpinorParam::setPrecision(), setSpinorSiteSize(), quda::ColorSpinorParam::siteOrder, quda::LatticeFieldParam::siteSubset, QudaInvertParam_s::solve_type, quda::sqrt(), tdim, test_type, tol, QudaInvertParam_s::tol, QudaInvertParam_s::tol_hq, QudaInvertParam_s::tol_hq_offset, QudaInvertParam_s::tol_offset, QudaInvertParam_s::true_res, QudaInvertParam_s::true_res_hq, QudaInvertParam_s::true_res_hq_offset, QudaInvertParam_s::true_res_offset, QudaGaugeParam_s::type, V, quda::ColorSpinorField::V(), Vh, QudaGaugeParam_s::X, quda::LatticeFieldParam::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 
)

◆ set_params()

static void set_params ( QudaGaugeParam gaugeParam,
QudaInvertParam inv_param,
int  X1,
int  X2,
int  X3,
int  X4,
QudaPrecision  cpu_prec,
QudaPrecision  prec,
QudaPrecision  prec_sloppy,
QudaReconstructType  link_recon,
QudaReconstructType  link_recon_sloppy,
double  mass,
double  tol,
int  maxiter,
double  reliable_delta,
double  tadpole_coeff 
)
static

Definition at line 89 of file staggered_invertmsrc_test.cpp.

References QudaGaugeParam_s::anisotropy, cpu_prec, QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, QudaGaugeParam_s::cuda_prec, QudaInvertParam_s::cuda_prec, QudaInvertParam_s::cuda_prec_precondition, QudaGaugeParam_s::cuda_prec_sloppy, QudaInvertParam_s::cuda_prec_sloppy, QudaInvertParam_s::dagger, QudaInvertParam_s::dirac_order, dslash_type, QudaInvertParam_s::dslash_type, errorQuda, QudaGaugeParam_s::ga_pad, QudaInvertParam_s::gamma_basis, QudaGaugeParam_s::gauge_fix, QudaGaugeParam_s::gauge_order, QudaInvertParam_s::input_location, inv_type, QudaInvertParam_s::inv_type, QudaInvertParam_s::inv_type_precondition, link_recon, link_recon_sloppy, QudaInvertParam_s::Ls, mass, QudaInvertParam_s::mass, QudaInvertParam_s::mass_normalization, QudaInvertParam_s::matpc_type, QudaInvertParam_s::maxiter, QudaInvertParam_s::maxiter_precondition, niter, QudaInvertParam_s::Nsteps, QudaInvertParam_s::output_location, QudaInvertParam_s::pipeline, prec, prec_sloppy, QudaInvertParam_s::preserve_source, QUDA_ANTI_PERIODIC_T, QUDA_ASQTAD_DSLASH, QUDA_CPU_FIELD_LOCATION, QUDA_DAG_NO, QUDA_DEGRAND_ROSSI_GAMMA_BASIS, QUDA_DIRAC_ORDER, QUDA_GAUGE_FIXED_NO, QUDA_HALF_PRECISION, QUDA_HEAVY_QUARK_RESIDUAL, QUDA_L2_RELATIVE_RESIDUAL, QUDA_MASS_NORMALIZATION, QUDA_MATPC_EVEN_EVEN, QUDA_MATPCDAG_MATPC_SOLUTION, QUDA_MILC_GAUGE_ORDER, QUDA_NORMOP_PC_SOLVE, QUDA_PRESERVE_SOURCE_YES, QUDA_SD_INVERTER, QUDA_SILENT, QUDA_STAGGERED_DSLASH, QUDA_USE_INIT_GUESS_YES, QUDA_VERBOSE, QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_sloppy, QudaInvertParam_s::reliable_delta, QudaInvertParam_s::residual_type, QudaGaugeParam_s::scale, QudaInvertParam_s::solution_type, QudaInvertParam_s::solve_type, QudaInvertParam_s::sp_pad, QudaGaugeParam_s::t_boundary, QudaGaugeParam_s::tadpole_coeff, tol, QudaInvertParam_s::tol, tol_hq, QudaInvertParam_s::tol_hq, QudaInvertParam_s::tol_precondition, QudaInvertParam_s::tol_restart, QudaInvertParam_s::use_init_guess, QudaInvertParam_s::use_sloppy_partial_accumulator, QudaInvertParam_s::verbosity, QudaInvertParam_s::verbosity_precondition, QudaGaugeParam_s::X, X1, X2, X3, and X4.

Referenced by invert_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 568 of file staggered_invertmsrc_test.cpp.

References printfQuda.

Variable Documentation

◆ cpu_prec

Definition at line 44 of file staggered_invertmsrc_test.cpp.

Referenced by invert_test(), main(), and set_params().

◆ cpuFat

cpuGaugeField* cpuFat = NULL

Definition at line 53 of file staggered_invertmsrc_test.cpp.

Referenced by end().

◆ cpuLong

cpuGaugeField* cpuLong = NULL

Definition at line 54 of file staggered_invertmsrc_test.cpp.

Referenced by end().

◆ device

int device

Definition at line 1602 of file test_util.cpp.

Referenced by invert_test().

◆ dslash_type

QudaDslashType dslash_type

◆ fatlink

void* fatlink

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

◆ in

Definition at line 48 of file staggered_invertmsrc_test.cpp.

Referenced by end(), and invert_test().

◆ inv_type

QudaInverterType inv_type

Definition at line 1640 of file test_util.cpp.

Referenced by invert_test(), main(), process_command_line_option(), and set_params().

◆ link_recon

QudaReconstructType link_recon

Definition at line 1605 of file test_util.cpp.

Referenced by display_test_info(), invert_test(), main(), and set_params().

◆ link_recon_sloppy

QudaReconstructType link_recon_sloppy

Definition at line 1606 of file test_util.cpp.

Referenced by display_test_info(), invert_test(), main(), and set_params().

◆ longlink

void* longlink

◆ mass

double mass

◆ niter

int niter

Definition at line 1629 of file test_util.cpp.

Referenced by process_command_line_option(), and set_params().

◆ Nsrc

int Nsrc

Definition at line 1627 of file test_util.cpp.

Referenced by invert_test(), and process_command_line_option().

◆ out

Definition at line 49 of file staggered_invertmsrc_test.cpp.

Referenced by end(), and invert_test().

◆ prec

Definition at line 1608 of file test_util.cpp.

Referenced by display_test_info(), invert_test(), main(), and set_params().

◆ prec_sloppy

QudaPrecision prec_sloppy

Definition at line 1609 of file test_util.cpp.

Referenced by display_test_info(), invert_test(), main(), and set_params().

◆ qdp_fatlink

void* qdp_fatlink[4]

Definition at line 26 of file staggered_invertmsrc_test.cpp.

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

◆ qdp_longlink

void* qdp_longlink[4]

Definition at line 27 of file staggered_invertmsrc_test.cpp.

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

◆ ref

Definition at line 50 of file staggered_invertmsrc_test.cpp.

Referenced by end().

◆ tdim

int tdim

Definition at line 1618 of file test_util.cpp.

Referenced by display_test_info(), and invert_test().

◆ test_type

int test_type

Definition at line 1636 of file test_util.cpp.

Referenced by display_test_info(), invert_test(), main(), and process_command_line_option().

◆ tmp

Definition at line 51 of file staggered_invertmsrc_test.cpp.

Referenced by end().

◆ tol

double tol

◆ tol_hq

double tol_hq

Definition at line 1657 of file test_util.cpp.

Referenced by process_command_line_option(), and set_params().

◆ xdim

int xdim

Definition at line 1615 of file test_util.cpp.

Referenced by display_test_info(), and invert_test().

◆ ydim

int ydim

Definition at line 1616 of file test_util.cpp.

Referenced by display_test_info(), and invert_test().

◆ zdim

int zdim

Definition at line 1617 of file test_util.cpp.

Referenced by display_test_info(), and invert_test().