QUDA
v1.1.0
A library for QCD on GPUs
|
#include <limits>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <short.h>
#include <comm_quda.h>
#include <mpi_comm_handle.h>
#include <color_spinor_field.h>
#include <unitarization_links.h>
#include <dslash_quda.h>
#include <llfat_utils.h>
#include <staggered_gauge_utils.h>
#include <host_utils.h>
#include <command_line_params.h>
#include <misc.h>
#include <qio_field.h>
Go to the source code of this file.
Macros | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | XUP 0 |
#define | YUP 1 |
#define | ZUP 2 |
#define | TUP 3 |
Functions | |
void | setQudaPrecisions () |
void | setQudaMgSolveTypes () |
void | setQudaDefaultMgTestParams () |
void | constructQudaGaugeField (void **gauge, int type, QudaPrecision precision, QudaGaugeParam *param) |
void | constructHostGaugeField (void **gauge, QudaGaugeParam &gauge_param, int argc, char **argv) |
void | constructHostCloverField (void *clover, void *clover_inv, QudaInvertParam &inv_param) |
void | constructQudaCloverField (void *clover, double norm, double diag, QudaPrecision precision) |
void | constructWilsonTestSpinorParam (quda::ColorSpinorParam *cs_param, const QudaInvertParam *inv_param, const QudaGaugeParam *gauge_param) |
void | constructRandomSpinorSource (void *v, int nSpin, int nColor, QudaPrecision precision, QudaSolutionType sol_type, const int *const x, quda::RNG &rng) |
void | initComms (int argc, char **argv, std::array< int, 4 > &commDims) |
void | initComms (int argc, char **argv, int *const commDims) |
void | finalizeComms () |
void | initRand () |
void | setDims (int *X) |
void | dw_setDims (int *X, const int L5) |
int | dimPartitioned (int dim) |
bool | last_node_in_t () |
int | index_4d_cb_from_coordinate_4d (const int coordinate[4], const int dim[4]) |
void | coordinate_from_shrinked_index (int coordinate[4], int shrinked_index, const int shrinked_dim[4], const int shift[4], int parity) |
int | neighborIndex (int i, int oddBit, int dx4, int dx3, int dx2, int dx1) |
int | neighborIndex (int dim[4], int index, int oddBit, int dx[4]) |
int | neighborIndex_mg (int i, int oddBit, int dx4, int dx3, int dx2, int dx1) |
int | neighborIndexFullLattice (int i, int dx4, int dx3, int dx2, int dx1) |
int | neighborIndexFullLattice (int dim[4], int index, int dx[4]) |
int | neighborIndexFullLattice_mg (int i, int dx4, int dx3, int dx2, int dx1) |
void | printSpinorElement (void *spinor, int X, QudaPrecision precision) |
void | printGaugeElement (void *gauge, int X, QudaPrecision precision) |
int | fullLatticeIndex (int dim[4], int index, int oddBit) |
int | fullLatticeIndex (int i, int oddBit) |
const char * | __asan_default_options () |
Set the default ASAN options. This ensures that QUDA just works when SANITIZE is enabled without requiring ASAN_OPTIONS to be set. More... | |
void | get_size_from_env (int *const dims, const char env[]) |
int | lex_rank_from_coords_t (const int *coords, void *fdata) |
int | lex_rank_from_coords_x (const int *coords, void *fdata) |
template<typename Float > | |
void | printVector (Float *v) |
int | getOddBit (int Y) |
template<typename Float > | |
void | complexAddTo (Float *a, Float *b) |
template<typename Float > | |
void | complexProduct (Float *a, Float *b, Float *c) |
template<typename Float > | |
void | complexConjugateProduct (Float *a, Float *b, Float *c) |
template<typename Float > | |
void | complexDotProduct (Float *a, Float *b, Float *c) |
template<typename Float > | |
void | accumulateComplexProduct (Float *a, Float *b, Float *c, Float sign) |
template<typename Float > | |
void | accumulateComplexDotProduct (Float *a, Float *b, Float *c) |
template<typename Float > | |
void | accumulateConjugateProduct (Float *a, Float *b, Float *c, int sign) |
template<typename Float > | |
void | su3Construct12 (Float *mat) |
template<typename Float > | |
void | su3Construct8 (Float *mat) |
void | su3_construct (void *mat, QudaReconstructType reconstruct, QudaPrecision precision) |
void | su3_reconstruct (void *mat, int dir, int ga_idx, QudaReconstructType reconstruct, QudaPrecision precision, QudaGaugeParam *param) |
int | compare_floats (void *a, void *b, int len, double epsilon, QudaPrecision precision) |
int | fullLatticeIndex_4d (int i, int oddBit) |
int | fullLatticeIndex_5d (int i, int oddBit) |
int | fullLatticeIndex_5d_4dpc (int i, int oddBit) |
int | x4_from_full_index (int i) |
template<typename Float > | |
void | applyGaugeFieldScaling (Float **gauge, int Vh, QudaGaugeParam *param) |
template<typename Float > | |
void | constructUnitGaugeField (Float **res, QudaGaugeParam *param) |
template void | constructUnitGaugeField (float **res, QudaGaugeParam *param) |
template void | constructUnitGaugeField (double **res, QudaGaugeParam *param) |
template<typename Float > | |
void | constructRandomGaugeField (Float **res, QudaGaugeParam *param, QudaDslashType dslash_type) |
template void | constructRandomGaugeField (float **res, QudaGaugeParam *param, QudaDslashType dslash_type) |
template void | constructRandomGaugeField (double **res, QudaGaugeParam *param, QudaDslashType dslash_type) |
template<typename Float > | |
void | constructUnitaryGaugeField (Float **res) |
template<typename Float > | |
void | constructCloverField (Float *res, double norm, double diag) |
void | check_gauge (void **oldG, void **newG, double epsilon, QudaPrecision precision) |
void | createSiteLinkCPU (void **link, QudaPrecision precision, int phase) |
template<typename Float > | |
int | compareLink (Float **linkA, Float **linkB, int len) |
int | strong_check_link (void **linkA, const char *msgA, void **linkB, const char *msgB, int len, QudaPrecision prec) |
void | createMomCPU (void *mom, QudaPrecision precision) |
void | createHwCPU (void *hw, QudaPrecision precision) |
template<typename Float > | |
int | compare_mom (Float *momA, Float *momB, int len) |
int | strong_check_mom (void *momA, void *momB, int len, QudaPrecision prec) |
template<typename real > | |
double | mom_action (real *mom_, int len) |
double | mom_action (void *mom, QudaPrecision prec, int len) |
Host reference implementation of the momentum action contribution. More... | |
void | stopwatchStart () |
double | stopwatchReadSeconds () |
void | performanceStats (std::vector< double > &time, std::vector< double > &gflops, std::vector< int > &iter) |
Variables | |
int | Z [4] |
int | V |
int | Vh |
int | Vs_x |
int | Vs_y |
int | Vs_z |
int | Vs_t |
int | Vsh_x |
int | Vsh_y |
int | Vsh_z |
int | Vsh_t |
int | faceVolume [4] |
int | E1 |
int | E1h |
int | E2 |
int | E3 |
int | E4 |
int | E [4] |
int | V_ex |
int | Vh_ex |
int | Ls |
int | V5 |
int | V5h |
double | kappa5 |
float | fat_link_max |
QudaPrecision | local_prec = QUDA_DOUBLE_PRECISION |
QudaPrecision & | cpu_prec = local_prec |
QudaPrecision & | cuda_prec = prec |
QudaPrecision & | cuda_prec_sloppy = prec_sloppy |
QudaPrecision & | cuda_prec_refinement_sloppy = prec_refinement_sloppy |
QudaPrecision & | cuda_prec_precondition = prec_precondition |
QudaPrecision & | cuda_prec_eigensolver = prec_eigensolver |
QudaPrecision & | cuda_prec_ritz = prec_ritz |
size_t | host_gauge_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
size_t | host_spinor_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
size_t | host_clover_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
Definition at line 27 of file host_utils.cpp.
#define TUP 3 |
Definition at line 34 of file host_utils.cpp.
#define XUP 0 |
Definition at line 31 of file host_utils.cpp.
#define YUP 1 |
Definition at line 32 of file host_utils.cpp.
#define ZUP 2 |
Definition at line 33 of file host_utils.cpp.
const char* __asan_default_options | ( | ) |
Set the default ASAN options. This ensures that QUDA just works when SANITIZE is enabled without requiring ASAN_OPTIONS to be set.
Definition at line 638 of file host_utils.cpp.
|
inline |
Definition at line 727 of file host_utils.cpp.
|
inline |
Definition at line 720 of file host_utils.cpp.
|
inline |
Definition at line 733 of file host_utils.cpp.
void applyGaugeFieldScaling | ( | Float ** | gauge, |
int | Vh, | ||
QudaGaugeParam * | param | ||
) |
Definition at line 968 of file host_utils.cpp.
void check_gauge | ( | void ** | oldG, |
void ** | newG, | ||
double | epsilon, | ||
QudaPrecision | precision | ||
) |
Definition at line 1255 of file host_utils.cpp.
int compare_floats | ( | void * | a, |
void * | b, | ||
int | len, | ||
double | epsilon, | ||
QudaPrecision | precision | ||
) |
Definition at line 889 of file host_utils.cpp.
int compare_mom | ( | Float * | momA, |
Float * | momB, | ||
int | len | ||
) |
Definition at line 1504 of file host_utils.cpp.
int compareLink | ( | Float ** | linkA, |
Float ** | linkB, | ||
int | len | ||
) |
Definition at line 1367 of file host_utils.cpp.
|
inline |
Definition at line 692 of file host_utils.cpp.
|
inline |
Definition at line 706 of file host_utils.cpp.
|
inline |
Definition at line 713 of file host_utils.cpp.
|
inline |
Definition at line 699 of file host_utils.cpp.
void constructCloverField | ( | Float * | res, |
double | norm, | ||
double | diag | ||
) |
Definition at line 1189 of file host_utils.cpp.
void constructHostCloverField | ( | void * | clover, |
void * | clover_inv, | ||
QudaInvertParam & | inv_param | ||
) |
Definition at line 186 of file host_utils.cpp.
void constructHostGaugeField | ( | void ** | gauge, |
QudaGaugeParam & | gauge_param, | ||
int | argc, | ||
char ** | argv | ||
) |
Definition at line 166 of file host_utils.cpp.
void constructQudaCloverField | ( | void * | clover, |
double | norm, | ||
double | diag, | ||
QudaPrecision | precision | ||
) |
Definition at line 199 of file host_utils.cpp.
void constructQudaGaugeField | ( | void ** | gauge, |
int | type, | ||
QudaPrecision | precision, | ||
QudaGaugeParam * | param | ||
) |
Definition at line 146 of file host_utils.cpp.
template void constructRandomGaugeField | ( | double ** | res, |
QudaGaugeParam * | param, | ||
QudaDslashType | dslash_type | ||
) |
void constructRandomGaugeField | ( | Float ** | res, |
QudaGaugeParam * | param, | ||
QudaDslashType | dslash_type | ||
) |
Definition at line 1049 of file host_utils.cpp.
template void constructRandomGaugeField | ( | float ** | res, |
QudaGaugeParam * | param, | ||
QudaDslashType | dslash_type | ||
) |
void constructRandomSpinorSource | ( | void * | v, |
int | nSpin, | ||
int | nColor, | ||
QudaPrecision | precision, | ||
QudaSolutionType | sol_type, | ||
const int *const | x, | ||
quda::RNG & | rng | ||
) |
Definition at line 235 of file host_utils.cpp.
void constructUnitaryGaugeField | ( | Float ** | res | ) |
Definition at line 1130 of file host_utils.cpp.
template void constructUnitGaugeField | ( | double ** | res, |
QudaGaugeParam * | param | ||
) |
void constructUnitGaugeField | ( | Float ** | res, |
QudaGaugeParam * | param | ||
) |
Definition at line 1006 of file host_utils.cpp.
template void constructUnitGaugeField | ( | float ** | res, |
QudaGaugeParam * | param | ||
) |
void constructWilsonTestSpinorParam | ( | quda::ColorSpinorParam * | cs_param, |
const QudaInvertParam * | inv_param, | ||
const QudaGaugeParam * | gauge_param | ||
) |
Definition at line 207 of file host_utils.cpp.
void coordinate_from_shrinked_index | ( | int | coordinate[4], |
int | shrinked_index, | ||
const int | shrinked_dim[4], | ||
const int | shift[4], | ||
int | parity | ||
) |
Definition at line 393 of file host_utils.cpp.
void createHwCPU | ( | void * | hw, |
QudaPrecision | precision | ||
) |
Definition at line 1485 of file host_utils.cpp.
void createMomCPU | ( | void * | mom, |
QudaPrecision | precision | ||
) |
Definition at line 1450 of file host_utils.cpp.
void createSiteLinkCPU | ( | void ** | link, |
QudaPrecision | precision, | ||
int | phase | ||
) |
Definition at line 1263 of file host_utils.cpp.
int dimPartitioned | ( | int | dim | ) |
Definition at line 376 of file host_utils.cpp.
void dw_setDims | ( | int * | X, |
const int | L5 | ||
) |
Definition at line 353 of file host_utils.cpp.
void finalizeComms | ( | ) |
Definition at line 292 of file host_utils.cpp.
int fullLatticeIndex | ( | int | dim[4], |
int | index, | ||
int | oddBit | ||
) |
Definition at line 591 of file host_utils.cpp.
int fullLatticeIndex | ( | int | i, |
int | oddBit | ||
) |
Definition at line 605 of file host_utils.cpp.
int fullLatticeIndex_4d | ( | int | i, |
int | oddBit | ||
) |
Definition at line 902 of file host_utils.cpp.
int fullLatticeIndex_5d | ( | int | i, |
int | oddBit | ||
) |
Definition at line 940 of file host_utils.cpp.
int fullLatticeIndex_5d_4dpc | ( | int | i, |
int | oddBit | ||
) |
Definition at line 947 of file host_utils.cpp.
void get_size_from_env | ( | int *const | dims, |
const char | env[] | ||
) |
For MPI, the default node mapping is lexicographical with t varying fastest.
Definition at line 645 of file host_utils.cpp.
int getOddBit | ( | int | Y | ) |
Definition at line 682 of file host_utils.cpp.
int index_4d_cb_from_coordinate_4d | ( | const int | coordinate[4], |
const int | dim[4] | ||
) |
Definition at line 388 of file host_utils.cpp.
void initComms | ( | int | argc, |
char ** | argv, | ||
int *const | commDims | ||
) |
Definition at line 257 of file host_utils.cpp.
void initComms | ( | int | argc, |
char ** | argv, | ||
std::array< int, 4 > & | commDims | ||
) |
Definition at line 255 of file host_utils.cpp.
void initRand | ( | ) |
Definition at line 302 of file host_utils.cpp.
bool last_node_in_t | ( | ) |
Definition at line 378 of file host_utils.cpp.
int lex_rank_from_coords_t | ( | const int * | coords, |
void * | fdata | ||
) |
Definition at line 662 of file host_utils.cpp.
int lex_rank_from_coords_x | ( | const int * | coords, |
void * | fdata | ||
) |
Definition at line 669 of file host_utils.cpp.
double mom_action | ( | real * | mom_, |
int | len | ||
) |
Definition at line 1586 of file host_utils.cpp.
double mom_action | ( | void * | mom, |
QudaPrecision | prec, | ||
int | len | ||
) |
Host reference implementation of the momentum action contribution.
Definition at line 1601 of file host_utils.cpp.
int neighborIndex | ( | int | dim[4], |
int | index, | ||
int | oddBit, | ||
int | dx[4] | ||
) |
Definition at line 441 of file host_utils.cpp.
int neighborIndex | ( | int | i, |
int | oddBit, | ||
int | dx4, | ||
int | dx3, | ||
int | dx2, | ||
int | dx1 | ||
) |
Definition at line 423 of file host_utils.cpp.
int neighborIndex_mg | ( | int | i, |
int | oddBit, | ||
int | dx4, | ||
int | dx3, | ||
int | dx2, | ||
int | dx1 | ||
) |
Definition at line 457 of file host_utils.cpp.
int neighborIndexFullLattice | ( | int | dim[4], |
int | index, | ||
int | dx[4] | ||
) |
Definition at line 508 of file host_utils.cpp.
int neighborIndexFullLattice | ( | int | i, |
int | dx4, | ||
int | dx3, | ||
int | dx2, | ||
int | dx1 | ||
) |
Definition at line 490 of file host_utils.cpp.
int neighborIndexFullLattice_mg | ( | int | i, |
int | dx4, | ||
int | dx3, | ||
int | dx2, | ||
int | dx1 | ||
) |
Definition at line 528 of file host_utils.cpp.
void performanceStats | ( | std::vector< double > & | time, |
std::vector< double > & | gflops, | ||
std::vector< int > & | iter | ||
) |
Definition at line 1627 of file host_utils.cpp.
void printGaugeElement | ( | void * | gauge, |
int | X, | ||
QudaPrecision | precision | ||
) |
Definition at line 575 of file host_utils.cpp.
void printSpinorElement | ( | void * | spinor, |
int | X, | ||
QudaPrecision | precision | ||
) |
Definition at line 566 of file host_utils.cpp.
void printVector | ( | Float * | v | ) |
Definition at line 676 of file host_utils.cpp.
void setDims | ( | int * | X | ) |
Definition at line 315 of file host_utils.cpp.
void setQudaDefaultMgTestParams | ( | ) |
Definition at line 89 of file host_utils.cpp.
void setQudaMgSolveTypes | ( | ) |
Definition at line 81 of file host_utils.cpp.
void setQudaPrecisions | ( | ) |
Definition at line 69 of file host_utils.cpp.
double stopwatchReadSeconds | ( | ) |
Definition at line 1617 of file host_utils.cpp.
void stopwatchStart | ( | ) |
Definition at line 1615 of file host_utils.cpp.
int strong_check_link | ( | void ** | linkA, |
const char * | msgA, | ||
void ** | linkB, | ||
const char * | msgB, | ||
int | len, | ||
QudaPrecision | prec | ||
) |
Definition at line 1428 of file host_utils.cpp.
int strong_check_mom | ( | void * | momA, |
void * | momB, | ||
int | len, | ||
QudaPrecision | prec | ||
) |
Definition at line 1551 of file host_utils.cpp.
void su3_construct | ( | void * | mat, |
QudaReconstructType | reconstruct, | ||
QudaPrecision | precision | ||
) |
Definition at line 758 of file host_utils.cpp.
void su3_reconstruct | ( | void * | mat, |
int | dir, | ||
int | ga_idx, | ||
QudaReconstructType | reconstruct, | ||
QudaPrecision | precision, | ||
QudaGaugeParam * | param | ||
) |
Definition at line 861 of file host_utils.cpp.
|
inline |
Definition at line 739 of file host_utils.cpp.
|
inline |
Definition at line 751 of file host_utils.cpp.
int x4_from_full_index | ( | int | i | ) |
Definition at line 953 of file host_utils.cpp.
QudaPrecision& cpu_prec = local_prec |
Definition at line 57 of file host_utils.cpp.
QudaPrecision& cuda_prec = prec |
Definition at line 58 of file host_utils.cpp.
QudaPrecision& cuda_prec_eigensolver = prec_eigensolver |
Definition at line 62 of file host_utils.cpp.
QudaPrecision& cuda_prec_precondition = prec_precondition |
Definition at line 61 of file host_utils.cpp.
QudaPrecision& cuda_prec_refinement_sloppy = prec_refinement_sloppy |
Definition at line 60 of file host_utils.cpp.
QudaPrecision& cuda_prec_ritz = prec_ritz |
Definition at line 63 of file host_utils.cpp.
QudaPrecision& cuda_prec_sloppy = prec_sloppy |
Definition at line 59 of file host_utils.cpp.
int E[4] |
Definition at line 45 of file host_utils.cpp.
int E1 |
Definition at line 44 of file host_utils.cpp.
int E1h |
Definition at line 44 of file host_utils.cpp.
int E2 |
Definition at line 44 of file host_utils.cpp.
int E3 |
Definition at line 44 of file host_utils.cpp.
int E4 |
Definition at line 44 of file host_utils.cpp.
int faceVolume[4] |
Definition at line 41 of file host_utils.cpp.
|
extern |
size_t host_clover_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
Definition at line 67 of file host_utils.cpp.
size_t host_gauge_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
Definition at line 65 of file host_utils.cpp.
size_t host_spinor_data_type_size = (cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float) |
Definition at line 66 of file host_utils.cpp.
double kappa5 |
Definition at line 51 of file host_utils.cpp.
QudaPrecision local_prec = QUDA_DOUBLE_PRECISION |
Definition at line 56 of file host_utils.cpp.
int Ls |
Definition at line 48 of file host_utils.cpp.
int V |
Definition at line 37 of file host_utils.cpp.
int V5 |
Definition at line 49 of file host_utils.cpp.
int V5h |
Definition at line 50 of file host_utils.cpp.
int V_ex |
Definition at line 46 of file host_utils.cpp.
int Vh |
Definition at line 38 of file host_utils.cpp.
int Vh_ex |
Definition at line 46 of file host_utils.cpp.
int Vs_t |
Definition at line 39 of file host_utils.cpp.
int Vs_x |
Definition at line 39 of file host_utils.cpp.
int Vs_y |
Definition at line 39 of file host_utils.cpp.
int Vs_z |
Definition at line 39 of file host_utils.cpp.
int Vsh_t |
Definition at line 40 of file host_utils.cpp.
int Vsh_x |
Definition at line 40 of file host_utils.cpp.
int Vsh_y |
Definition at line 40 of file host_utils.cpp.
int Vsh_z |
Definition at line 40 of file host_utils.cpp.
int Z[4] |
Definition at line 36 of file host_utils.cpp.