[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPI octave with hyperthreading?
From: |
Javier Fernandez Baldomero |
Subject: |
Re: MPI octave with hyperthreading? |
Date: |
Mon, 19 Sep 2005 09:43:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 |
Shai Ayal wrote:
Hi all,
I have a hyper threading Intel CPU. Linux treats it as a 2 processor
smp machine. Will I gain anything by using MPI octave to run 2 things
in parallel ?
No,I don't think so. LAM/MPI is a message-passing mechanism, most useful
for distributed-memory systems (clusters and multicomputers). For
shared-memory (multiprocessors), LAM/MPI works, but nothing is said
about performance :-)
For SMP machines, many applications will suffer from memory contention.
That is, your code accesses memory on particular instants of time. When
you parallelize your application and run it as 2 processes (probably 2
copies of the same parallel code, ie, an SPMD code), each process tries
to access memory exactly at the same time -> memory contention. The
parallel code won't run faster than the sequential one, it gets
memory-speed-limited. I have tested it and that's what happens to the
MPITB "Pi" demo code in a cluster of Athlon biprocessors.
If I correctly understood multi-threading, your (single) CPU will try to
switch threads looking for CPU instructions not requiring the currently
used functional units/pipelines in the processor. So 2 copies of the
same SPMD code won't help the CPU to find new instructions, they'll be
exactly the same instructions in the original thread. Additionally, it
seems you have to use special compiler switches ?!?
http://www.lam-mpi.org/faq/category3.php3#question1
Of course, a parallel MPI application consisting of 2 different
codes/processes that access memory at totally disparate moments, will
probably benefit from an hyperthreaded CPU. But that's not the typical
Octave-MPITB application.
-javier
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------