Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] dual cores
From: Fabian Hänsel (fabian.haensel_at_[hidden])
Date: 2008-11-10 15:42:48


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