Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hacc: fix bug where numThreads were different in places #70

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/gpu/halo-finder/src/RCBForceTree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Hal Finkel ([email protected])
#include <assert.h>
using namespace std;

// use a single global variable to avoid bugs with nthreads and numThreads below
int overallThreads = 1;
#ifdef __HIPCC__
#include <cudaUtil.h>

Expand Down Expand Up @@ -401,7 +403,7 @@ RCBForceTree<TDPTS>::RCBForceTree(
vz = zVel;
mass = ms;

numThreads=1;
numThreads=overallThreads;

// static size for the interaction list
#define VMAX ALIGNY(16384)
Expand Down Expand Up @@ -503,7 +505,7 @@ RCBForceTree<TDPTS>::RCBForceTree(
ID_T nds = (((ID_T)(particleCount/(POSVEL_T)nDirect)) << depthSafety) + 1;
tree.reserve(nds);

int nthreads = 1;
int nthreads = overallThreads;

timespec b_start, b_end;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &b_start);
Expand Down