CMA-ES / pycma

Python implementation of CMA-ES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit the memory resources while running fmin2

juantorres91 opened this issue · comments

Hi,

Currently I'm benchmarking DFO software including cma via fmin2. I'm running the test in new server, at the moment we do not have a scheduler. Everything is working fine but the execution is using lots of resources, the cpu usage is 2600 % at its peak, and it seems to be using all the processors. I have tried to use resource.setrlimit or ulimit with no effect. How can I limit cma's memory use?

Thanks,
Juan

I don't know whether the question refers to CPU or memory, as you mention both.

What comes in mind: setting

import cma
cma.evolution_strategy._CMASolutionDict = cma.evolution_strategy._CMASolutionDict_empty

may help to reduce (both) resources for long runs and should work as long as the code is invoked without the bounds option (that is, specifically, without genotype-phenotype transformation).

Indeed, we have also encountered such problems in our work. The main reason is that the power of the CPU will be full immediately, and the time consumption is huge (compared to other libraries). After trying the method you mentioned, the power of the CPU and has not declined. Is it caused by bounds boundary conversion?

Indeed, we have also encountered such problems in our work. The main reason is that the power of the CPU will be full immediately, and the time consumption is huge (compared to other libraries). After trying the method you mentioned, the power of the CPU and has not declined. Is it caused by bounds boundary conversion?

I have solved this problem very well. It is judged that it is due to OpenMP. You only need to enter: export OMP NUM THREADS=1 in the command line before use to avoid the problem of CPU being full.

This turns out to be a known issue, see also numbbo/coco#1919 and the fix which seems to work as well.