Skip to content

Commit

Permalink
Prevent NVHPC from optimising away task barrier (likely a bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
tom91136 committed Nov 27, 2023
1 parent d83308b commit 804b235
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/omp/fasten.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#endif
#define IMPL_CLS OmpBude

static volatile float discard;

template <size_t PPWI> class IMPL_CLS final : public Bude<PPWI> {

static inline void fasten_main(size_t group, size_t ntypes, size_t nposes, size_t natlig, size_t natpro, //
Expand Down Expand Up @@ -245,6 +247,8 @@ template <size_t PPWI> class IMPL_CLS final : public Bude<PPWI> {
poses_0, poses_1, poses_2, poses_3, poses_4, poses_5, //
forcefield, energies);
}
#pragma omp target update from(energies[:1])
discard = energies[0];
auto kernelEnd = now();
sample.kernelTimes.emplace_back(kernelStart, kernelEnd);
}
Expand Down

0 comments on commit 804b235

Please sign in to comment.