14 #if defined(QMP_COMMS) 16 #elif defined(MPI_COMMS) 38 #define MAX(a,b) ((a)>(b)?(a):(b)) 73 int pad_size =
MAX(x_face_size, y_face_size);
74 pad_size =
MAX(pad_size, z_face_size);
75 pad_size =
MAX(pad_size, t_face_size);
81 extern void usage(
char**);
85 for (
int i = 1;
i < argc;
i++){
89 printf(
"ERROR: Invalid option:%s\n", argv[
i]);
105 sizeof(
double) :
sizeof(
float);
107 void *gauge[4], *new_gauge[4];
109 for (
int dir = 0; dir < 4; dir++) {
125 printf(
"Randomizing fields...");
133 #ifdef GPU_GAUGE_TOOLS 136 printf(
"Computed plaquette is %e (spatial = %e, temporal = %e)\n", plaq[0], plaq[1], plaq[2]);
145 time0 /= CLOCKS_PER_SEC;
146 printf(
"Computed topological charge is %.16e Done in %g secs\n", qCharge, time0);
151 unsigned int nSteps = 50;
152 double coeff_APE = 0.6;
153 double coeff_STOUT = coeff_APE/(2*(4-1));
163 time0 /= CLOCKS_PER_SEC;
164 printfQuda(
"Total time for STOUT = %g secs\n", time0);
166 printf(
"Computed topological charge after is %.16e \n", qCharge);
174 time0 /= CLOCKS_PER_SEC;
175 printfQuda(
"Total time for APE = %g secs\n", time0);
177 printf(
"Computed topological charge after is %.16e \n", qCharge);
180 double epsilon = -0.25;
188 time0 /= CLOCKS_PER_SEC;
189 printfQuda(
"Total time for Over Improved STOUT = %g secs\n", time0);
191 printf(
"Computed topological charge after is %.16e \n", qCharge);
194 printf(
"Skipping plaquette tests since gauge tools have not been compiled\n");
202 for (
int dir = 0; dir < 4; dir++) {
204 free(new_gauge[dir]);
210 int main(
int argc,
char **argv) {
void performOvrImpSTOUTnStep(unsigned int nSteps, double rho, double epsilon)
QudaReconstructType reconstruct_sloppy
void construct_gauge_field(void **gauge, int type, QudaPrecision precision, QudaGaugeParam *param)
enum QudaPrecision_s QudaPrecision
QudaPrecision & cuda_prec_sloppy
void performAPEnStep(unsigned int nSteps, double alpha)
void loadGaugeQuda(void *h_gauge, QudaGaugeParam *param)
int process_command_line_option(int argc, char **argv, int *idx)
void plaqQuda(double plaq[3])
QudaGaugeParam gauge_param
QudaGaugeFieldOrder gauge_order
int gridsize_from_cmdline[]
int strcmp(const char *__s1, const char *__s2)
void initQuda(int device)
void * malloc(size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1)))
int printf(const char *,...) __attribute__((__format__(__printf__
void saveGaugeQuda(void *h_gauge, QudaGaugeParam *param)
void SU3test(int argc, char **argv)
QudaPrecision cuda_prec_sloppy
QudaPrecision prec_sloppy
void setGaugeParam(QudaGaugeParam &gauge_param)
QudaReconstructType reconstruct
QudaReconstructType link_recon_sloppy
void check_gauge(void **oldG, void **newG, double epsilon, QudaPrecision precision)
void performSTOUTnStep(unsigned int nSteps, double rho)
QudaPrecision & cuda_prec
enum QudaReconstructType_s QudaReconstructType
Main header file for the QUDA library.
QudaReconstructType link_recon
enum QudaVerbosity_s QudaVerbosity
clock_t clock(void) __asm("_" "clock")
void read_gauge_field(const char *filename, void *gauge[], QudaPrecision prec, const int *X, int argc, char *argv[])
int main(int argc, char **argv)
void initComms(int argc, char **argv, const int *commDims)
void setVerbosity(const QudaVerbosity verbosity)
QudaGaugeParam newQudaGaugeParam(void)