Skip to content

Commit

Permalink
modify code
Browse files Browse the repository at this point in the history
  • Loading branch information
dongxianchao committed Jan 10, 2025
1 parent 5045f3f commit db1ffbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SOURCES_GPUMD = \
$(wildcard phonon/*.cu) \
$(wildcard integrate/*.cu) \
$(wildcard mc/*.cu) \
$(wildcard mc_minimize/*.cu) \
$(wildcard mc_minimize/*.cu) \
$(wildcard force/*.cu) \
$(wildcard measure/*.cu) \
$(wildcard model/*.cu) \
Expand Down Expand Up @@ -67,7 +67,7 @@ HEADERS = \
$(wildcard main_gpumd/*.cuh) \
$(wildcard integrate/*.cuh) \
$(wildcard mc/*.cuh) \
$(wildcard mc_minimize/*.cuh) \
$(wildcard mc_minimize/*.cuh) \
$(wildcard minimize/*.cuh) \
$(wildcard force/*.cuh) \
$(wildcard measure/*.cuh) \
Expand Down
8 changes: 4 additions & 4 deletions src/mc_minimize/mc_minimizer_local.cu
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ double get_outer_average_displacement(
local_index,
outer_atoms_flags,
displacement.data());
gpuDeviceSynchronize();
CHECK(gpuDeviceSynchronize());

//calculate the average displacement
const int number_of_rounds = (local_N - 1) / 1024 + 1;
Expand All @@ -464,7 +464,7 @@ double get_outer_average_displacement(
gpu_sum<<<1, 1024>>>(local_N, displacement.data(), result.data());
GPU_Vector<double> outer_number(1);
gpu_sum<<<1, 1024>>>(local_N, outer_atoms_flags, outer_number.data());
gpuDeviceSynchronize();
CHECK(gpuDeviceSynchronize());
double number;
outer_number.copy_to_host(&number, 1);
double ans;
Expand All @@ -487,7 +487,7 @@ void build_all_atoms(
atom.number_of_atoms,
local_N,
3);
gpuDeviceSynchronize();
CHECK(gpuDeviceSynchronize());
}

//construct a local structure
Expand Down Expand Up @@ -518,7 +518,7 @@ void build_local_atoms(
atom.number_of_atoms,
local_N,
3);
gpuDeviceSynchronize();
CHECK(gpuDeviceSynchronize());
}

//implement the local simple MC
Expand Down

0 comments on commit db1ffbc

Please sign in to comment.