Do you really have n usable processors?

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
hines
Site Admin
Posts: 1436
Joined: Wed May 18, 2005 3:32 pm

Do you really have n usable processors?

Post by hines » Mon Oct 15, 2007 10:53 am

Performance measurements are more accurate on multiprocessor desktops when there is not a background process using up a large percentage of one of the processors. You can see if this is the case on a linux machine by running "top". The bottom line, though, is that if you have 4 cores then the following, call it nproc.hoc, should take the same amount of time with 1 and 4 processes:

Code: Select all

objref pc
pc = new ParallelContext()
{pc.barrier()}
x = startsw()
y=0
for i=1, 1000 {
        for j = 1, 50000 {
                y += 1
        }
//      pc.barrier()
}
x = startsw() - x
print x
with both

Code: Select all

mpiexec -np 1 `which nrniv` -mpi nproc.hoc
mpiexec -np 4 `which nrniv` -mpi nproc.hoc
and all the times printed should be about the same.

By the way, I have had very good results with mpich2 configured with

Code: Select all

./configure --prefix=/home/hines/mpich2 --with-device=ch3:nemesis
and get close to linear speedup on even modest size 3-d reconstructions when using multisplit.

Post Reply