Hi, thank you for your support always.
I want to specify the number of thread that one optimization use.
According to Cma Optimizer page in reference manual, I tried to use "max_threads", but it may not work.
Actually, it says it's deprecated and use global setting. How can I change the global setting?
Regarding the number of thread used
- Thomas Geijtenbeek
- Posts: 445
- Joined: Wed Mar 12, 2014 8:08 am
Re: Regarding the number of thread used
The maximum number of threads that is used in SCONE is determined in Preferences -> Advanced -> optimization. By default, the maximum available number of threads is used, so you should not have to change this setting.
However, if you only run a single optimization, the number of parallel simulations is always limited by the population size. By default, the population size (also referred to as 'lambda') is set automatically based on the number of parameters, but you can override it in the Optimizer settings.
Another (preferred) way to use more threads is to simply run multiple optimizations in parallel (via Scenario -> Run Multiple Optimizations). This is typically more effective than increasing the population size (lambda), especially for avoiding local minima.
However, if you only run a single optimization, the number of parallel simulations is always limited by the population size. By default, the population size (also referred to as 'lambda') is set automatically based on the number of parameters, but you can override it in the Optimizer settings.
Another (preferred) way to use more threads is to simply run multiple optimizations in parallel (via Scenario -> Run Multiple Optimizations). This is typically more effective than increasing the population size (lambda), especially for avoiding local minima.
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: Regarding the number of thread used
Thank you for your quick response. I understand.
I have another question related to this.
I am using a python file to run multiple optimizations simultaneously by running multiple scone files.
The problem is that each optimization use same few threads, it means that waiting time occurs because optimization is performed using the same few threads, even though there are free threads.
Is there any way to avoid this? If it is an issue with python program, I'll find a way to resolve.
I have another question related to this.
I am using a python file to run multiple optimizations simultaneously by running multiple scone files.
The problem is that each optimization use same few threads, it means that waiting time occurs because optimization is performed using the same few threads, even though there are free threads.
Is there any way to avoid this? If it is an issue with python program, I'll find a way to resolve.
- Thomas Geijtenbeek
- Posts: 445
- Joined: Wed Mar 12, 2014 8:08 am
Re: Regarding the number of thread used
If you run multiple simulations via sconecmd.exe, then the number of threads should not be limited. Just make sure you run the instances in parallel (i.e. in the background), so that they're not waiting for the previous optimization to finish.
See also: https://scone.software/doku.php?id=doc:batch
See also: https://scone.software/doku.php?id=doc:batch
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: Regarding the number of thread used
I see. Using sconecmd.exe, if I start a new Optimization 2 while an Optimization 1 is in progress, sometimes the threads used by Optimization 1 are used by Optimization 2. Is the only solution to this starting optimization 1 and 2 at the same time, as described in the URL page you provided?
- Thomas Geijtenbeek
- Posts: 445
- Joined: Wed Mar 12, 2014 8:08 am
Re: Regarding the number of thread used
The available CPU threads are indeed shared between tasks by the OS, but this is not necessarily a problem (it's what the OS is designed to do).
You can only limit the total amount of threads if you start the Optimizations from inside SCONE Studio and use the 'Pool Optimizer' (option 3). This makes the most optimal use of all available cores by using a thread pool. The difference in performance is not that big, however, so it might not be worth the extra effort.
You can only limit the total amount of threads if you start the Optimizations from inside SCONE Studio and use the 'Pool Optimizer' (option 3). This makes the most optimal use of all available cores by using a thread pool. The difference in performance is not that big, however, so it might not be worth the extra effort.
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: Regarding the number of thread used
I understand. Thank you for your support!