|
QUDA
v0.5.0
A library for QCD on GPUs
|
Main header file for the QUDA library. More...
Go to the source code of this file.
Classes | |
| struct | QudaGaugeParam_s |
| struct | QudaInvertParam_s |
Macros | |
| #define | QUDA_VERSION_MAJOR 0 |
| #define | QUDA_VERSION_MINOR 5 |
| #define | QUDA_VERSION_SUBMINOR 0 |
| #define | QUDA_VERSION ((QUDA_VERSION_MAJOR<<16) | (QUDA_VERSION_MINOR<<8) | QUDA_VERSION_SUBMINOR) |
| This macro is deprecated. Use QUDA_VERSION_MAJOR, etc., instead. | |
| #define | QUDA_MAX_DIM 5 |
| Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5. | |
| #define | QUDA_MAX_MULTI_SHIFT 32 |
| Maximum number of shifts supported by the multi-shift solver. This number may be changed if need be. | |
Typedefs | |
| typedef struct QudaGaugeParam_s | QudaGaugeParam |
| typedef struct QudaInvertParam_s | QudaInvertParam |
| typedef int(* | QudaCommsMap )(const int *coords, void *fdata) |
Functions | |
| void | setVerbosityQuda (QudaVerbosity verbosity, const char prefix[], FILE *outfile) |
| void | initCommsGridQuda (int nDim, const int *dims, QudaCommsMap func, void *fdata) |
| void | initQuda (int device) |
| void | endQuda (void) |
| QudaGaugeParam | newQudaGaugeParam (void) |
| QudaInvertParam | newQudaInvertParam (void) |
| void | printQudaGaugeParam (QudaGaugeParam *param) |
| void | printQudaInvertParam (QudaInvertParam *param) |
| void | loadGaugeQuda (void *h_gauge, QudaGaugeParam *param) |
| void | freeGaugeQuda (void) |
| void | saveGaugeQuda (void *h_gauge, QudaGaugeParam *param) |
| void | loadCloverQuda (void *h_clover, void *h_clovinv, QudaInvertParam *inv_param) |
| void | freeCloverQuda (void) |
| void | invertQuda (void *h_x, void *h_b, QudaInvertParam *param) |
| void | invertMultiShiftQuda (void **_hp_x, void *_hp_b, QudaInvertParam *param) |
| void | dslashQuda (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity parity) |
| void | cloverQuda (void *h_out, void *h_in, QudaInvertParam *inv_param, QudaParity *parity, int inverse) |
| void | MatQuda (void *h_out, void *h_in, QudaInvertParam *inv_param) |
| void | MatDagMatQuda (void *h_out, void *h_in, QudaInvertParam *inv_param) |
| void | set_dim (int *) |
| void | pack_ghost (void **cpuLink, void **cpuGhost, int nFace, QudaPrecision precision) |
| void | setFatLinkPadding (QudaComputeFatMethod method, QudaGaugeParam *param) |
| int | computeFatLinkQuda (void *fatlink, void **sitelink, double *act_path_coeff, QudaGaugeParam *param, QudaComputeFatMethod method) |
| int | computeGaugeForceQuda (void *mom, void *sitelink, int ***input_path_buf, int *path_length, void *loop_coeff, int num_paths, int max_length, double eb3, QudaGaugeParam *qudaGaugeParam, double *timeinfo) |
Main header file for the QUDA library.
Note to QUDA developers: When adding new members to QudaGaugeParam and QudaInvertParam, be sure to update lib/check_params.h
Definition in file quda.h.
| #define QUDA_MAX_DIM 5 |
| #define QUDA_MAX_MULTI_SHIFT 32 |
| #define QUDA_VERSION ((QUDA_VERSION_MAJOR<<16) | (QUDA_VERSION_MINOR<<8) | QUDA_VERSION_SUBMINOR) |
| typedef int(* QudaCommsMap)(const int *coords, void *fdata) |
initCommsGridQuda() takes an optional "rank_from_coords" argument that should be a pointer to a user-defined function with this prototype.
| coords | Node coordinates |
| fdata | Any auxiliary data needed by the function |
| typedef struct QudaGaugeParam_s QudaGaugeParam |
Parameters having to do with the gauge field or the interpretation of the gauge field by various Dirac operators
| typedef struct QudaInvertParam_s QudaInvertParam |
Parameters relating to the solver and the choice of Dirac operator.
| void cloverQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param, | ||
| QudaParity * | parity, | ||
| int | inverse | ||
| ) |
Apply the clover operator or its inverse.
| h_out | Result spinor field |
| h_in | Input spinor field |
| param | Contains all metadata regarding host and device storage |
| parity | The source and destination parity of the field |
| inverse | Whether to apply the inverse of the clover term |
| int computeFatLinkQuda | ( | void * | fatlink, |
| void ** | sitelink, | ||
| double * | act_path_coeff, | ||
| QudaGaugeParam * | param, | ||
| QudaComputeFatMethod | method | ||
| ) |
| int computeGaugeForceQuda | ( | void * | mom, |
| void * | sitelink, | ||
| int *** | input_path_buf, | ||
| int * | path_length, | ||
| void * | loop_coeff, | ||
| int | num_paths, | ||
| int | max_length, | ||
| double | eb3, | ||
| QudaGaugeParam * | qudaGaugeParam, | ||
| double * | timeinfo | ||
| ) |
Compute the gauge force.
| void dslashQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param, | ||
| QudaParity | parity | ||
| ) |
Apply the Dslash operator (D_{eo} or D_{oe}).
| h_out | Result spinor field |
| h_in | Input spinor field |
| param | Contains all metadata regarding host and device storage |
| parity | The destination parity of the field |
Definition at line 819 of file interface_quda.cpp.
| void endQuda | ( | void | ) |
Finalize the library.
Definition at line 552 of file interface_quda.cpp.
| void freeCloverQuda | ( | void | ) |
Free QUDA's internal copy of the clover term and/or clover inverse.
Definition at line 539 of file interface_quda.cpp.
| void freeGaugeQuda | ( | void | ) |
Free QUDA's internal copy of the gauge field.
Definition at line 510 of file interface_quda.cpp.
| 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.
| nDim | Number of grid dimensions. "4" is the only supported value currently. |
| dims | Array of grid dimensions. dims[0]*dims[1]*dims[2]*dims[3] must equal the total number of MPI ranks or QMP nodes. |
| func | Pointer 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. |
| fdata | Pointer to any data required by "func" (may be NULL) |
Definition at line 151 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 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 194 of file interface_quda.cpp.
| void invertMultiShiftQuda | ( | void ** | _hp_x, |
| void * | _hp_b, | ||
| QudaInvertParam * | param | ||
| ) |
Solve for multiple shifts (e.g., masses).
| _hp_x | Array of solution spinor fields |
| _hp_b | Array of source spinor fields |
| param | Contains all metadata regarding host and device storage and solver parameters |
Generic version of the multi-shift solver. Should work for most fermions. Note that offset[0] is not folded into the mass parameter.
At present, 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.
Definition at line 1327 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().
| h_x | Solution spinor field |
| h_b | Source spinor field |
| param | Contains all metadata regarding host and device storage and solver parameters |
Definition at line 1119 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.
| h_clover | Base pointer to host clover field |
| h_cloverinv | Base pointer to host clover inverse field |
| inv_param | Contains all metadata regarding host and device storage |
Definition at line 420 of file interface_quda.cpp.
| void loadGaugeQuda | ( | void * | h_gauge, |
| QudaGaugeParam * | param | ||
| ) |
Load the gauge field from the host.
| h_gauge | Base pointer to host gauge field (regardless of dimensionality) |
| param | Contains all metadata regarding host and device storage |
Definition at line 293 of file interface_quda.cpp.
| void MatDagMatQuda | ( | void * | h_out, |
| void * | h_in, | ||
| QudaInvertParam * | inv_param | ||
| ) |
Apply M^{}M, possibly even/odd preconditioned.
| h_out | Result spinor field |
| h_in | Input spinor field |
| param | Contains all metadata regarding host and device storage |
Definition at line 953 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.
| h_out | Result spinor field |
| h_in | Input spinor field |
| param | Contains all metadata regarding host and device storage |
Definition at line 884 of file interface_quda.cpp.
| QudaGaugeParam newQudaGaugeParam | ( | void | ) |
A new QudaGaugeParam should always be initialized immediately after it's defined (and prior to explicitly setting its members) using this function. Typical usage is as follows:
QudaGaugeParam gauge_param = newQudaGaugeParam();
| QudaInvertParam newQudaInvertParam | ( | void | ) |
A new QudaInvertParam should always be initialized immediately after it's defined (and prior to explicitly setting its members) using this function. Typical usage is as follows:
QudaInvertParam invert_param = newQudaInvertParam();
| void pack_ghost | ( | void ** | cpuLink, |
| void ** | cpuGhost, | ||
| int | nFace, | ||
| QudaPrecision | precision | ||
| ) |
| void printQudaGaugeParam | ( | QudaGaugeParam * | param | ) |
Print the members of QudaGaugeParam.
| param | The QudaGaugeParam whose elements we are to print. |
Definition at line 40 of file check_params.h.
| void printQudaInvertParam | ( | QudaInvertParam * | param | ) |
Print the members of QudaGaugeParam.
| param | The QudaGaugeParam whose elements we are to print. |
< Number of offsets in the multi-shift solver
Definition at line 106 of file check_params.h.
| void saveGaugeQuda | ( | void * | h_gauge, |
| QudaGaugeParam * | param | ||
| ) |
Save the gauge field to the host.
| h_gauge | Base pointer to host gauge field (regardless of dimensionality) |
| param | Contains all metadata regarding host and device storage |
Definition at line 387 of file interface_quda.cpp.
| void set_dim | ( | int * | ) |
| void setFatLinkPadding | ( | QudaComputeFatMethod | method, |
| QudaGaugeParam * | param | ||
| ) |
| 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.
| verbosity | Default 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. |
| prefix | String 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. |
| outfile | File pointer (such as stdout, stderr, or a handle returned by fopen()) where messages should be printed. The default is stdout. |
Definition at line 111 of file interface_quda.cpp.
1.8.2