Hi Erin,

> I have a dual core laptop and I would like to have both cores running.
> 
> Here is the following my-hosts file:
> localhost slots=2

Be warned that at least in default config running more MPI threads than
you have cores results in dog slow code.

Single core machine:

$ cat my-hosts
localhost slots=1
$ mpirun -np 1 -hostfile my-hosts ./sort selectionsort 1024
  1024  0.009905000seconds
$ mpirun -np 2 -hostfile my-hosts ./sort selectionsort 1024
  1024  4.113605000 seconds

(on dual core both -np 1 and -np 2 run almost equally fast (only
slightly speedup due to poor algorithm (developed for demonstration
purposes))

Best regards
  Fabian

Reply via email to