17 extern void usage(
char** argv);
63 for(
int i=0; i<
V*18; ++i){
65 double* ptr = ((
double**)field)[
dir] + i;
66 *ptr += (rand() - RAND_MAX/2.0)/(20.0*RAND_MAX);
68 float* ptr = ((
float**)field)[
dir]+i;
69 *ptr += (rand() - RAND_MAX/2.0)/(20.0*RAND_MAX);
150 #define QUDA_VER ((10000*QUDA_VERSION_MAJOR) + (100*QUDA_VERSION_MINOR) + QUDA_VERSION_SUBMINOR)
154 initCommonConstants(*cudaFatLink);
159 double unitarize_eps = 1e-5;
160 const double hisq_force_filter = 5e-5;
161 const double max_det_error = 1e-12;
162 const bool allow_svd =
true;
163 const bool svd_only =
false;
164 const double svd_rel_err = 1e-8;
165 const double svd_abs_err = 1e-8;
171 int* num_failures_dev;
172 if(cudaMalloc(&num_failures_dev,
sizeof(
int)) != cudaSuccess){
173 errorQuda(
"cudaMalloc failed for num_failures_dev\n");
175 cudaMemset(num_failures_dev, 0,
sizeof(
int));
188 printfQuda(
"Comparing CPU and GPU results\n");
195 printfQuda(
"Dir:%d Test %s\n",dir,(1 == res) ?
"PASSED" :
"FAILED");
207 printfQuda(
"running the following fermion force computation test:\n");
209 printfQuda(
"link_precision link_reconstruct space_dim(x/y/z) T_dimension\n");
221 printf(
"Extra options: \n");
222 printf(
" --no_verify # Do not verify the GPU results using CPU results\n");
230 for (i =1;i < argc; i++){
236 if( strcmp(argv[i],
"--no_verify") == 0){
242 fprintf(stderr,
"ERROR: Invalid option:%s\n", argv[i]);