[lammps-users] Memory leak in Reax_C module

Hello,

It seems that your REAX_C module has memory leak when doing
multiple run commands, e.g

run 5
run 5
run 5
run 5
run 5
run 5
run 5

Valgrind debugger program says:

==4146== HEAP SUMMARY:
==4146== in use at exit: 117,263,836 bytes in 115 blocks
==4146== total heap usage: 5,529 allocs, 5,414 frees, 149,954,890
bytes allocated
==4146==
==4146== LEAK SUMMARY:
==4146== definitely lost: 26,942,028 bytes in 102 blocks
==4146== indirectly lost: 13,211,616 bytes in 7 blocks
==4146== possibly lost: 77,109,624 bytes in 5 blocks
==4146== still reachable: 568 bytes in 1 blocks
==4146== suppressed: 0 bytes in 0 blocks

I know, that running multiple commands like this is just an example, but
if I would like to change the temperature during one simulation with
thermostat, e.g.

fix 1 all nvt temp 300.0 300.0 100.0
run 50
fix 1 all nvt temp 300.0 600.0 100.0
run 50
fix 1 all nvt temp 600.0 600.0 100.0
run 50
fix 1 all nvt temp 600.0 900.0 100.0
run 50

and if my system is large enough, this memory leak could be dangerous.

I send you input files so you could check this.

Thanks

in.reax_c.tatb (1.09 KB)

control.reax_c.tatb (1.44 KB)

ffield.reax (14.4 KB)

data.tatb (18.3 KB)

I'll send this along to the code authors.

Steve