Skip to content

Commit

Permalink
Added missing guard around clover construction
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyscientist committed Jun 23, 2016
1 parent 38fda50 commit 8899390
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/dslash_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,12 @@ void init(int argc, char **argv) {

spinor->Source(QUDA_RANDOM_SOURCE, 0);

double norm = 0.1; // clover components are random numbers in the range (-norm, norm)
double diag = 1.0; // constant added to the diagonal
construct_clover_field(hostClover, norm, diag, inv_param.clover_cpu_prec);
memcpy(hostCloverInv, hostClover, V*cloverSiteSize*inv_param.clover_cpu_prec);
if (dslash_type == QUDA_CLOVER_WILSON_DSLASH || dslash_type == QUDA_TWISTED_CLOVER_DSLASH) {
double norm = 0.1; // clover components are random numbers in the range (-norm, norm)
double diag = 1.0; // constant added to the diagonal
construct_clover_field(hostClover, norm, diag, inv_param.clover_cpu_prec);
memcpy(hostCloverInv, hostClover, V*cloverSiteSize*inv_param.clover_cpu_prec);
}

printfQuda("done.\n"); fflush(stdout);

Expand Down

0 comments on commit 8899390

Please sign in to comment.