Skip to content

Commit 5e051fc

Browse files
committed
gpl: avoid snapshot seg fault with resize
Signed-off-by: Augusto Berndt <[email protected]>
1 parent 6cfbae0 commit 5e051fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gpl/src/nesterovBase.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,10 @@ void NesterovBase::initDensity1()
25772577

25782578
initCoordi_.resize(gCellSize, FloatPoint());
25792579

2580+
snapshotCoordi_.resize(gCellSize, FloatPoint());
2581+
snapshotSLPCoordi_.resize(gCellSize, FloatPoint());
2582+
snapshotSLPSumGrads_.resize(gCellSize, FloatPoint());
2583+
25802584
#pragma omp parallel for num_threads(nbc_->getNumThreads())
25812585
for (auto it = nb_gcells_.begin(); it < nb_gcells_.end(); ++it) {
25822586
GCell* gCell = *it; // old-style loop for old OpenMP

0 commit comments

Comments
 (0)