From 2fcd7b79ab21be00527cfee3928866a39f41c679 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 9 Aug 2020 15:12:10 -0400 Subject: [PATCH] make certain that internal data in RanMars is initialized to avoid false positive with valgrind --- src/random_mars.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/random_mars.cpp b/src/random_mars.cpp index 93d226da6a..29314525a5 100644 --- a/src/random_mars.cpp +++ b/src/random_mars.cpp @@ -16,6 +16,7 @@ #include "random_mars.h" #include +#include #include "error.h" #include "math_const.h" @@ -36,6 +37,7 @@ RanMars::RanMars(LAMMPS *lmp, int seed) : Pointers(lmp), save = 0; u = new double[97+1]; + memset(u,0,98*sizeof(double)); ij = (seed-1)/30082; kl = (seed-1) - 30082*ij;