Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinluchang committed Jan 5, 2025
1 parent 6f1227b commit 9dac145
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion nixpkgs/qlat_utils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ in
cp -pv "${../qcore/bin/NVCC.py}" "$PWD/NVCC.py"
patchShebangs --build "$PWD/NVCC.py"
#
export NVCC_OPTIONS="-w -std=c++17 -arch=${nvcc-arch} --expt-extended-lambda --expt-relaxed-constexpr -fopenmp -fno-strict-aliasing" # -D__DEBUG_VECUTILS__
GXX=""
GXX+=" -Xcudafe '--diag_suppress=20014'"
GXX="-w"
#
export NVCC_OPTIONS="-std=c++17 -arch=${nvcc-arch} --expt-extended-lambda --expt-relaxed-constexpr -fopenmp -fno-strict-aliasing $GXX" # -D__DEBUG_VECUTILS__
export QLAT_CXX="$PWD/NVCC.py -ccbin c++ $NVCC_OPTIONS"
export QLAT_MPICXX="$PWD/NVCC.py -ccbin mpic++ $NVCC_OPTIONS"
export QLAT_CXXFLAGS="--NVCC-compile -D__QLAT_BARYON_SHARED_SMALL__" # -fPIC
Expand Down
1 change: 1 addition & 0 deletions qcore/bin/NVCC.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def parse_omit_flags(self):
"-Wextra",
"-Wpedantic",
"-Xcompiler",
"-Xcudafe",
"-MD",
])
opt1_pool = set([
Expand Down
8 changes: 4 additions & 4 deletions qlat/qlat/include/qlat/qm-action.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct QMAction {
return rtn;
}

qacc double action_point(QMAction& qma, const Field<double>& f, const Geometry& geo, Coordinate xl)
inline double action_point(QMAction& qma, const Field<double>& f, const Geometry& geo, Coordinate xl)
{
// Returns the contribution to the total action from a single lattice
// point (including the relavent neighbor interactions)
Expand Down Expand Up @@ -250,7 +250,7 @@ struct QMAction {
fd.init(geo_r);
// Loops over every lattice point in the current node
QMAction& qma = *this;
qacc_for(index, geo_r.local_volume(), {
qthread_for(index, geo_r.local_volume(), {
const Geometry& geo = f.geo();
const Coordinate xl = geo.coordinate_from_index(index);
fd.get_elem(index) = qma.action_point(qma, f, geo, xl);
Expand Down Expand Up @@ -306,7 +306,7 @@ struct QMAction {
// from each point
FieldM<double, 1> fd;
fd.init(geo_r);
qacc_for(index, geo_r.local_volume(), {
qthread_for(index, geo_r.local_volume(), {
const Geometry& geo_r = fd.geo();
Coordinate xl = geo_r.coordinate_from_index(index);
double s=0;
Expand Down Expand Up @@ -368,7 +368,7 @@ struct QMAction {
{
TIMER("QMAction.hmc_field_evolve");
const Geometry& geo = f.geo();
qacc_for(index, geo.local_volume(), {
qthread_for(index, geo.local_volume(), {
const Geometry& geo = f.geo();
const Coordinate xl = geo.coordinate_from_index(index);
Vector<double> f_v = f.get_elems(xl);
Expand Down

0 comments on commit 9dac145

Please sign in to comment.