Skip to content

Memory leaks when importing problems #93

@anugrahjo

Description

@anugrahjo

It seems that the allocated memory (or maybe a portion of it) is never released after a problem is imported.

If I run the following code, the memory usage monotonically increases as the memory allocated for each problem imported is not deallocated. The program consumes several gigabytes of RAM (~8 GB if I skip ~30 problems that take longer times to get imported) by the time it reaches the end of the loop.

import pycutest

prob_list = pycutest.find_problems()
for prob_name in prob_list:
    prob = pycutest.import_problem(prob_name)

I use PyCUTEst 1.7.1 on macOS 14.4 with Python 3.9.13.

I saw similar issues reported before. I don't know if it's possible to be fixed since threads on the other issues mentioned this comes from upstream CUTEst or from memory leaks in Python/NumPy.

Metadata

Metadata

Assignees

Labels

memory leakA memory leak occursupstreamThis is an upstream issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions