QUDA
1.0.0
|
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <quda.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_dslash_reference.h>
#include <staggered_gauge_utils.h>
#include <llfat_reference.h>
#include <gauge_field.h>
#include <unitarization_links.h>
#include <qio_field.h>
#include <assert.h>
#include <gtest/gtest.h>
Go to the source code of this file.
Classes | |
struct | DslashTime |
Macros | |
#define | MAX(a, b) ((a)>(b)?(a):(b)) |
#define | staggeredSpinorSiteSize 6 |
Functions | |
void | usage (char **argv) |
double | getTolerance (QudaPrecision prec) |
void | setGaugeParam (QudaGaugeParam &gaugeParam) |
void | setInvertParam (QudaInvertParam &inv_param) |
void | init () |
void | end () |
DslashTime | dslashCUDA (int niter) |
void | staggeredDslashRef () |
TEST (dslash, verify) | |
static int | dslashTest () |
void | display_test_info () |
void | usage_extra (char **argv) |
int | main (int argc, char **argv) |
#define MAX | ( | a, | |
b | |||
) | ((a)>(b)?(a):(b)) |
Definition at line 30 of file staggered_dslash_test.cpp.
Referenced by init(), setGaugeParam(), and setInvertParam().
#define staggeredSpinorSiteSize 6 |
Definition at line 32 of file staggered_dslash_test.cpp.
Referenced by init().
void display_test_info | ( | ) |
Definition at line 606 of file staggered_dslash_test.cpp.
References dagger, dimPartitioned(), get_prec_str(), get_recon_str(), link_recon, prec, printfQuda, tdim, test_type, xdim, ydim, and zdim.
Referenced by main().
DslashTime dslashCUDA | ( | int | niter | ) |
Definition at line 436 of file staggered_dslash_test.cpp.
References comm_barrier(), DslashTime::cpu_max, DslashTime::cpu_min, DslashTime::cpu_time, quda::Dirac::Dslash(), end(), errorQuda, DslashTime::event_time, quda::Dirac::M(), niter, parity, and test_type.
Referenced by dslashTest().
|
static |
Definition at line 530 of file staggered_dslash_test.cpp.
References DslashTime::cpu_max, DslashTime::cpu_min, DslashTime::cpu_time, cudaSpinorOut, dslashCUDA(), end(), DslashTime::event_time, quda::blas::flops, quda::Dirac::Flops(), quda::ColorSpinorField::GhostBytes(), init(), niter, quda::blas::norm2(), printfQuda, qdp_fatlink_cpu, qdp_longlink_cpu, staggeredDslashRef(), verify_results, and warningQuda.
Referenced by main().
void end | ( | void | ) |
Definition at line 389 of file staggered_dslash_test.cpp.
References commDimPartitionedReset(), cpuFat, cpuLong, cudaSpinor, cudaSpinorOut, dirac, endQuda(), freeGaugeQuda(), qdp_fatlink_cpu, qdp_longlink_cpu, spinor, spinorOut, spinorRef, tmp, and tmpCpu.
Referenced by dslashCUDA(), and dslashTest().
double getTolerance | ( | QudaPrecision | prec | ) |
Definition at line 92 of file staggered_dslash_test.cpp.
References QUDA_DOUBLE_PRECISION, QUDA_HALF_PRECISION, QUDA_INVALID_PRECISION, QUDA_QUARTER_PRECISION, and QUDA_SINGLE_PRECISION.
Referenced by TEST().
void init | ( | ) |
Definition at line 175 of file staggered_dslash_test.cpp.
References applyGaugeFieldScaling_long(), argc_copy, argv_copy, checkCudaError, compute_fatlong, computeFatLongGPUandCPU(), construct_fat_long_gauge_field(), construct_gauge_field(), QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, quda::ColorSpinorParam::create, quda::Dirac::create(), csParam, QudaInvertParam_s::cuda_prec, device, dslash_type, dw_setDims(), eps_naik, errorQuda, quda::ColorSpinorParam::fieldOrder, QudaGaugeParam_s::ga_pad, QudaInvertParam_s::gamma_basis, quda::ColorSpinorParam::gammaBasis, gaugeSiteSize, quda::GaugeField::Ghost(), ghost_fatlink_cpu, ghost_longlink_cpu, quda::LatticeFieldParam::ghostExchange, gSize, initQuda(), latfile, link_recon, loadGaugeQuda(), MAX, memset(), n_naiks, quda::ColorSpinorParam::nColor, quda::LatticeFieldParam::nDim, newQudaGaugeParam(), newQudaInvertParam(), quda::ColorSpinorParam::nSpin, Nsrc, quda::LatticeFieldParam::pad, qdp_fatlink_cpu, qdp_inlink, qdp_longlink_cpu, QUDA_ASQTAD_DSLASH, QUDA_ASQTAD_FAT_LINKS, QUDA_ASQTAD_LONG_LINKS, QUDA_DOUBLE_PRECISION, QUDA_EVEN_ODD_SITE_ORDER, QUDA_FLOAT2_FIELD_ORDER, QUDA_FULL_SITE_SUBSET, QUDA_GHOST_EXCHANGE_PAD, QUDA_LAPLACE_DSLASH, QUDA_MAT_SOLUTION, QUDA_PARITY_SITE_SUBSET, QUDA_RANDOM_SOURCE, QUDA_RECONSTRUCT_12, QUDA_RECONSTRUCT_13, QUDA_RECONSTRUCT_8, QUDA_RECONSTRUCT_9, QUDA_RECONSTRUCT_NO, QUDA_SPACE_SPIN_COLOR_FIELD_ORDER, QUDA_STAGGERED_DSLASH, QUDA_STAGGERED_PHASE_NO, QUDA_SU3_LINKS, QUDA_ZERO_FIELD_CREATE, read_gauge_field(), QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_sloppy, reorderQDPtoMILC(), setDims(), quda::setDiracParam(), setGaugeParam(), setInvertParam(), quda::ColorSpinorParam::setPrecision(), setSpinorSiteSize(), setVerbosity(), quda::ColorSpinorParam::siteOrder, quda::LatticeFieldParam::siteSubset, QudaInvertParam_s::solution_type, quda::cpuColorSpinorField::Source(), QudaInvertParam_s::sp_pad, spinor, QudaGaugeParam_s::staggered_phase_type, staggeredSpinorSiteSize, test_type, tmp, quda::DiracParam::tmp1, QudaGaugeParam_s::type, V, verbosity, Vh, QudaGaugeParam_s::X, quda::LatticeFieldParam::x, and X.
Referenced by dslashTest().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 629 of file staggered_dslash_test.cpp.
References argc_copy, argv_copy, compute_fatlong, display_test_info(), dslash_type, dslashTest(), eps_naik, errorQuda, finalizeComms(), gridsize_from_cmdline, initComms(), latfile, n_naiks, prec, printfQuda, process_command_line_option(), QUDA_ASQTAD_DSLASH, QUDA_HALF_PRECISION, QUDA_LAPLACE_DSLASH, QUDA_STAGGERED_DSLASH, test_type, usage(), and warningQuda.
void setGaugeParam | ( | QudaGaugeParam & | gaugeParam | ) |
Definition at line 104 of file staggered_dslash_test.cpp.
References QudaGaugeParam_s::anisotropy, QudaGaugeParam_s::cpu_prec, QudaGaugeParam_s::cuda_prec, QudaGaugeParam_s::cuda_prec_sloppy, dslash_type, eps_naik, QudaGaugeParam_s::ga_pad, QudaGaugeParam_s::gauge_fix, QudaGaugeParam_s::gauge_order, link_recon, MAX, prec, QUDA_ANTI_PERIODIC_T, QUDA_ASQTAD_DSLASH, QUDA_DOUBLE_PRECISION, QUDA_GAUGE_FIXED_NO, QUDA_LAPLACE_DSLASH, QUDA_MILC_GAUGE_ORDER, QUDA_STAGGERED_DSLASH, QUDA_STAGGERED_PHASE_MILC, QUDA_WILSON_LINKS, QudaGaugeParam_s::reconstruct, QudaGaugeParam_s::reconstruct_sloppy, QudaGaugeParam_s::scale, QudaGaugeParam_s::staggered_phase_type, QudaGaugeParam_s::t_boundary, QudaGaugeParam_s::tadpole_coeff, tdim, QudaGaugeParam_s::type, QudaGaugeParam_s::X, X, xdim, ydim, and zdim.
Referenced by init().
void setInvertParam | ( | QudaInvertParam & | inv_param | ) |
Definition at line 150 of file staggered_dslash_test.cpp.
References QudaInvertParam_s::cpu_prec, QudaInvertParam_s::cuda_prec, dagger, QudaInvertParam_s::dagger, QudaInvertParam_s::dirac_order, dslash_type, QudaInvertParam_s::dslash_type, QudaInvertParam_s::gamma_basis, QudaInvertParam_s::input_location, kappa, QudaInvertParam_s::kappa, laplace3D, QudaInvertParam_s::laplace3D, mass, QudaInvertParam_s::mass, QudaInvertParam_s::mass_normalization, QudaInvertParam_s::matpc_type, MAX, QudaInvertParam_s::output_location, prec, QUDA_CPU_FIELD_LOCATION, QUDA_DEGRAND_ROSSI_GAMMA_BASIS, QUDA_DIRAC_ORDER, QUDA_DOUBLE_PRECISION, QUDA_MASS_NORMALIZATION, QUDA_MATPC_EVEN_EVEN, QudaInvertParam_s::sp_pad, verbosity, QudaInvertParam_s::verbosity, and X.
Referenced by init().
void staggeredDslashRef | ( | ) |
Definition at line 490 of file staggered_dslash_test.cpp.
References quda::axpy(), QudaGaugeParam_s::cpu_prec, QudaInvertParam_s::cpu_prec, dagger, dslash_type, errorQuda, quda::ColorSpinorField::Even(), ghost_fatlink_cpu, ghost_longlink_cpu, kappa, quda::ColorSpinorField::Length(), mass, matdagmat(), quda::ColorSpinorField::Odd(), parity, qdp_fatlink_cpu, qdp_longlink_cpu, QUDA_EVEN_PARITY, QUDA_LAPLACE_DSLASH, QUDA_ODD_PARITY, staggered_dslash(), test_type, quda::ColorSpinorField::V(), and quda::blas::xpay().
Referenced by dslashTest().
TEST | ( | dslash | , |
verify | |||
) |
Definition at line 524 of file staggered_dslash_test.cpp.
References quda::cpuColorSpinorField::Compare(), getTolerance(), quda::pow(), prec, and tol.
void usage | ( | char ** | argv | ) |
Definition at line 1783 of file test_util.cpp.
Referenced by main().
void usage_extra | ( | char ** | argv | ) |
Definition at line 619 of file staggered_dslash_test.cpp.
References printfQuda.
int argc_copy |
Definition at line 89 of file staggered_dslash_test.cpp.
char** argv_copy |
Definition at line 90 of file staggered_dslash_test.cpp.
bool compute_fatlong |
Definition at line 1655 of file test_util.cpp.
QudaPrecision cpu_prec |
Definition at line 66 of file contract_test.cpp.
Referenced by cpuSetGaugeParam(), dslashRef(), init(), invert_test(), main(), printQudaGaugeParam(), printQudaInvertParam(), read_field(), read_su3_field(), set_params(), setGaugeParam(), setInvertParam(), setMultigridParam(), write_field(), and write_su3_field().
cpuGaugeField* cpuFat = NULL |
Definition at line 44 of file staggered_dslash_test.cpp.
Referenced by end().
cpuGaugeField* cpuLong = NULL |
Definition at line 45 of file staggered_dslash_test.cpp.
Referenced by end().
cudaColorSpinorField* cudaSpinor |
Definition at line 48 of file staggered_dslash_test.cpp.
Referenced by end().
cudaColorSpinorField * cudaSpinorOut |
Definition at line 48 of file staggered_dslash_test.cpp.
Referenced by dslashTest(), and end().
QudaDagType dagger |
Definition at line 1620 of file test_util.cpp.
Referenced by display_test_info(), process_command_line_option(), setInvertParam(), and staggeredDslashRef().
int device |
Definition at line 1602 of file test_util.cpp.
Referenced by init().
Dirac* dirac |
Definition at line 86 of file staggered_dslash_test.cpp.
Referenced by end().
QudaDslashType dslash_type |
Definition at line 1621 of file test_util.cpp.
Referenced by init(), main(), setGaugeParam(), setInvertParam(), and staggeredDslashRef().
double eps_naik |
Definition at line 1652 of file test_util.cpp.
Referenced by init(), main(), and setGaugeParam().
QudaGaugeParam gaugeParam |
Definition at line 41 of file staggered_dslash_test.cpp.
void** ghost_fatlink_cpu |
Definition at line 53 of file staggered_dslash_test.cpp.
Referenced by init(), and staggeredDslashRef().
void ** ghost_longlink_cpu |
Definition at line 53 of file staggered_dslash_test.cpp.
Referenced by init(), and staggeredDslashRef().
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().
QudaInvertParam inv_param |
Definition at line 42 of file staggered_dslash_test.cpp.
double kappa |
Definition at line 1647 of file test_util.cpp.
Referenced by setInvertParam(), and staggeredDslashRef().
int laplace3D |
Definition at line 1622 of file test_util.cpp.
Referenced by setInvertParam().
char latfile[] |
Definition at line 1623 of file test_util.cpp.
QudaReconstructType link_recon |
Definition at line 1605 of file test_util.cpp.
Referenced by display_test_info(), init(), and setGaugeParam().
QudaReconstructType link_recon_sloppy |
Definition at line 1606 of file test_util.cpp.
double mass |
Definition at line 1646 of file test_util.cpp.
Referenced by setInvertParam(), and staggeredDslashRef().
|
static |
Definition at line 77 of file staggered_dslash_test.cpp.
int niter |
Definition at line 1629 of file test_util.cpp.
Referenced by dslashCUDA(), and dslashTest().
int Nsrc |
Definition at line 1627 of file test_util.cpp.
Referenced by init().
QudaParity parity = QUDA_EVEN_PARITY |
Definition at line 55 of file staggered_dslash_test.cpp.
Referenced by dslashCUDA(), and staggeredDslashRef().
QudaPrecision prec |
Definition at line 1608 of file test_util.cpp.
Referenced by display_test_info(), main(), setGaugeParam(), setInvertParam(), and TEST().
QudaPrecision prec_sloppy |
Definition at line 1609 of file test_util.cpp.
void* qdp_fatlink_cpu[4] |
Definition at line 52 of file staggered_dslash_test.cpp.
Referenced by dslashTest(), end(), init(), and staggeredDslashRef().
void* qdp_inlink[4] = { nullptr, nullptr, nullptr, nullptr } |
Definition at line 39 of file staggered_dslash_test.cpp.
Referenced by init().
void * qdp_longlink_cpu[4] |
Definition at line 52 of file staggered_dslash_test.cpp.
Referenced by dslashTest(), end(), init(), and staggeredDslashRef().
cpuColorSpinorField* spinor |
Definition at line 47 of file staggered_dslash_test.cpp.
cpuColorSpinorField * spinorOut |
Definition at line 47 of file staggered_dslash_test.cpp.
Referenced by end().
cpuColorSpinorField * spinorRef |
Definition at line 47 of file staggered_dslash_test.cpp.
Referenced by end().
int tdim |
Definition at line 1618 of file test_util.cpp.
Referenced by display_test_info(), and setGaugeParam().
int test_type |
Definition at line 1636 of file test_util.cpp.
Referenced by display_test_info(), dslashCUDA(), init(), main(), and staggeredDslashRef().
cudaColorSpinorField* tmp |
Definition at line 49 of file staggered_dslash_test.cpp.
cpuColorSpinorField * tmpCpu |
Definition at line 47 of file staggered_dslash_test.cpp.
Referenced by end().
QudaVerbosity verbosity |
Definition at line 1614 of file test_util.cpp.
Referenced by init(), and setInvertParam().
bool verify_results |
Definition at line 1643 of file test_util.cpp.
Referenced by dslashTest().
int X[4] |
Definition at line 81 of file staggered_dslash_test.cpp.
Referenced by init(), setGaugeParam(), and setInvertParam().
int xdim |
Definition at line 1615 of file test_util.cpp.
Referenced by display_test_info(), and setGaugeParam().
int ydim |
Definition at line 1616 of file test_util.cpp.
Referenced by display_test_info(), and setGaugeParam().
int zdim |
Definition at line 1617 of file test_util.cpp.
Referenced by display_test_info(), and setGaugeParam().