Skip to content

DDrppi bug memory leak #227

@Richard-Sti

Description

@Richard-Sti

General information

  • Corrfunc version: 2.3.4
  • platform: Linux, macOS
  • installation method (pip/source/other?): pip

Issue description

Each Corrfunc.theory.DDrppi call appears to be leaking memory.

Expected behavior

Calling DDrppi should not leave any memory inaccessible.

Actual behavior

The amount of potentially leaked memory depends on the problem but is on order of O(100 KB) on each call. The extra allocated memory can be tracked to Corrfunc/theory/DDrppi.py:297.

In the minimal failing example if you keep running it the reserved memory will continuously increase until the program crashes.

What have you tried so far?

Tried explicitly deleting the variables and calling the Python garbage collector.

Minimal failing example

import numpy as np
from Corrfunc.theory import DDrppi

rpbins = np.logspace(np.log10(0.1), np.log10(25), 13)
x, y, z = [np.random.uniform(0, 400, 50000) for __ in range(3)]

while True:
    __ = DDrppi(1, 1, 60, rpbins, x, y, z)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions