in reply to loop over to utilize all cpus
If you're running through a loop using system and exe, you're single threaded. That means you'll only use one processor.
If you want to use more processor cores, you'll want to use fork or threads. Of course, these will be randomly assigned to a processor core by the OS. It looks like you might be on a *nix platform. If so, you can look up the man page on numactl to see about binding a process to specific core(s).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: loop over to utilize all cpus
by blakew (Monk) on Sep 17, 2010 at 15:38 UTC |