Skip to content

Commit

Permalink
OMP volume loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcogarofalo committed Dec 8, 2023
1 parent 020dfa3 commit 0df1801
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions monomial/cloverdet_monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,19 @@ void cloverdet_derivative(const int id, hamiltonian_field_t * const hf) {
if(!mnl->even_odd_flag) {
fatal_error("QUDA support only even_odd_flag",__func__);
}
#ifdef TM_USE_QUDA
#ifdef TM_USE_QUDA
if (g_debug_level > 3) {
#ifdef TM_USE_MPI
// FIXME: here we do not need to set to zero the interior but only the halo
#ifdef TM_USE_OMP
# pragma omp parallel for
#endif
for(int i = 0; i < (VOLUMEPLUSRAND + g_dbw2rand);i++) {
for(int mu=0;mu<4;mu++) {
_zero_su3adj(debug_derivative[i][mu]);
}
}
#endif
#endif // end setting to zero the halo when using MPI
// we copy only the interior
memcpy(debug_derivative[0], hf->derivative[0], 4*VOLUME*sizeof(su3adj));
}
Expand Down
5 changes: 4 additions & 1 deletion monomial/cloverdetratio_monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,13 @@ void cloverdetratio_derivative(const int no, hamiltonian_field_t * const hf) {
if(!mnl->even_odd_flag) {
fatal_error("QUDA support only even_odd_flag",__func__);
}
#ifdef TM_USE_QUDA
#ifdef TM_USE_QUDA
if (g_debug_level > 3) {
#ifdef TM_USE_MPI
// FIXME: here we do not need to set to zero the interior but only the halo
#ifdef TM_USE_OMP
# pragma omp parallel for
#endif // end setting to zero the halo when using MPI
for(int i = 0; i < (VOLUMEPLUSRAND + g_dbw2rand);i++) {
for(int mu=0;mu<4;mu++) {
_zero_su3adj(debug_derivative[i][mu]);
Expand Down

0 comments on commit 0df1801

Please sign in to comment.