QUDA  v1.1.0
A library for QCD on GPUs
Classes | Namespaces | Macros | Functions | Variables
interface_quda.cpp File Reference
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sys/time.h>
#include <complex.h>
#include <quda.h>
#include <quda_fortran.h>
#include <quda_internal.h>
#include <device.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 <eigensolve_quda.h>
#include <color_spinor_field.h>
#include <clover_field.h>
#include <llfat_quda.h>
#include <unitarization_links.h>
#include <algorithm>
#include <staggered_oprod.h>
#include <ks_improved_force.h>
#include <ks_force_quda.h>
#include <random_quda.h>
#include <mpi_comm_handle.h>
#include <multigrid.h>
#include <deflation.h>
#include <split_grid.h>
#include <gauge_update_quda.h>
#include "check_params.h"
#include <gauge_tools.h>
#include <contract_quda.h>
#include <momentum.h>
#include <blas_lapack.h>
#include <blas_magma.h>

Go to the source code of this file.

Classes

struct  LexMapData
 

Namespaces

 quda
 

Macros

#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 INIT_PARAM
 
#define CHECK_PARAM
 
#define PRINT_PARAM
 
#define QUDA_MAX_CHRONO   12
 
#define STR_(x)   #x
 
#define STR(x)   STR_(x)
 
#define REFINE_INCREASING_MASS
 

Functions

void checkBLASParam (QudaBLASParam &param)
 
void openMagma ()
 
void closeMagma ()
 
std::vector< std::vector< ColorSpinorField * > > chronoResident (QUDA_MAX_CHRONO)
 
TimeProfilegetProfileBLAS ()
 Profiler for covariant derivative. More...
 
void quda::printLaunchTimer ()
 
void setVerbosityQuda (QudaVerbosity verbosity, const char prefix[], FILE *outfile)
 
void setMPICommHandleQuda (void *mycomm)
 
void initCommsGridQuda (int nDim, const int *dims, QudaCommsMap func, void *fdata)
 
void initQudaDevice (int dev)
 
void initQudaMemory ()
 
void updateR ()
 update the radius for halos. More...
 
void initQuda (int dev)
 
void loadGaugeQuda (void *h_gauge, QudaGaugeParam *param)
 
void saveGaugeQuda (void *h_gauge, QudaGaugeParam *param)
 
void loadSloppyCloverQuda (const QudaPrecision prec[])
 
void freeSloppyCloverQuda ()
 
void loadCloverQuda (void *h_clover, void *h_clovinv, QudaInvertParam *inv_param)
 
void loadSloppyCloverQuda (const QudaPrecision *prec)
 
void freeSloppyGaugeQuda ()
 
void freeGaugeQuda (void)
 
void loadSloppyGaugeQuda (const QudaPrecision *prec, const QudaReconstructType *recon)
 
void freeCloverQuda (void)
 
void flushChronoQuda (int i)
 Flush the chronological history for the given index. More...
 
void endQuda (void)
 
void quda::setDiracParam (DiracParam &diracParam, QudaInvertParam *inv_param, bool pc)
 
void quda::setDiracSloppyParam (DiracParam &diracParam, QudaInvertParam *inv_param, bool pc)
 
void quda::setDiracRefineParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc)
 
void quda::setDiracPreParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc, bool comms)
 
void quda::setDiracEigParam (DiracParam &diracParam, QudaInvertParam *inv_param, const bool pc, bool comms)
 
void quda::createDirac (Dirac *&d, Dirac *&dSloppy, Dirac *&dPre, QudaInvertParam &param, const bool pc_solve)
 
void quda::createDiracWithRefine (Dirac *&d, Dirac *&dSloppy, Dirac *&dPre, Dirac *&dRef, QudaInvertParam &param, const bool pc_solve)
 
void quda::createDiracWithEig (Dirac *&d, Dirac *&dSloppy, Dirac *&dPre, Dirac *&dRef, QudaInvertParam &param, const bool pc_solve)
 
void quda::massRescale (cudaColorSpinorField &b, QudaInvertParam &param, bool for_multishift)
 
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)
 
bool quda::canReuseResidentGauge (QudaInvertParam *inv_param)
 
void checkClover (QudaInvertParam *param)
 
quda::cudaGaugeFieldcheckGauge (QudaInvertParam *param)
 
void cloverQuda (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity parity, int inverse)
 
void eigensolveQuda (void **host_evecs, double _Complex *host_evals, QudaEigParam *eig_param)
 
void * newMultigridQuda (QudaMultigridParam *mg_param)
 
void destroyMultigridQuda (void *mg)
 Free resources allocated by the multigrid solver. More...
 
void updateMultigridQuda (void *mg_, QudaMultigridParam *mg_param)
 Updates the multigrid preconditioner for the new gauge / clover field. More...
 
void dumpMultigridQuda (void *mg_, QudaMultigridParam *mg_param)
 Dump the null-space vectors to disk. More...
 
void * newDeflationQuda (QudaEigParam *eig_param)
 
void destroyDeflationQuda (void *df)
 
void invertQuda (void *hp_x, void *hp_b, QudaInvertParam *param)
 
void loadFatLongGaugeQuda (QudaInvertParam *inv_param, QudaGaugeParam *gauge_param, void *milc_fatlinks, void *milc_longlinks)
 
template<class Interface , class... Args>
void callMultiSrcQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, void *h_gauge, void *milc_fatlinks, void *milc_longlinks, QudaGaugeParam *gauge_param, void *h_clover, void *h_clovinv, Interface op, Args... args)
 
void invertMultiSrcQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, void *h_gauge, QudaGaugeParam *gauge_param)
 Perform the solve like @invertQuda but for multiple rhs by spliting the comm grid into sub-partitions: each sub-partition invert one or more rhs'. The QudaInvertParam object specifies how the solve should be performed on each sub-partition. Unlike @invertQuda, the interface also takes the host side gauge as input. The gauge pointer and gauge_param are used if for inv_param split_grid[0] * split_grid[1] * split_grid[2] * split_grid[3] is larger than 1, in which case gauge field is not required to be loaded beforehand; otherwise this interface would just work as @invertQuda, which requires gauge field to be loaded beforehand, and the gauge field pointer and gauge_param are not used. More...
 
void invertMultiSrcStaggeredQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, void *milc_fatlinks, void *milc_longlinks, QudaGaugeParam *gauge_param)
 Really the same with @invertMultiSrcQuda but for staggered-style fermions, by accepting pointers to fat links and long links. More...
 
void invertMultiSrcCloverQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, void *h_gauge, QudaGaugeParam *gauge_param, void *h_clover, void *h_clovinv)
 Really the same with @invertMultiSrcQuda but for clover-style fermions, by accepting pointers to direct and inverse clover field pointers. More...
 
void dslashMultiSrcQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, QudaParity parity, void *h_gauge, QudaGaugeParam *gauge_param)
 Perform the solve like @dslashQuda but for multiple rhs by spliting the comm grid into sub-partitions: each sub-partition does one or more rhs'. The QudaInvertParam object specifies how the solve should be performed on each sub-partition. Unlike @invertQuda, the interface also takes the host side gauge as input - gauge field is not required to be loaded beforehand. More...
 
void dslashMultiSrcStaggeredQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, QudaParity parity, void *milc_fatlinks, void *milc_longlinks, QudaGaugeParam *gauge_param)
 Really the same with @dslashMultiSrcQuda but for staggered-style fermions, by accepting pointers to fat links and long links. More...
 
void dslashMultiSrcCloverQuda (void **_hp_x, void **_hp_b, QudaInvertParam *param, QudaParity parity, void *h_gauge, QudaGaugeParam *gauge_param, void *h_clover, void *h_clovinv)
 Really the same with @dslashMultiSrcQuda but for clover-style fermions, by accepting pointers to direct and inverse clover field pointers. More...
 
void invertMultiShiftQuda (void **_hp_x, void *_hp_b, QudaInvertParam *param)
 
void computeKSLinkQuda (void *fatlink, void *longlink, void *ulink, void *inlink, double *path_coeff, QudaGaugeParam *param)
 
int getGaugePadding (GaugeFieldParam &param)
 
int computeGaugeForceQuda (void *mom, void *siteLink, int ***input_path_buf, int *path_length, double *loop_coeff, int num_paths, int max_length, double eb3, QudaGaugeParam *qudaGaugeParam)
 
void momResidentQuda (void *mom, QudaGaugeParam *param)
 
void createCloverQuda (QudaInvertParam *invertParam)
 
void * createGaugeFieldQuda (void *gauge, int geometry, QudaGaugeParam *param)
 
void saveGaugeFieldQuda (void *gauge, void *inGauge, QudaGaugeParam *param)
 
void destroyGaugeFieldQuda (void *gauge)
 
void computeStaggeredForceQuda (void *h_mom, double dt, double delta, void *, void **x, QudaGaugeParam *gauge_param, QudaInvertParam *inv_param)
 
void computeHISQForceQuda (void *const milc_momentum, double dt, const double level2_coeff[6], const double fat7_coeff[6], const void *const w_link, const void *const v_link, const void *const u_link, void **fermion, int num_terms, int num_naik_terms, double **coeff, QudaGaugeParam *gParam)
 
void computeCloverForceQuda (void *h_mom, double dt, void **h_x, void **h_p, double *coeff, double kappa2, double ck, int nvector, double multiplicity, void *gauge, QudaGaugeParam *gauge_param, QudaInvertParam *inv_param)
 
void updateGaugeFieldQuda (void *gauge, void *momentum, double dt, int conj_mom, int exact, QudaGaugeParam *param)
 
void projectSU3Quda (void *gauge_h, double tol, QudaGaugeParam *param)
 
void staggeredPhaseQuda (void *gauge_h, QudaGaugeParam *param)
 
double momActionQuda (void *momentum, QudaGaugeParam *param)
 
void init_quda_ (int *dev)
 
void init_quda_device_ (int *dev)
 
void init_quda_memory_ ()
 
void end_quda_ ()
 
void load_gauge_quda_ (void *h_gauge, QudaGaugeParam *param)
 
void free_gauge_quda_ ()
 
void free_sloppy_gauge_quda_ ()
 
void load_clover_quda_ (void *h_clover, void *h_clovinv, QudaInvertParam *inv_param)
 
void free_clover_quda_ (void)
 
void dslash_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity *parity)
 
void clover_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity *parity, int *inverse)
 
void mat_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param)
 
void mat_dag_mat_quda_ (void *h_out, void *h_in, QudaInvertParam *inv_param)
 
void invert_quda_ (void *hp_x, void *hp_b, QudaInvertParam *param)
 
void invert_multishift_quda_ (void *h_x, void *hp_b, QudaInvertParam *param)
 
void flush_chrono_quda_ (int *index)
 Flush the chronological history for the given index. More...
 
void register_pinned_quda_ (void *ptr, size_t *bytes)
 Pinned a pre-existing memory allocation. More...
 
void unregister_pinned_quda_ (void *ptr)
 Pinned a pre-existing memory allocation. More...
 
void new_quda_gauge_param_ (QudaGaugeParam *param)
 
void new_quda_invert_param_ (QudaInvertParam *param)
 
void update_gauge_field_quda_ (void *gauge, void *momentum, double *dt, bool *conj_mom, bool *exact, QudaGaugeParam *param)
 
void compute_gauge_force_quda_ (void *mom, void *gauge, int *num_loop_types, double *coeff, double *dt, QudaGaugeParam *param)
 Compute the gauge force and update the mometum field. More...
 
void compute_staggered_force_quda_ (void *h_mom, double *dt, double *delta, void *gauge, void *x, QudaGaugeParam *gauge_param, QudaInvertParam *inv_param)
 
void apply_staggered_phase_quda_ ()
 Apply the staggered phase factors to the resident gauge field. More...
 
void remove_staggered_phase_quda_ ()
 Remove the staggered phase factors to the resident gauge field. More...
 
void kinetic_quda_ (double *kin, void *momentum, QudaGaugeParam *param)
 Evaluate the kinetic (momentum) contribution to classical Hamiltonian for Hybrid Monte Carlo. More...
 
void comm_set_gridsize_ (int *grid)
 
void set_kernel_pack_t_ (int *pack)
 fTemporary function exposed for TIFR benchmarking More...
 
void gaussGaugeQuda (unsigned long long seed, double sigma)
 Generate Gaussian distributed fields and store in the resident gauge field. We create a Gaussian-distributed su(n) field and exponentiate it, e.g., U = exp(sigma * H), where H is the distributed su(n) field and beta is the width of the distribution (beta = 0 results in a free field, and sigma = 1 has maximum disorder). More...
 
void plaq_quda_ (double plaq[3])
 
void plaqQuda (double plaq[3])
 
void copyExtendedResidentGaugeQuda (void *resident_gauge, QudaFieldLocation loc)
 
void performWuppertalnStep (void *h_out, void *h_in, QudaInvertParam *inv_param, unsigned int n_steps, double alpha)
 
void performAPEnStep (unsigned int n_steps, double alpha, int meas_interval)
 
void performSTOUTnStep (unsigned int n_steps, double rho, int meas_interval)
 
void performOvrImpSTOUTnStep (unsigned int n_steps, double rho, double epsilon, int meas_interval)
 
void performWFlownStep (unsigned int n_steps, double step_size, int meas_interval, QudaWFlowType wflow_type)
 
int computeGaugeFixingOVRQuda (void *gauge, const unsigned int gauge_dir, const unsigned int Nsteps, const unsigned int verbose_interval, const double relax_boost, const double tolerance, const unsigned int reunit_interval, const unsigned int stopWtheta, QudaGaugeParam *param, double *timeinfo)
 Gauge fixing with overrelaxation with support for single and multi GPU. More...
 
int computeGaugeFixingFFTQuda (void *gauge, const unsigned int gauge_dir, const unsigned int Nsteps, const unsigned int verbose_interval, const double alpha, const unsigned int autotune, const double tolerance, const unsigned int stopWtheta, QudaGaugeParam *param, double *timeinfo)
 Gauge fixing with Steepest descent method with FFTs with support for single GPU only. More...
 
void contractQuda (const void *hp_x, const void *hp_y, void *h_result, const QudaContractType cType, QudaInvertParam *param, const int *X)
 
void gaugeObservablesQuda (QudaGaugeObservableParam *param)
 Calculates a variety of gauge-field observables. If a smeared gauge field is presently loaded (in gaugeSmeared) the observables are computed on this, else the resident gauge field will be used. More...
 

Variables

cudaGaugeFieldgaugePrecise = nullptr
 
cudaGaugeFieldgaugeSloppy = nullptr
 
cudaGaugeFieldgaugePrecondition = nullptr
 
cudaGaugeFieldgaugeRefinement = nullptr
 
cudaGaugeFieldgaugeEigensolver = nullptr
 
cudaGaugeFieldgaugeExtended = nullptr
 
cudaGaugeFieldgaugeFatPrecise = nullptr
 
cudaGaugeFieldgaugeFatSloppy = nullptr
 
cudaGaugeFieldgaugeFatPrecondition = nullptr
 
cudaGaugeFieldgaugeFatRefinement = nullptr
 
cudaGaugeFieldgaugeFatEigensolver = nullptr
 
cudaGaugeFieldgaugeFatExtended = nullptr
 
cudaGaugeFieldgaugeLongPrecise = nullptr
 
cudaGaugeFieldgaugeLongSloppy = nullptr
 
cudaGaugeFieldgaugeLongPrecondition = nullptr
 
cudaGaugeFieldgaugeLongRefinement = nullptr
 
cudaGaugeFieldgaugeLongEigensolver = nullptr
 
cudaGaugeFieldgaugeLongExtended = nullptr
 
cudaGaugeFieldgaugeSmeared = nullptr
 
cudaCloverFieldcloverPrecise = nullptr
 
cudaCloverFieldcloverSloppy = nullptr
 
cudaCloverFieldcloverPrecondition = nullptr
 
cudaCloverFieldcloverRefinement = nullptr
 
cudaCloverFieldcloverEigensolver = nullptr
 
cudaGaugeFieldmomResident = nullptr
 
cudaGaugeFieldextendedGaugeResident = nullptr
 
std::vector< cudaColorSpinorField * > solutionResident
 
char * gitversion
 

Macro Definition Documentation

◆ CHECK_PARAM

#define CHECK_PARAM

Definition at line 53 of file interface_quda.cpp.

◆ INIT_PARAM

#define INIT_PARAM

Definition at line 48 of file interface_quda.cpp.

◆ MAX

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

Definition at line 44 of file interface_quda.cpp.

◆ PRINT_PARAM

#define PRINT_PARAM

Definition at line 59 of file interface_quda.cpp.

◆ QUDA_MAX_CHRONO

#define QUDA_MAX_CHRONO   12

Definition at line 137 of file interface_quda.cpp.

◆ REFINE_INCREASING_MASS

#define REFINE_INCREASING_MASS

◆ STR

#define STR (   x)    STR_(x)

Definition at line 443 of file interface_quda.cpp.

◆ STR_

#define STR_ (   x)    #x

Definition at line 442 of file interface_quda.cpp.

◆ TDIFF

#define TDIFF (   a,
 
)    (b.tv_sec - a.tv_sec + 0.000001*(b.tv_usec - a.tv_usec))

Definition at line 45 of file interface_quda.cpp.

Function Documentation

◆ apply_staggered_phase_quda_()

void apply_staggered_phase_quda_ ( )

Apply the staggered phase factors to the resident gauge field.

Definition at line 5487 of file interface_quda.cpp.

◆ callMultiSrcQuda()

template<class Interface , class... Args>
void callMultiSrcQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
void *  h_gauge,
void *  milc_fatlinks,
void *  milc_longlinks,
QudaGaugeParam gauge_param,
void *  h_clover,
void *  h_clovinv,
Interface  op,
Args...  args 
)

Here we first re-distribute gauge, color spinor, and clover field to sub-partitions, then call either invertQuda or dslashQuda.

  • For clover and gauge field, we re-distribute the host clover side fields, restore them after.
  • For color spinor field, we re-distribute the host side source fields, and re-collect the host side solution fields.

Definition at line 3311 of file interface_quda.cpp.

◆ checkBLASParam()

void checkBLASParam ( QudaBLASParam param)

Definition at line 56 of file interface_quda.cpp.

◆ checkClover()

void checkClover ( QudaInvertParam param)

Definition at line 2183 of file interface_quda.cpp.

◆ checkGauge()

quda::cudaGaugeField* checkGauge ( QudaInvertParam param)

Definition at line 2210 of file interface_quda.cpp.

◆ chronoResident()

std::vector< std::vector<ColorSpinorField*> > chronoResident ( QUDA_MAX_CHRONO  )

◆ closeMagma()

void closeMagma ( )

Definition at line 91 of file interface_quda.cpp.

◆ clover_quda_()

void clover_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity parity,
int *  inverse 
)

Apply the clover operator or its inverse.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe source and destination parity of the field
inverseWhether to apply the inverse of the clover term

Definition at line 5315 of file interface_quda.cpp.

◆ cloverQuda()

void cloverQuda ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity  parity,
int  inverse 
)

Apply the clover operator or its inverse.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe source and destination parity of the field
inverseWhether to apply the inverse of the clover term

Definition at line 2289 of file interface_quda.cpp.

◆ comm_set_gridsize_()

void comm_set_gridsize_ ( int *  grid)

BQCD wants a node mapping with x varying fastest.

Definition at line 5529 of file interface_quda.cpp.

◆ compute_gauge_force_quda_()

void compute_gauge_force_quda_ ( void *  mom,
void *  gauge,
int *  num_loop_types,
double *  coeff,
double *  dt,
QudaGaugeParam param 
)

Compute the gauge force and update the mometum field.

Parameters
[in,out]momThe momentum field to be updated
[in]gaugeThe gauge field from which we compute the force
[in]num_loop_typesNumber of loop types in the gauge action
[in]loop_coeffCoefficients of the different loops in the Symanzik action
[in]dtThe integration step size
[in]paramThe parameters of the external fields and the computation settings

Definition at line 5426 of file interface_quda.cpp.

◆ compute_staggered_force_quda_()

void compute_staggered_force_quda_ ( void *  mom,
double *  dt,
double *  delta,
void *  gauge,
void *  x,
QudaGaugeParam gauge_param,
QudaInvertParam invert_param 
)

Compute the naive staggered force. All fields must be in the same precision.

Parameters
momMomentum field
dtIntegrating step size
deltaAdditional scale factor when updating momentum (mom += delta * [force]_TA
gaugeGauge field (at present only supports resident gauge field)
xArray of single-parity solution vectors (at present only supports resident solutions)
gauge_paramGauge field meta data
invert_paramDirac and solver meta data

Definition at line 5482 of file interface_quda.cpp.

◆ computeCloverForceQuda()

void computeCloverForceQuda ( void *  mom,
double  dt,
void **  x,
void **  p,
double *  coeff,
double  kappa2,
double  ck,
int  nvector,
double  multiplicity,
void *  gauge,
QudaGaugeParam gauge_param,
QudaInvertParam inv_param 
)

Compute the clover force contributions in each dimension mu given the array of solution fields, and compute the resulting momentum field.

Parameters
momForce matrix
dtIntegrating step size
xArray of solution vectors
pArray of intermediate vectors
coeffArray of residues for each contribution (multiplied by stepsize)
kappa2-kappa*kappa parameter
ck-clover_coefficient * kappa / 8
nvecNumber of vectors
multiplicityNumber fermions this bilinear reresents
gaugeGauge Field
gauge_paramGauge field meta data
inv_paramDirac and solver meta data

Definition at line 4842 of file interface_quda.cpp.

◆ computeGaugeFixingFFTQuda()

int computeGaugeFixingFFTQuda ( void *  gauge,
const unsigned int  gauge_dir,
const unsigned int  Nsteps,
const unsigned int  verbose_interval,
const double  alpha,
const unsigned int  autotune,
const double  tolerance,
const unsigned int  stopWtheta,
QudaGaugeParam param,
double *  timeinfo 
)

Gauge fixing with Steepest descent method with FFTs with support for single GPU only.

Parameters
[in,out]gauge,gaugefield to be fixed
[in]gauge_dir,3for Coulomb gauge fixing, other for Landau gauge fixing
[in]Nsteps,maximumnumber of steps to perform gauge fixing
[in]verbose_interval,printgauge fixing info when iteration count is a multiple of this
[in]alpha,gaugefixing parameter of the method, most common value is 0.08
[in]autotune,1to autotune the method, i.e., if the Fg inverts its tendency we decrease the alpha value
[in]tolerance,torelancevalue to stop the method, if this value is zero then the method stops when iteration reachs the maximum number of steps defined by Nsteps
[in]stopWtheta,0for MILC criterium and 1 to use the theta value
[in]paramThe parameters of the external fields and the computation settings
[out]timeinfo

Definition at line 5921 of file interface_quda.cpp.

◆ computeGaugeFixingOVRQuda()

int computeGaugeFixingOVRQuda ( void *  gauge,
const unsigned int  gauge_dir,
const unsigned int  Nsteps,
const unsigned int  verbose_interval,
const double  relax_boost,
const double  tolerance,
const unsigned int  reunit_interval,
const unsigned int  stopWtheta,
QudaGaugeParam param,
double *  timeinfo 
)

Gauge fixing with overrelaxation with support for single and multi GPU.

Parameters
[in,out]gauge,gaugefield to be fixed
[in]gauge_dir,3for Coulomb gauge fixing, other for Landau gauge fixing
[in]Nsteps,maximumnumber of steps to perform gauge fixing
[in]verbose_interval,printgauge fixing info when iteration count is a multiple of this
[in]relax_boost,gaugefixing parameter of the overrelaxation method, most common value is 1.5 or 1.7.
[in]tolerance,torelancevalue to stop the method, if this value is zero then the method stops when iteration reachs the maximum number of steps defined by Nsteps
[in]reunit_interval,reunitarizegauge field when iteration count is a multiple of this
[in]stopWtheta,0for MILC criterium and 1 to use the theta value
[in]paramThe parameters of the external fields and the computation settings
[out]timeinfo

if (!param->use_resident_gauge) { // load fields onto the device

Definition at line 5846 of file interface_quda.cpp.

◆ computeGaugeForceQuda()

int computeGaugeForceQuda ( void *  mom,
void *  sitelink,
int ***  input_path_buf,
int *  path_length,
double *  loop_coeff,
int  num_paths,
int  max_length,
double  dt,
QudaGaugeParam qudaGaugeParam 
)

Compute the gauge force and update the mometum field

Parameters
momThe momentum field to be updated
sitelinkThe gauge field from which we compute the force
input_path_buf[dim][num_paths][path_length]
path_lengthOne less that the number of links in a loop (e.g., 3 for a staple)
loop_coeffCoefficients of the different loops in the Symanzik action
num_pathsHow many contributions from path_length different "staples"
max_lengthThe maximum number of non-zero of links in any path in the action
dtThe integration step size (for MILC this is dt*beta/3)
paramThe parameters of the external fields and the computation settings

Definition at line 4186 of file interface_quda.cpp.

◆ computeHISQForceQuda()

void computeHISQForceQuda ( void *  momentum,
double  dt,
const double  level2_coeff[6],
const double  fat7_coeff[6],
const void *const  w_link,
const void *const  v_link,
const void *const  u_link,
void **  quark,
int  num,
int  num_naik,
double **  coeff,
QudaGaugeParam param 
)

Compute the fermion force for the HISQ quark action and integrate the momentum.

Parameters
momentumThe momentum field we are integrating
dtThe stepsize used to integrate the momentum
level2_coeffThe coefficients for the second level of smearing in the quark action.
fat7_coeffThe coefficients for the first level of smearing (fat7) in the quark action.
w_linkUnitarized link variables obtained by applying fat7 smearing and unitarization to the original links.
v_linkFat7 link variables.
u_linkSU(3) think link variables.
quarkThe input fermion field.
numThe number of quark fields
num_naikThe number of naik contributions
coeffThe coefficient multiplying the fermion fields in the outer product
param.The field parameters.

Definition at line 4591 of file interface_quda.cpp.

◆ computeKSLinkQuda()

void computeKSLinkQuda ( void *  fatlink,
void *  longlink,
void *  ulink,
void *  inlink,
double *  path_coeff,
QudaGaugeParam param 
)

Definition at line 4071 of file interface_quda.cpp.

◆ computeStaggeredForceQuda()

void computeStaggeredForceQuda ( void *  mom,
double  dt,
double  delta,
void *  gauge,
void **  x,
QudaGaugeParam gauge_param,
QudaInvertParam invert_param 
)

Compute the naive staggered force. All fields must be in the same precision.

Parameters
momMomentum field
dtIntegrating step size
deltaAdditional scale factor when updating momentum (mom += delta * [force]_TA
gaugeGauge field (at present only supports resident gauge field)
xArray of single-parity solution vectors (at present only supports resident solutions)
gauge_paramGauge field meta data
invert_paramDirac and solver meta data

Definition at line 4436 of file interface_quda.cpp.

◆ contractQuda()

void contractQuda ( const void *  x,
const void *  y,
void *  result,
const QudaContractType  cType,
QudaInvertParam param,
const int *  X 
)

Public function to perform color contractions of the host spinors x and y.

Parameters
[in]xpointer to host data
[in]ypointer to host data
[out]resultpointer to the 16 spin projections per lattice site
[in]cTypeWhich type of contraction (open, degrand-rossi, etc)
[in]parammeta data for construction of ColorSpinorFields.
[in]Xspacetime data for construction of ColorSpinorFields.

Definition at line 5986 of file interface_quda.cpp.

◆ copyExtendedResidentGaugeQuda()

void copyExtendedResidentGaugeQuda ( void *  resident_gauge,
QudaFieldLocation  loc 
)

Performs a deep copy from the internal extendedGaugeResident field.

Parameters
Pointerto externalGaugeResident cudaGaugeField
Locationof gauge field

Definition at line 5600 of file interface_quda.cpp.

◆ createCloverQuda()

void createCloverQuda ( QudaInvertParam param)

Compute the clover field and its inverse from the resident gauge field.

Parameters
paramThe parameters of the clover field to create

Definition at line 4365 of file interface_quda.cpp.

◆ createGaugeFieldQuda()

void* createGaugeFieldQuda ( void *  gauge,
int  geometry,
QudaGaugeParam param 
)

Allocate a gauge (matrix) field on the device and optionally download a host gauge field.

Parameters
gaugeThe host gauge field (optional - if set to 0 then the gauge field zeroed)
geometryThe geometry of the matrix field to create (1 - scalar, 4 - vector, 6 - tensor)
paramThe parameters of the external field and the field to be created
Returns
Pointer to the gauge field (cast as a void*)

Definition at line 4394 of file interface_quda.cpp.

◆ destroyDeflationQuda()

void destroyDeflationQuda ( void *  df_instance)

Free resources allocated by the deflated solver

Definition at line 2830 of file interface_quda.cpp.

◆ destroyGaugeFieldQuda()

void destroyGaugeFieldQuda ( void *  gauge)

Reinterpret gauge as a pointer to cudaGaugeField and call destructor.

Parameters
gaugeGauge field to be freed

Definition at line 4430 of file interface_quda.cpp.

◆ destroyMultigridQuda()

void destroyMultigridQuda ( void *  mg_instance)

Free resources allocated by the multigrid solver.

Parameters
mg_instancePointer to instance of multigrid_solver
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 2624 of file interface_quda.cpp.

◆ dslash_quda_()

void dslash_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity parity 
)

Apply the Dslash operator (D_{eo} or D_{oe}).

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe destination parity of the field

Definition at line 5313 of file interface_quda.cpp.

◆ dslashMultiSrcCloverQuda()

void dslashMultiSrcCloverQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
QudaParity  parity,
void *  h_gauge,
QudaGaugeParam gauge_param,
void *  h_clover,
void *  h_clovinv 
)

Really the same with @dslashMultiSrcQuda but for clover-style fermions, by accepting pointers to direct and inverse clover field pointers.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
parityParity to apply dslash on
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field
h_cloverBase pointer to the direct clover field
h_clovinvBase pointer to the inverse clover field

Definition at line 3649 of file interface_quda.cpp.

◆ dslashMultiSrcQuda()

void dslashMultiSrcQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
QudaParity  parity,
void *  h_gauge,
QudaGaugeParam gauge_param 
)

Perform the solve like @dslashQuda but for multiple rhs by spliting the comm grid into sub-partitions: each sub-partition does one or more rhs'. The QudaInvertParam object specifies how the solve should be performed on each sub-partition. Unlike @invertQuda, the interface also takes the host side gauge as input - gauge field is not required to be loaded beforehand.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
parityParity to apply dslash on
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field

Definition at line 3634 of file interface_quda.cpp.

◆ dslashMultiSrcStaggeredQuda()

void dslashMultiSrcStaggeredQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
QudaParity  parity,
void *  milc_fatlinks,
void *  milc_longlinks,
QudaGaugeParam gauge_param 
)

Really the same with @dslashMultiSrcQuda but for staggered-style fermions, by accepting pointers to fat links and long links.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
parityParity to apply dslash on
milc_fatlinksBase pointer to host fat gauge field (regardless of dimensionality)
milc_longlinksBase pointer to host long gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field

Definition at line 3641 of file interface_quda.cpp.

◆ dslashQuda()

void dslashQuda ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param,
QudaParity  parity 
)

Apply the Dslash operator (D_{eo} or D_{oe}).

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage
parityThe destination parity of the field

Definition at line 1934 of file interface_quda.cpp.

◆ dumpMultigridQuda()

void dumpMultigridQuda ( void *  mg_instance,
QudaMultigridParam param 
)

Dump the null-space vectors to disk.

Parameters
[in]mg_instancePointer to the instance of multigrid_solver
[in]paramContains all metadata regarding host and device storage and solver parameters (QudaMultigridParam::vec_outfile sets the output filename prefix).

Definition at line 2733 of file interface_quda.cpp.

◆ eigensolveQuda()

void eigensolveQuda ( void **  host_evecs,
double _Complex *  host_evals,
QudaEigParam eig_param 
)

Definition at line 2358 of file interface_quda.cpp.

◆ end_quda_()

void end_quda_ ( void  )

Finalize the library.

Definition at line 5306 of file interface_quda.cpp.

◆ endQuda()

void endQuda ( void  )

Finalize the library.

Definition at line 1474 of file interface_quda.cpp.

◆ flush_chrono_quda_()

void flush_chrono_quda_ ( int *  index)

Flush the chronological history for the given index.

Parameters
[in]indexIndex for which we are flushing

Definition at line 5351 of file interface_quda.cpp.

◆ flushChronoQuda()

void flushChronoQuda ( int  index)

Flush the chronological history for the given index.

Parameters
[in]indexIndex for which we are flushing

Definition at line 1461 of file interface_quda.cpp.

◆ free_clover_quda_()

void free_clover_quda_ ( void  )

Free QUDA's internal copy of the clover term and/or clover inverse.

Definition at line 5312 of file interface_quda.cpp.

◆ free_gauge_quda_()

void free_gauge_quda_ ( void  )

Free QUDA's internal copy of the gauge field.

Definition at line 5308 of file interface_quda.cpp.

◆ free_sloppy_gauge_quda_()

void free_sloppy_gauge_quda_ ( void  )

Free QUDA's internal copy of the gauge field.

Definition at line 5309 of file interface_quda.cpp.

◆ freeCloverQuda()

void freeCloverQuda ( void  )

Free QUDA's internal copy of the clover term and/or clover inverse.

Definition at line 1453 of file interface_quda.cpp.

◆ freeGaugeQuda()

void freeGaugeQuda ( void  )

Free QUDA's internal copy of the gauge field.

Definition at line 1190 of file interface_quda.cpp.

◆ freeSloppyCloverQuda()

void freeSloppyCloverQuda ( )

Definition at line 1428 of file interface_quda.cpp.

◆ freeSloppyGaugeQuda()

void freeSloppyGaugeQuda ( )

Definition at line 1118 of file interface_quda.cpp.

◆ gaugeObservablesQuda()

void gaugeObservablesQuda ( QudaGaugeObservableParam param)

Calculates a variety of gauge-field observables. If a smeared gauge field is presently loaded (in gaugeSmeared) the observables are computed on this, else the resident gauge field will be used.

Parameters
[in,out]paramParameter struct that defines which observables we are making and the resulting observables.

Definition at line 6042 of file interface_quda.cpp.

◆ gaussGaugeQuda()

void gaussGaugeQuda ( unsigned long long  seed,
double  sigma 
)

Generate Gaussian distributed fields and store in the resident gauge field. We create a Gaussian-distributed su(n) field and exponentiate it, e.g., U = exp(sigma * H), where H is the distributed su(n) field and beta is the width of the distribution (beta = 0 results in a free field, and sigma = 1 has maximum disorder).

Parameters
seedThe seed used for the RNG
sigmaWidth of Gaussian distrubution

Definition at line 5545 of file interface_quda.cpp.

◆ getGaugePadding()

int getGaugePadding ( GaugeFieldParam param)

Definition at line 4174 of file interface_quda.cpp.

◆ getProfileBLAS()

TimeProfile& getProfileBLAS ( )

Profiler for covariant derivative.

Definition at line 227 of file interface_quda.cpp.

◆ init_quda_()

void init_quda_ ( int *  device)

Initialize the library. Under the interface this just calls initQudaMemory and initQudaDevice.

Parameters
deviceCUDA 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 5303 of file interface_quda.cpp.

◆ init_quda_device_()

void init_quda_device_ ( int *  device)

Initialize the library. This is a low-level interface that is called by initQuda. Calling initQudaDevice requires that the user also call initQudaMemory before using QUDA.

Parameters
deviceCUDA device number to use. In a multi-GPU build, this parameter may either be set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes.

Definition at line 5304 of file interface_quda.cpp.

◆ init_quda_memory_()

void init_quda_memory_ ( )

Initialize the library persistant memory allocations (both host and device). This is a low-level interface that is called by initQuda. Calling initQudaMemory requires that the user has previously called initQudaDevice.

Definition at line 5305 of file interface_quda.cpp.

◆ initCommsGridQuda()

void initCommsGridQuda ( int  nDim,
const int *  dims,
QudaCommsMap  func,
void *  fdata 
)

Declare the grid mapping ("logical topology" in QMP parlance) used for communications in a multi-GPU grid. This function should be called prior to initQuda(). The only case in which it's optional is when QMP is used for communication and the logical topology has already been declared by the application.

Parameters
nDimNumber of grid dimensions. "4" is the only supported value currently.
dimsArray of grid dimensions. dims[0]*dims[1]*dims[2]*dims[3] must equal the total number of MPI ranks or QMP nodes.
funcPointer to a user-supplied function that maps coordinates in the communication grid to MPI ranks (or QMP node IDs). If the pointer is NULL, the default mapping depends on whether QMP or MPI is being used for communication. With QMP, the existing logical topology is used if it's been declared. With MPI or as a fallback with QMP, the default ordering is lexicographical with the fourth ("t") index varying fastest.
fdataPointer to any data required by "func" (may be NULL)
See also
QudaCommsMap

Definition at line 371 of file interface_quda.cpp.

◆ initQuda()

void initQuda ( int  device)

Initialize the library. This function is actually a wrapper around calls to initQudaDevice() and initQudaMemory().

Parameters
deviceCUDA device number to use. In a multi-GPU build, this parameter may either be set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes.

Definition at line 536 of file interface_quda.cpp.

◆ initQudaDevice()

void initQudaDevice ( int  device)

Initialize the library. This is a low-level interface that is called by initQuda. Calling initQudaDevice requires that the user also call initQudaMemory before using QUDA.

Parameters
deviceCUDA device number to use. In a multi-GPU build, this parameter may either be set explicitly on a per-process basis or set to -1 to enable a default allocation of devices to processes.

Definition at line 453 of file interface_quda.cpp.

◆ initQudaMemory()

void initQudaMemory ( )

Initialize the library persistant memory allocations (both host and device). This is a low-level interface that is called by initQuda. Calling initQudaMemory requires that the user has previously called initQudaDevice.

Definition at line 503 of file interface_quda.cpp.

◆ invert_multishift_quda_()

void invert_multishift_quda_ ( void *  _hp_x,
void *  _hp_b,
QudaInvertParam param 
)

Solve for multiple shifts (e.g., masses).

Parameters
_hp_xArray of solution spinor fields (large contiguous allocation)
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 5329 of file interface_quda.cpp.

◆ invert_quda_()

void invert_quda_ ( 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().

Parameters
h_xSolution spinor field
h_bSource spinor field
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 5321 of file interface_quda.cpp.

◆ invertMultiShiftQuda()

void invertMultiShiftQuda ( void **  _hp_x,
void *  _hp_b,
QudaInvertParam param 
)

Generic version of the multi-shift solver. Should work for most fermions. Note that offset[0] is not folded into the mass parameter.

For Wilson-type fermions, the solution_type must be MATDAG_MAT or MATPCDAG_MATPC, and solve_type must be NORMOP or NORMOP_PC. The solution and solve preconditioning have to match.

For Staggered-type fermions, the solution_type must be MATPC, and the solve type must be DIRECT_PC. This difference in convention is because preconditioned staggered operator is normal, unlike with Wilson-type fermions.

Definition at line 3668 of file interface_quda.cpp.

◆ invertMultiSrcCloverQuda()

void invertMultiSrcCloverQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
void *  h_gauge,
QudaGaugeParam gauge_param,
void *  h_clover,
void *  h_clovinv 
)

Really the same with @invertMultiSrcQuda but for clover-style fermions, by accepting pointers to direct and inverse clover field pointers.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field
h_cloverBase pointer to the direct clover field
h_clovinvBase pointer to the inverse clover field

Definition at line 3627 of file interface_quda.cpp.

◆ invertMultiSrcQuda()

void invertMultiSrcQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
void *  h_gauge,
QudaGaugeParam gauge_param 
)

Perform the solve like @invertQuda but for multiple rhs by spliting the comm grid into sub-partitions: each sub-partition invert one or more rhs'. The QudaInvertParam object specifies how the solve should be performed on each sub-partition. Unlike @invertQuda, the interface also takes the host side gauge as input. The gauge pointer and gauge_param are used if for inv_param split_grid[0] * split_grid[1] * split_grid[2] * split_grid[3] is larger than 1, in which case gauge field is not required to be loaded beforehand; otherwise this interface would just work as @invertQuda, which requires gauge field to be loaded beforehand, and the gauge field pointer and gauge_param are not used.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field

Definition at line 3614 of file interface_quda.cpp.

◆ invertMultiSrcStaggeredQuda()

void invertMultiSrcStaggeredQuda ( void **  _hp_x,
void **  _hp_b,
QudaInvertParam param,
void *  milc_fatlinks,
void *  milc_longlinks,
QudaGaugeParam gauge_param 
)

Really the same with @invertMultiSrcQuda but for staggered-style fermions, by accepting pointers to fat links and long links.

Parameters
_hp_xArray of solution spinor fields
_hp_bArray of source spinor fields
paramContains all metadata regarding host and device storage and solver parameters
milc_fatlinksBase pointer to host fat gauge field (regardless of dimensionality)
milc_longlinksBase pointer to host long gauge field (regardless of dimensionality)
gauge_paramContains all metadata regarding host and device storage for gauge field

Definition at line 3620 of file interface_quda.cpp.

◆ invertQuda()

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

Parameters
h_xSolution spinor field
h_bSource spinor field
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 2837 of file interface_quda.cpp.

◆ kinetic_quda_()

void kinetic_quda_ ( double *  kin,
void *  momentum,
QudaGaugeParam param 
)

Evaluate the kinetic (momentum) contribution to classical Hamiltonian for Hybrid Monte Carlo.

Parameters
kinKinetic energy
momentumThe momentum field
paramThe parameters of the external fields and the computation settings
Returns
momentum action

Definition at line 5508 of file interface_quda.cpp.

◆ load_clover_quda_()

void load_clover_quda_ ( 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.

Parameters
h_cloverBase pointer to host clover field
h_cloverinvBase pointer to host clover inverse field
inv_paramContains all metadata regarding host and device storage

Definition at line 5310 of file interface_quda.cpp.

◆ load_gauge_quda_()

void load_gauge_quda_ ( void *  h_gauge,
QudaGaugeParam param 
)

Load the gauge field from the host.

Parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
paramContains all metadata regarding host and device storage

Definition at line 5307 of file interface_quda.cpp.

◆ loadCloverQuda()

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.

Parameters
h_cloverBase pointer to host clover field
h_cloverinvBase pointer to host clover inverse field
inv_paramContains all metadata regarding host and device storage

Definition at line 849 of file interface_quda.cpp.

◆ loadFatLongGaugeQuda()

void loadFatLongGaugeQuda ( QudaInvertParam inv_param,
QudaGaugeParam gauge_param,
void *  milc_fatlinks,
void *  milc_longlinks 
)

Definition at line 3258 of file interface_quda.cpp.

◆ loadGaugeQuda()

void loadGaugeQuda ( void *  h_gauge,
QudaGaugeParam param 
)

Load the gauge field from the host.

Parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
paramContains all metadata regarding host and device storage

Definition at line 553 of file interface_quda.cpp.

◆ loadSloppyCloverQuda() [1/2]

void loadSloppyCloverQuda ( const QudaPrecision prec)

Definition at line 1052 of file interface_quda.cpp.

◆ loadSloppyCloverQuda() [2/2]

void loadSloppyCloverQuda ( const QudaPrecision  prec[])

◆ loadSloppyGaugeQuda()

void loadSloppyGaugeQuda ( const QudaPrecision prec,
const QudaReconstructType recon 
)

Definition at line 1223 of file interface_quda.cpp.

◆ mat_dag_mat_quda_()

void mat_dag_mat_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply M^{\dag}M, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 5319 of file interface_quda.cpp.

◆ mat_quda_()

void mat_quda_ ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply the full Dslash matrix, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 5317 of file interface_quda.cpp.

◆ MatDagMatQuda()

void MatDagMatQuda ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply M^{\dag}M, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 2099 of file interface_quda.cpp.

◆ MatQuda()

void MatQuda ( void *  h_out,
void *  h_in,
QudaInvertParam inv_param 
)

Apply the full Dslash matrix, possibly even/odd preconditioned.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage

Definition at line 2029 of file interface_quda.cpp.

◆ momActionQuda()

double momActionQuda ( void *  momentum,
QudaGaugeParam param 
)

Evaluate the momentum contribution to the Hybrid Monte Carlo action.

Parameters
momentumThe momentum field
paramThe parameters of the external fields and the computation settings
Returns
momentum action

Definition at line 5242 of file interface_quda.cpp.

◆ momResidentQuda()

void momResidentQuda ( void *  mom,
QudaGaugeParam param 
)

Either downloads and sets the resident momentum field, or uploads and returns the resident momentum field

Parameters
[in,out]momThe external momentum field
[in]paramThe parameters of the external field

Definition at line 4310 of file interface_quda.cpp.

◆ new_quda_gauge_param_()

void new_quda_gauge_param_ ( QudaGaugeParam param)

Initializes the QudaGaugeParam with default entries.

Parameters
TheQudaGaugeParam to be initialized

Definition at line 5363 of file interface_quda.cpp.

◆ new_quda_invert_param_()

void new_quda_invert_param_ ( QudaInvertParam param)

Initializes the QudaInvertParam with default entries.

Parameters
TheQudaInvertParam to be initialized

Definition at line 5366 of file interface_quda.cpp.

◆ newDeflationQuda()

void* newDeflationQuda ( QudaEigParam param)

Create deflation solver resources.

Definition at line 2816 of file interface_quda.cpp.

◆ newMultigridQuda()

void* newMultigridQuda ( QudaMultigridParam param)

Setup the multigrid solver, according to the parameters set in param. It is assumed that the gauge field has already been loaded via loadGaugeQuda().

Parameters
paramContains all metadata regarding host and device storage and solver parameters

Definition at line 2607 of file interface_quda.cpp.

◆ openMagma()

void openMagma ( )

Open/Close MAGMA library

Definition at line 80 of file interface_quda.cpp.

◆ performAPEnStep()

void performAPEnStep ( unsigned int  n_steps,
double  alpha,
int  meas_interval 
)

Performs APE smearing on gaugePrecise and stores it in gaugeSmeared

Parameters
n_stepsNumber of steps to apply.
alphaAlpha coefficient for APE smearing.
meas_intervalMeasure the Q charge every Nth step

Definition at line 5691 of file interface_quda.cpp.

◆ performOvrImpSTOUTnStep()

void performOvrImpSTOUTnStep ( unsigned int  n_steps,
double  rho,
double  epsilon,
int  meas_interval 
)

Performs Over Imroved STOUT smearing on gaugePrecise and stores it in gaugeSmeared

Parameters
n_stepsNumber of steps to apply.
rhoRho coefficient for STOUT smearing.
epsilonEpsilon coefficient for Over Improved STOUT smearing.
meas_intervalMeasure the Q charge every Nth step

Definition at line 5759 of file interface_quda.cpp.

◆ performSTOUTnStep()

void performSTOUTnStep ( unsigned int  n_steps,
double  rho,
int  meas_interval 
)

Performs STOUT smearing on gaugePrecise and stores it in gaugeSmeared

Parameters
n_stepsNumber of steps to apply.
rhoRho coefficient for STOUT smearing.
meas_intervalMeasure the Q charge every Nth step

Definition at line 5725 of file interface_quda.cpp.

◆ performWFlownStep()

void performWFlownStep ( unsigned int  n_steps,
double  step_size,
int  meas_interval,
QudaWFlowType  wflow_type 
)

Performs Wilson Flow on gaugePrecise and stores it in gaugeSmeared

Parameters
n_stepsNumber of steps to apply.
step_sizeSize of Wilson Flow step
meas_intervalMeasure the Q charge and field energy every Nth step
wflow_type1x1 Wilson or 2x1 Symanzik flow type

Definition at line 5793 of file interface_quda.cpp.

◆ performWuppertalnStep()

void performWuppertalnStep ( void *  h_out,
void *  h_in,
QudaInvertParam param,
unsigned int  n_steps,
double  alpha 
)

Performs Wuppertal smearing on a given spinor using the gauge field gaugeSmeared, if it exist, or gaugePrecise if no smeared field is present.

Parameters
h_outResult spinor field
h_inInput spinor field
paramContains all metadata regarding host and device storage and operator which will be applied to the spinor
n_stepsNumber of steps to apply.
alphaAlpha coefficient for Wuppertal smearing.

Definition at line 5616 of file interface_quda.cpp.

◆ plaq_quda_()

void plaq_quda_ ( double  plaq[3])
Parameters
Computesthe total, spatial and temporal plaquette averages of the loaded gauge configuration.
Arrayfor storing the averages (total, spatial, temporal)

Definition at line 5574 of file interface_quda.cpp.

◆ plaqQuda()

void plaqQuda ( double  plaq[3])

Computes the total, spatial and temporal plaquette averages of the loaded gauge configuration.

Parameters
Arrayfor storing the averages (total, spatial, temporal)

Definition at line 5578 of file interface_quda.cpp.

◆ projectSU3Quda()

void projectSU3Quda ( void *  gauge_h,
double  tol,
QudaGaugeParam param 
)

Project the input field on the SU(3) group. If the target tolerance is not met, this routine will give a runtime error.

Parameters
gauge_hThe gauge field to be updated
tolThe tolerance to which we iterate
paramThe parameters of the gauge field

Definition at line 5126 of file interface_quda.cpp.

◆ register_pinned_quda_()

void register_pinned_quda_ ( void *  ptr,
size_t *  bytes 
)

Pinned a pre-existing memory allocation.

Parameters
[in]ptrPointer to buffer to be pinned
[in]sizeSize of allocation

Definition at line 5353 of file interface_quda.cpp.

◆ remove_staggered_phase_quda_()

void remove_staggered_phase_quda_ ( )

Remove the staggered phase factors to the resident gauge field.

Definition at line 5497 of file interface_quda.cpp.

◆ saveGaugeFieldQuda()

void saveGaugeFieldQuda ( void *  outGauge,
void *  inGauge,
QudaGaugeParam param 
)

Copy the QUDA gauge (matrix) field on the device to the CPU

Parameters
outGaugePointer to the host gauge field
inGaugePointer to the device gauge field (QUDA device field)
paramThe parameters of the host and device fields

Definition at line 4417 of file interface_quda.cpp.

◆ saveGaugeQuda()

void saveGaugeQuda ( void *  h_gauge,
QudaGaugeParam param 
)

Save the gauge field to the host.

Parameters
h_gaugeBase pointer to host gauge field (regardless of dimensionality)
paramContains all metadata regarding host and device storage

Definition at line 808 of file interface_quda.cpp.

◆ set_kernel_pack_t_()

void set_kernel_pack_t_ ( int *  pack)

fTemporary function exposed for TIFR benchmarking

Exposed due to poor derived MPI datatype performance with GPUDirect RDMA

Definition at line 5539 of file interface_quda.cpp.

◆ setMPICommHandleQuda()

void setMPICommHandleQuda ( void *  mycomm)

Definition at line 361 of file interface_quda.cpp.

◆ setVerbosityQuda()

void setVerbosityQuda ( QudaVerbosity  verbosity,
const char  prefix[],
FILE *  outfile 
)

Set parameters related to status reporting.

In typical usage, this function will be called once (or not at all) just before the call to initQuda(), but it's valid to call it any number of times at any point during execution. Prior to the first time it's called, the parameters take default values as indicated below.

Parameters
verbosityDefault verbosity, ranging from QUDA_SILENT to QUDA_DEBUG_VERBOSE. Within a solver, this parameter is overridden by the "verbosity" member of QudaInvertParam. The default value is QUDA_SUMMARIZE.
prefixString to prepend to all messages from QUDA. This defaults to the empty string (""), but you may wish to specify something like "QUDA: " to distinguish QUDA's output from that of your application.
outfileFile pointer (such as stdout, stderr, or a handle returned by fopen()) where messages should be printed. The default is stdout.

Definition at line 316 of file interface_quda.cpp.

◆ staggeredPhaseQuda()

void staggeredPhaseQuda ( void *  gauge_h,
QudaGaugeParam param 
)

Apply the staggered phase factors to the gauge field. If the imaginary chemical potential is non-zero then the phase factor exp(imu/T) will be applied to the links in the temporal direction.

Parameters
gauge_hThe gauge field
paramThe parameters of the gauge field

Definition at line 5187 of file interface_quda.cpp.

◆ unregister_pinned_quda_()

void unregister_pinned_quda_ ( void *  ptr)

Pinned a pre-existing memory allocation.

Parameters
[in]ptrPointer to buffer to be unpinned

Definition at line 5358 of file interface_quda.cpp.

◆ update_gauge_field_quda_()

void update_gauge_field_quda_ ( void *  gauge,
void *  momentum,
double *  dt,
bool *  conj_mom,
bool *  exact,
QudaGaugeParam param 
)

Evolve the gauge field by step size dt, using the momentum field I.e., Evalulate U(t+dt) = e(dt pi) U(t)

Parameters
gaugeThe gauge field to be updated
momentumThe momentum field
dtThe integration step size step
conj_momWhether to conjugate the momentum matrix
exactWhether to use an exact exponential or Taylor expand
paramThe parameters of the external fields and the computation settings

Definition at line 5370 of file interface_quda.cpp.

◆ updateGaugeFieldQuda()

void updateGaugeFieldQuda ( void *  gauge,
void *  momentum,
double  dt,
int  conj_mom,
int  exact,
QudaGaugeParam param 
)

Evolve the gauge field by step size dt, using the momentum field I.e., Evalulate U(t+dt) = e(dt pi) U(t)

Parameters
gaugeThe gauge field to be updated
momentumThe momentum field
dtThe integration step size step
conj_momWhether to conjugate the momentum matrix
exactWhether to use an exact exponential or Taylor expand
paramThe parameters of the external fields and the computation settings

Definition at line 5026 of file interface_quda.cpp.

◆ updateMultigridQuda()

void updateMultigridQuda ( void *  mg_instance,
QudaMultigridParam param 
)

Updates the multigrid preconditioner for the new gauge / clover field.

Parameters
mg_instancePointer to instance of multigrid_solver
paramContains all metadata regarding host and device storage and solver parameters, of note contains a flag specifying whether to do a full update or a thin update.

Definition at line 2628 of file interface_quda.cpp.

◆ updateR()

void updateR ( )

update the radius for halos.

This should only be needed for automated testing when different partitioning is applied within a single run.

Definition at line 531 of file interface_quda.cpp.

Variable Documentation

◆ cloverEigensolver

cudaCloverField* cloverEigensolver = nullptr

Definition at line 129 of file interface_quda.cpp.

◆ cloverPrecise

cudaCloverField* cloverPrecise = nullptr

Definition at line 125 of file interface_quda.cpp.

◆ cloverPrecondition

cudaCloverField* cloverPrecondition = nullptr

Definition at line 127 of file interface_quda.cpp.

◆ cloverRefinement

cudaCloverField* cloverRefinement = nullptr

Definition at line 128 of file interface_quda.cpp.

◆ cloverSloppy

cudaCloverField* cloverSloppy = nullptr

Definition at line 126 of file interface_quda.cpp.

◆ extendedGaugeResident

cudaGaugeField* extendedGaugeResident = nullptr

Definition at line 132 of file interface_quda.cpp.

◆ gaugeEigensolver

cudaGaugeField* gaugeEigensolver = nullptr

Definition at line 106 of file interface_quda.cpp.

◆ gaugeExtended

cudaGaugeField* gaugeExtended = nullptr

Definition at line 107 of file interface_quda.cpp.

◆ gaugeFatEigensolver

cudaGaugeField* gaugeFatEigensolver = nullptr

Definition at line 113 of file interface_quda.cpp.

◆ gaugeFatExtended

cudaGaugeField* gaugeFatExtended = nullptr

Definition at line 114 of file interface_quda.cpp.

◆ gaugeFatPrecise

cudaGaugeField* gaugeFatPrecise = nullptr

Definition at line 109 of file interface_quda.cpp.

◆ gaugeFatPrecondition

cudaGaugeField* gaugeFatPrecondition = nullptr

Definition at line 111 of file interface_quda.cpp.

◆ gaugeFatRefinement

cudaGaugeField* gaugeFatRefinement = nullptr

Definition at line 112 of file interface_quda.cpp.

◆ gaugeFatSloppy

cudaGaugeField* gaugeFatSloppy = nullptr

Definition at line 110 of file interface_quda.cpp.

◆ gaugeLongEigensolver

cudaGaugeField* gaugeLongEigensolver = nullptr

Definition at line 120 of file interface_quda.cpp.

◆ gaugeLongExtended

cudaGaugeField* gaugeLongExtended = nullptr

Definition at line 121 of file interface_quda.cpp.

◆ gaugeLongPrecise

cudaGaugeField* gaugeLongPrecise = nullptr

Definition at line 116 of file interface_quda.cpp.

◆ gaugeLongPrecondition

cudaGaugeField* gaugeLongPrecondition = nullptr

Definition at line 118 of file interface_quda.cpp.

◆ gaugeLongRefinement

cudaGaugeField* gaugeLongRefinement = nullptr

Definition at line 119 of file interface_quda.cpp.

◆ gaugeLongSloppy

cudaGaugeField* gaugeLongSloppy = nullptr

Definition at line 117 of file interface_quda.cpp.

◆ gaugePrecise

cudaGaugeField* gaugePrecise = nullptr

Definition at line 102 of file interface_quda.cpp.

◆ gaugePrecondition

cudaGaugeField* gaugePrecondition = nullptr

Definition at line 104 of file interface_quda.cpp.

◆ gaugeRefinement

cudaGaugeField* gaugeRefinement = nullptr

Definition at line 105 of file interface_quda.cpp.

◆ gaugeSloppy

cudaGaugeField* gaugeSloppy = nullptr

Definition at line 103 of file interface_quda.cpp.

◆ gaugeSmeared

cudaGaugeField* gaugeSmeared = nullptr

Definition at line 123 of file interface_quda.cpp.

◆ gitversion

char* gitversion
extern

Definition at line 4 of file version.cpp.

◆ momResident

cudaGaugeField* momResident = nullptr

Definition at line 131 of file interface_quda.cpp.

◆ solutionResident

std::vector<cudaColorSpinorField*> solutionResident

Definition at line 134 of file interface_quda.cpp.