Skip to content

Commit 6ba432f

Browse files
committed
Fixed a few memory errors for cuda
1 parent ce92474 commit 6ba432f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

test/core/flux/FuelFitFluxHandlerTester.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ BOOST_AUTO_TEST_CASE(checkComputeIncidentFlux)
116116
test::DOFView updatedConc("updatedConc", 5, dof);
117117

118118
// Initialize their values
119-
for (int i = 0; i < 5; i++)
120-
for (int j = 0; j < dof; j++) {
121-
conc(i, j) = 1.0e-5 * i;
122-
updatedConc(i, j) = 0.0;
123-
}
119+
Kokkos::parallel_for(
120+
dof, KOKKOS_LAMBDA(int j) {
121+
for (int i = 0; i < 5; i++) {
122+
conc(i, j) = 1.0e-5 * i;
123+
updatedConc(i, j) = 0.0;
124+
}
125+
});
124126

125127
// The pointer to the grid point we want
126128
auto concOffset = subview(conc, 1, Kokkos::ALL);

xolotl/core/include/xolotl/core/flux/FuelFitFluxHandler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ class FuelFitFluxHandler : public FluxHandler
226226
auto yield = defectYield;
227227
auto xenonYield = xeYield;
228228
auto ids = this->fluxIds;
229+
auto uConc = this->uConc;
229230

230231
Kokkos::parallel_for(
231232
1, KOKKOS_LAMBDA(std::size_t) {

xolotl/core/include/xolotl/core/network/detail/ClusterData.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct ClusterDataExtra
7171
}
7272

7373
void
74-
setGridSize(IndexType numClusters, IndexType gridSize) {};
74+
setGridSize(IndexType numClusters, IndexType gridSize){};
7575
};
7676

7777
/**
@@ -285,6 +285,7 @@ struct ClusterDataCommon
285285
setVal(_floatVals, XE_FORMATION, val);
286286
}
287287

288+
KOKKOS_INLINE_FUNCTION
288289
int
289290
transitionSize() const
290291
{

0 commit comments

Comments
 (0)