Hi Rahul,
There is no inherent guarantee that the 2 processes started by mpirun
will run on unique processors (cpu's) on a multi-cpu host. Dispatching
(assignment of process to cpu) is done by the OS (google for "processor
affinity" for more info).
nthreads in your program is simply the number of processes (copies of
your program) started. it has nothing to do with a cpuid or number of
cpu's available.
HTH,
Mac McCalla
Houston
-----Original Message-----
From: lam-bounces_at_[hidden] [mailto:lam-bounces_at_[hidden]] On Behalf
Of Rahul Nabar
Sent: Wednesday, July 08, 2009 12:46 PM
To: Jeff Squyres
Cc: General LAM/MPI mailing list
Subject: Re: LAM: lamnodes shows 2 cpus but code still insists on
running onasingle cpu.
On Tue, Jul 7, 2009 at 4:16 PM, Jeff Squyres<jsquyres_at_[hidden]> wrote:
> You've told LAM to launch 2 processes on your machine (because you
> listed the hostname twice in the hostfile and then launched with -np
> 2), and it did.
Thanks for those pointers Jeff! Yup, I probably ought to move to OMPI
anyways!
BUt those two processes will be in parallel, right? Ergo they cannot be
on the same core? Or am I wrong?
Also, I assumed that "nthreads" always returns the number of CPUs?
This was always yielding "1" in this particular case.
--
Rahul
_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/
|