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

Limit the memory resources while running fmin2 #238

Open
juantorres91 opened this issue Sep 20, 2023 · 6 comments
Open

Limit the memory resources while running fmin2 #238

juantorres91 opened this issue Sep 20, 2023 · 6 comments
Labels
howto use cases, procedures, and workarounds

Comments

@juantorres91
Copy link

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

@nikohansen
Copy link
Contributor

nikohansen commented Sep 25, 2023

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).

@nikohansen nikohansen added the howto use cases, procedures, and workarounds label Oct 12, 2023
@nikohansen
Copy link
Contributor

See also #232

@Wukong-SCUT
Copy link

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?

@Wukong-SCUT
Copy link

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.

@nikohansen
Copy link
Contributor

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

@Wukong-SCUT
Copy link

Wukong-SCUT commented Mar 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
howto use cases, procedures, and workarounds
Projects
None yet
Development

No branches or pull requests

3 participants