[Users] How can I optimize the speed of Cactus?(Format Modify)

Erik Schnetter schnetter at cct.lsu.edu
Mon Dec 29 13:25:35 CST 2008


On Dec 29, 2008, at 00:51:04, Y. Jun Zhang wrote:

> Dear all:
>
> I have built a local network which are composed of two PC, one is my
> laptop(UbuntuA), the other is a virtual pc in the laptop( UbuntuB in
> Virtualbox). The details are as follows(The virtual UbuntuB is the
> same as UbuntuA)
> OS :     Ubuntu 8.10.
> CPU :   Core 2 Duo  P8400  2.26GHz
> MPI :    MPICH2 (Version 2.1.0.7)
> TEST Thorn :  WaveDemo
> F90 = mpif90
> F77 = mpif77
> CC  = mpicc
> CXX = mpicxx
> MPI = MPICH
> MPICH_ARCH = LINUX
> MPICH_DIR = /home/zyj/mpich2
>
> After installing the MPICH2, I tested the effectiveness of MPI:
> the test project calculate Pi , the iteration times are 1E+9
> PC Name                                                         Time
> 1 UbuntuA(one thread)                                   29.9 Second
> 2 UbuntuA(two thread)                                   15.5 Second
> 2 UbuntuA(one thread) UbuntuB(one thread)    15.9 Second
>
> The test result says that MPICH2 could accelerate the calculation
> speed effectively.
>
> After compiling the WaveDemo by MPI, I tested the  effectiveness of
> cactus, Running WaveDemo(cctk_itlast=5000) is the test content.
> PC Name                                                             
> Time
> 1 UbuntuA(one thread)                                       25 Second
> 2 UbuntuA(two thread)                                       60 Second
> 3 UbuntuA(one thread) UbuntuB(one thread)        113  Second
> 4 UbuntuA(two thread) UbuntuB(one thread)         77   Second
>
> When I see this result, I feel  depressed: the Cactus could not
> accelerate the calcultion as the result. Maybe there are some wrong or
> there some optimization parameters? Could you tell me? Thanks.


Y. Jun Zhang

The Cactus WaveToy uses an algorithm that has shown very good parallel  
speedups in many cases.  If I understand your setup correctly, then  
you have two processors (cores) on your machine, and you should  
therefore expect a two-fold speedup from this.  However, only the  
calculation of the WaveToy solution itself can benefit from parallel  
processing, other operations such as writing the result to disk don't.

 From the screen output that you attached I see that you enabled  
several thorns for the Cactus web server, Jpeg output, 2D ASCII output  
etc. which will not benefit from parallelism.  I think you used the  
WaveToy demo parameter file from the Cactus web site -- this parameter  
file demonstrates several of the advanced features of Cactus, but it  
is not a good test case for parallelism.

The thorn CactusWave/WaveToyC comes with example parameter files which  
may be a better starting point for examining parallelism, for example  
"Cactus/arrangements/CactusWave/WaveToyC/par/wavetoyc_rad.par".  By  
default, this parameter file uses a very small domain, runs for a  
short time, and produces output often.  In order to see good parallel  
speedup, you would have to modify this parameter file to use a larger  
domain (use 300 instead of 30 grid points in each direction), make it  
run for a longer time (increase cctk_itlast so that the simulation  
runs for at least one minute), and produce output less often (set the  
out*_every parameters to larger numbers, e.g. 100 or 1000).



A general way to see good speedup is to see where the simulation  
spends much of its time.  Cactus has built-in timers, and by adding  
the parameter

	Cactus::cctk_timer_output = "full"

to a parameter file you will receive output that shows which parts of  
the simulation use how much time.  It is often surprising to see what  
seemingly unimportant parts of a simulation take most of the time.

We have recently written a report on Benchmarking supercomputers with  
Cactus; see <http://www.cct.lsu.edu/CCT-TR/CCT-TR-2008-5>.  This  
report explains how to set up a parameter file that runs efficiently  
in parallel and then shows some results.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/users/attachments/20081229/365c2726/attachment.bin 


More information about the Users mailing list