Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in source_moab.F90 [fixed] #58

Open
erelson opened this issue May 29, 2013 · 0 comments
Open

Memory leak in source_moab.F90 [fixed] #58

erelson opened this issue May 29, 2013 · 0 comments
Labels

Comments

@erelson
Copy link
Contributor

erelson commented May 29, 2013

There was a bug in source_moab.F90 where memory continually increased as the number of particle histories increased. This mean running multiple jobs crashed tux-c1 (150million NPS ~=24 gb of memory used...)

This was due to arrays for entity and vertex information being allocated new memory each time the code sampled within a voxel, while keeping the old data in memory. I was able to solve this by using 'save' on the relevant variables. (This was a hypothesis, aka lucky guess) Quick testing indicates this does not affect the problem results, and perhaps slightly speeds up the code. Relevant commit: 83a33c2

I implemented this change for the voxel sampling code, and also for voxel volume calculation code, which reduces the memory further.

One potential, minor flaw this may introduce is issues handling mesh with both tet and hex voxels. I think this will be handled fine, but it ought to tested. (i.e. manual creation of a .vtk file with a hex and a tet; This could be a good task for a new guy 👍)

Finally, this was a useful script for not having to actively watch the memory usage:

@ghost ghost assigned erelson May 29, 2013
@erelson erelson removed their assignment Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant