Closed yihang-gao closed 1 year ago
Hi, it seems that the pycutest still occupy much CPU memory and will not release if we didn't terminate the python program.
problems_name = ["HS7", "HS6", "HS56", "HS48", "HS60"] tracemalloc.start() for name in problems_name: prob = pycutest.import_problem(name, drop_fixed_variables=True) for i in range(2000): x = prob.x0 g = prob.objcons(x) del prob gc.collect() snapshot = tracemalloc.take_snapshot() display_top(snapshot)
It is reported that the CPU memory is increasing... Looking forward to your help, thanks!
although I see some related issues #42 and #33 ...
Due to the way Python works there will still be some memory taken up, but this is a) much smaller than before, and b) due to memory leaks present in NumPy and the Python C API itself, and therefore not something we can do anything about. If you run valgrind on a Python debug instance you will see that we do not leak any memory (the memory is leaked by NumPy and Python).
Thanks so much for your response.
Due to the way Python works there will still be some memory taken up, but this is a) much smaller than before, and b) due to memory leaks present in NumPy and the Python C API itself, and therefore not something we can do anything about. If you run valgrind on a Python debug instance you will see that we do not leak any memory (the memory is leaked by NumPy and Python).
I commented "del" in problem_class.py, but nothing changed. The detected CPU memory occupied keeps the same..
I commented "del" in problem_class.py, but nothing changed. The detected CPU memory occupied keeps the same..
You need to test on a large problem (choose a problem whose sifParams give a very high dimension) as you won't see much effect on small toy problems that use little memory.
I commented "del" in problem_class.py, but nothing changed. The detected CPU memory occupied keeps the same..
You need to test on a large problem (choose a problem whose sifParams give a very high dimension) as you won't see much effect on small toy problems that use little memory.
thanks so much for your reply
Hi, it seems that the pycutest still occupy much CPU memory and will not release if we didn't terminate the python program.
It is reported that the CPU memory is increasing... Looking forward to your help, thanks!