Skip to content

Memory leak in v2.x only #954

@rolfv

Description

@rolfv

There was a memory leak reported by Steven Eliuk (s.eliuk@samsung.com) of Samsung running one of his applications. I managed to reproduce it using LAMMPS which I used before to show a memory leak. Here are the instructions on how to reproduce.

1. clone LAMMPS (git clone git://git.lammps.org/lammps-ro.git lammps)
2. cd lammps/src then compile with Open MPI of interest. To do this, set your path to Open MPI and type "make mpi"
3. run the example listed in lammps/examples/melt. To do this, first copy "lmp_mpi" from the src directory into the melt directory. Then you need to modify the in.melt file so that it will run for a while. Change "run 25" to "run 250000"
4. you can run by mpirun -np 2 lmp_mpi < in.melt 

I then run the following script to track memory consumption and we can see it rising.

#!/bin/bash                                                                                                                                     
PID=`pgrep lmp_mpi -d ,`
echo "Found pids=$PID"

while [ 1 ]
do ps -p ${PID} -o pid,comm,user,vsz
sleep 30
done

WIth master, 1.10.0 or 1.8.8 memory consumption is basically stable. With 2.x and you can see how it rises.

[rvandevaart@drossetti-ivy4 melt]$ ./chk-size.sh
Found pids=30412,30413
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    373872
30413 lmp_mpi         32341    374676
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    443156
30413 lmp_mpi         32341    443960
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    512604
30413 lmp_mpi         32341    513412
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    582052
30413 lmp_mpi         32341    583028
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    651836
30413 lmp_mpi         32341    652644
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    721620
30413 lmp_mpi         32341    722428
  PID COMMAND         USER        VSZ
30412 lmp_mpi         32341    791576
30413 lmp_mpi         32341    792380

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions