|
QUDA v0.4.0
A library for QCD on GPUs
|
#include <iostream>#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <sys/time.h>#include <quda.h>#include <quda_internal.h>#include <comm_quda.h>#include <tune_quda.h>#include <blas_quda.h>#include <gauge_field.h>#include <dirac_quda.h>#include <dslash_quda.h>#include <invert_quda.h>#include <color_spinor_field.h>#include <clover_field.h>#include <llfat_quda.h>#include <fat_force_quda.h>#include <hisq_links_quda.h>#include <cuda.h>#include "check_params.h"#include "face_quda.h"Go to the source code of this file.
Defines | |
| #define | MAX(a, b) ((a)>(b)? (a):(b)) |
| #define | TDIFF(a, b) (b.tv_sec - a.tv_sec + 0.000001*(b.tv_usec - a.tv_usec)) |
| #define | spinorSiteSize 24 |
| #define | MAX_GPU_NUM_PER_NODE 16 |
| #define | INIT_PARAM |
| #define | CHECK_PARAM |
| #define | PRINT_PARAM |
Functions | |
| int | getGpuCount () |
| void | initQuda (int dev) |
| void | loadGaugeQuda (void *h_gauge, QudaGaugeParam *param) |
| void | saveGaugeQuda (void *h_gauge, QudaGaugeParam *param) |
| void | loadCloverQuda (void *h_clover, void *h_clovinv, QudaInvertParam *inv_param) |
| void | freeGaugeQuda (void) |
| void | freeCloverQuda (void) |
| void | endQuda (void) |
| void | setDiracParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc) |
| void | setDiracSloppyParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc) |
| void | setDiracPreParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc) |
| void | dslashQuda (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity parity) |
| void | MatQuda (void *h_out, void *h_in, QudaInvertParam *inv_param) |
| void | MatDagMatQuda (void *h_out, void *h_in, QudaInvertParam *inv_param) |
| void | createDirac (Dirac *&d, Dirac *&dSloppy, Dirac *&dPre, QudaInvertParam ¶m, const bool pc_solve) |
| cudaGaugeField * | checkGauge (QudaInvertParam *param) |
| void | invertQuda (void *hp_x, void *hp_b, QudaInvertParam *param) |
| void | invertMultiShiftQuda (void **_hp_x, void *_hp_b, QudaInvertParam *param, double *offsets, int num_offsets, double *residue_sq) |
| void | record_gauge (int *X, void *_fatlink, int _fatlink_pad, void *_longlink, int _longlink_pad, QudaReconstructType _longlink_recon, QudaReconstructType _longlink_recon_sloppy, QudaGaugeParam *_param) |
| void | do_create_precise_cuda_gauge (void) |
| void | do_create_sloppy_cuda_gauge (void) |
| void | invertMultiShiftQudaMixed (void **_hp_x, void *_hp_b, QudaInvertParam *param, double *offsets, int num_offsets, double *residue_sq) |
| void | initCommsQuda (int argc, char **argv, const int *X, const int nDim) |
| void | endCommsQuda () |
Variables | |
| int | numa_affinity_enabled = 1 |
| cudaGaugeField * | gaugePrecise = NULL |
| cudaGaugeField * | gaugeSloppy = NULL |
| cudaGaugeField * | gaugePrecondition = NULL |
| cudaGaugeField * | gaugeFatPrecise = NULL |
| cudaGaugeField * | gaugeFatSloppy = NULL |
| cudaGaugeField * | gaugeFatPrecondition = NULL |
| cudaGaugeField * | gaugeLongPrecise = NULL |
| cudaGaugeField * | gaugeLongSloppy = NULL |
| cudaGaugeField * | gaugeLongPrecondition = NULL |
| cudaCloverField * | cloverPrecise = NULL |
| cudaCloverField * | cloverSloppy = NULL |
| cudaCloverField * | cloverPrecondition = NULL |
| cudaDeviceProp | deviceProp |
| cudaStream_t * | streams |
| #define CHECK_PARAM |
Definition at line 55 of file interface_quda.cpp.
| #define INIT_PARAM |
Definition at line 50 of file interface_quda.cpp.
| #define MAX | ( | a, | |
| b | |||
| ) | ((a)>(b)? (a):(b)) |
Definition at line 42 of file interface_quda.cpp.
| #define MAX_GPU_NUM_PER_NODE 16 |
Definition at line 47 of file interface_quda.cpp.
| #define PRINT_PARAM |
Definition at line 60 of file interface_quda.cpp.
| #define spinorSiteSize 24 |
Definition at line 45 of file interface_quda.cpp.
| #define TDIFF | ( | a, | |
| b | |||
| ) | (b.tv_sec - a.tv_sec + 0.000001*(b.tv_usec - a.tv_usec)) |
Definition at line 43 of file interface_quda.cpp.
| cudaGaugeField* checkGauge | ( | QudaInvertParam * | param | ) |
Definition at line 766 of file interface_quda.cpp.
| void createDirac | ( | Dirac *& | d, |
| Dirac *& | dSloppy, | ||
| Dirac *& | dPre, | ||
| QudaInvertParam & | param, | ||
| const bool | pc_solve | ||
| ) |
Definition at line 751 of file interface_quda.cpp.
| void do_create_precise_cuda_gauge | ( | void | ) |
Definition at line 1178 of file interface_quda.cpp.
| void do_create_sloppy_cuda_gauge | ( | void | ) |
Definition at line 1222 of file interface_quda.cpp.
| void dslashQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param, | ||
| QudaParity | parity | ||
| ) |
Apply the Dslash operator (D_{eo} or D_{oe})
Definition at line 633 of file interface_quda.cpp.
| void endCommsQuda | ( | ) |
Definition at line 1909 of file interface_quda.cpp.
| void endQuda | ( | void | ) |
Finalize the library
Definition at line 431 of file interface_quda.cpp.
| void freeCloverQuda | ( | void | ) |
Free QUDA's internal copy of the clover term and/or clover inverse.
Definition at line 420 of file interface_quda.cpp.
| void freeGaugeQuda | ( | void | ) |
Free QUDA's internal copy of the gauge field.
Definition at line 393 of file interface_quda.cpp.
| int getGpuCount | ( | ) |
Definition at line 95 of file interface_quda.cpp.
| void initCommsQuda | ( | int | argc, |
| char ** | argv, | ||
| const int * | X, | ||
| const int | nDim | ||
| ) |
Definition at line 1880 of file interface_quda.cpp.
| void initQuda | ( | int | device | ) |
Initialize the library.
| device | CUDA device number to use. In a multi-GPU build, this parameter may be either set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes. |
Definition at line 108 of file interface_quda.cpp.
| void invertMultiShiftQuda | ( | void ** | _hp_x, |
| void * | _hp_b, | ||
| QudaInvertParam * | param, | ||
| double * | offsets, | ||
| int | num_offsets, | ||
| double * | residue_sq | ||
| ) |
Generic version of the multi-shift solver. Should work for most fermions. Note, offset[0] is not folded into the mass parameter
Definition at line 944 of file interface_quda.cpp.
| void invertMultiShiftQudaMixed | ( | void ** | _hp_x, |
| void * | _hp_b, | ||
| QudaInvertParam * | param, | ||
| double * | offsets, | ||
| int | num_offsets, | ||
| double * | residue_sq | ||
| ) |
Mixed-precision multi-shift solver. In the future, this functionality will be folded into invertMultiShiftQuda().
Definition at line 1269 of file interface_quda.cpp.
| void invertQuda | ( | void * | h_x, |
| void * | h_b, | ||
| QudaInvertParam * | param | ||
| ) |
Perform the solve, according to the parameters set in param. It is assumed that the gauge field has already been loaded via loadGaugeQuda().
Definition at line 786 of file interface_quda.cpp.
| void loadCloverQuda | ( | void * | h_clover, |
| void * | h_clovinv, | ||
| QudaInvertParam * | inv_param | ||
| ) |
Load the clover term and/or the clover inverse from the host. Either h_clover or h_clovinv may be set to NULL.
Definition at line 315 of file interface_quda.cpp.
| void loadGaugeQuda | ( | void * | h_gauge, |
| QudaGaugeParam * | param | ||
| ) |
Load the gauge field from the host.
Definition at line 205 of file interface_quda.cpp.
| void MatDagMatQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param | ||
| ) |
Apply M^{}M, possibly even/odd preconditioned
Definition at line 709 of file interface_quda.cpp.
| void MatQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param | ||
| ) |
Apply the full Dslash matrix, possibly even/odd preconditioned
Definition at line 668 of file interface_quda.cpp.
| void record_gauge | ( | int * | X, |
| void * | _fatlink, | ||
| int | _fatlink_pad, | ||
| void * | _longlink, | ||
| int | _longlink_pad, | ||
| QudaReconstructType | _longlink_recon, | ||
| QudaReconstructType | _longlink_recon_sloppy, | ||
| QudaGaugeParam * | _param | ||
| ) |
Definition at line 1146 of file interface_quda.cpp.
| void saveGaugeQuda | ( | void * | h_gauge, |
| QudaGaugeParam * | param | ||
| ) |
Save the gauge field to the host.
Definition at line 289 of file interface_quda.cpp.
| void setDiracParam | ( | DiracParam & | diracParam, |
| QudaInvertParam * | inv_param, | ||
| const bool | pc | ||
| ) |
Definition at line 451 of file interface_quda.cpp.
| void setDiracPreParam | ( | DiracParam & | diracParam, |
| QudaInvertParam * | inv_param, | ||
| const bool | pc | ||
| ) |
Definition at line 512 of file interface_quda.cpp.
| void setDiracSloppyParam | ( | DiracParam & | diracParam, |
| QudaInvertParam * | inv_param, | ||
| const bool | pc | ||
| ) |
Definition at line 496 of file interface_quda.cpp.
| cudaCloverField* cloverPrecise = NULL |
Definition at line 88 of file interface_quda.cpp.
| cudaCloverField* cloverPrecondition = NULL |
Definition at line 90 of file interface_quda.cpp.
| cudaCloverField* cloverSloppy = NULL |
Definition at line 89 of file interface_quda.cpp.
| cudaDeviceProp deviceProp |
Definition at line 92 of file interface_quda.cpp.
| cudaGaugeField* gaugeFatPrecise = NULL |
Definition at line 80 of file interface_quda.cpp.
| cudaGaugeField* gaugeFatPrecondition = NULL |
Definition at line 82 of file interface_quda.cpp.
| cudaGaugeField* gaugeFatSloppy = NULL |
Definition at line 81 of file interface_quda.cpp.
| cudaGaugeField* gaugeLongPrecise = NULL |
Definition at line 84 of file interface_quda.cpp.
| cudaGaugeField* gaugeLongPrecondition = NULL |
Definition at line 86 of file interface_quda.cpp.
| cudaGaugeField* gaugeLongSloppy = NULL |
Definition at line 85 of file interface_quda.cpp.
| cudaGaugeField* gaugePrecise = NULL |
Definition at line 76 of file interface_quda.cpp.
| cudaGaugeField* gaugePrecondition = NULL |
Definition at line 78 of file interface_quda.cpp.
| cudaGaugeField* gaugeSloppy = NULL |
Definition at line 77 of file interface_quda.cpp.
| int numa_affinity_enabled = 1 |
Definition at line 74 of file interface_quda.cpp.
| cudaStream_t* streams |
Definition at line 93 of file interface_quda.cpp.
1.7.4