Newsgroups: comp.parallel
From: mario@astro.cf.ac.uk (Mario Antonioletti)
Subject: Summary: N-body, SPH & visualisation.
Organization: Dept. Of Physics and Astronomy, UWCC.
Date: Sun, 29 May 1994 17:20:02 GMT

[ I have not included the original post to save space - if anyone should
want it (??!?!?) please mail me and I'll mail it to them.]

Thanks to all those who replied to my message asking for information on N-body,
visualisation and SPH. Below I include a summary of the replies. If anyone 
else has something to contribute or add please mail me. Thanks again,

		Mario [mario@astro.cf.ac.uk]
***************************************************************************
***************************************************************************
>from jlu@cs.umr.edu

I'm new to this area. I heard (can be wrong) there is package
called PMD developed by Argone (a national lab close to
Chicago, IL.) I don't have details.

[Tried to find something out about this PMD package byt was unable to find
anyhing. If anyone would care to enlighten me please do so.]
***************************************************************************
>from msw@qso.lanl.gov

  John Salmon and I have several papers on the subject of parallel
tree codes.  Use World Wide Web http://qso.lanl.gov/ or anonymous ftp
to sampson.ccsf.caltech.edu:/nbody for more information.
  Our parallel SPH code is working well, also.  We hope to have a
paper about it done soon.  Performance is better than 100
particles/processor/second (including gravity) on the CM-5 or Intel
Paragon.  We have run a few timestep benchmark on the 512 processor
Intel Delta with 16 million particles.
***************************************************************************
>from magnus@astro.uu.se

If I remember it correct, Theuns didn't include self
gravitation in is implementation. At least he didn't use
the Barnes Hut tree to calculate the gravitation.

I have made a SPH-code for the CM2 using the Barnes Hut
method. It is relatively straighforward if you know how
the CM2 works:). It can become rather messy, and certain 
care must taken to keep the communication from taking too 
much time. 

Multipole methods may not be the method of choice if you
want to include hydrodynamics. The particle-cell interaction
in the BH-method is more related to hydrodynamics than the 
cell-cell interaction. Multipole methods are also much more
complicated to program, and the gain in efficiency may using 
them may be lost due to programming and debugging problems.

TMC among others are doing research on multipole methods. 
Perhaps you don't want to compete with them, but rather
wait for their publications.

The best visualization tool you can use is probably 
IDL. The problem is that it takes some time to master.

Magnus
***************************************************************************
>from marios@cs.washington.edu

Hi! Try xmosaic on http://www-hpcc.astro.washington.edu/ and you 'll find
lots of answers to your questions. Alternatively, you can get some info
by ftp-ing to ftp-hpcc.astro.washington.edu as anonymous and seeing if
there are any interesting papers there.

In UW, the Astronomers are using a very nice visualization tool called
TIPSY, written by Neal Katz and Tom Quinn. It's X-based and runs on
multiple platforms (including Sparcs).

In the web server you 'll find some info about TIPSY too.
***************************************************************************
>from bhatt@bellcore.com

Pangfeng Liu at DIMACS (pangfeng@dimacs.rutgers.edu) and I have
developed N-body codes on the CM-5.  In particular, we have implemented
Salmon's version of the Barnes-Hut algorithm.  The performance is
competitive with the Warren-Salmon implementations on the Delta.  The
code is written so that it is relatively easy to port other tree
algorithms (the Greengard/Rokhlin 3D adaptive FMM for example).

The following reports describe the implementation.

1.  P. Liu and S. Bhatt, Experiences with Parallel N-body simulations,
	to appear in the Proceedings of the 1994 ACM Symposium on
	Parallel Algorithms and Architectures.

2.  P. Liu, The parallel implementation of N-body algorithms, Ph.D.
	dissertation, Yale University, 1994.

We would be happy to provide our code to anyone interested in using it.

[I think their code is written in C.]
***************************************************************************
>from markus@octavia.anu.edu.au

I would be grateful if you could send me any info on Nbody and SPH
implementations and/or references that come your
way. As regards visualisation: We use AVS (commercial) as well as
pgplot, (gnuplot, sm, as you noted), vort (a 'movie' extension to the
PBMplus package), NCSA Imagetool has a few fans as well.

If you're interested I can find the main ftp sites for these
(I usually just archie for them).

Cheers,
	Markus
***************************************************************************
>from skohn@cs.ucsd.edu

     As part of my work on a run-time library for parallel systems,
I implemented a 3d SPH code.  This code was originally provided to
me by John Wallin (jwallin@hubble.gmu.edu), who would be able to
provide you with details about the physics end of things.

     The code runs on most parallel platforms I have access to (CM5,
Paragon, workstations with PVM, single processor workstations, C-90)
and the performance is quite good.  (Although somewhat difficult
to parallelize by hand, the run-time system we've developed made it
relatively easy to parallelize the code.)

     As for visualization, I have written a couple C++ classes which
do visualization using basic X11 (works on sun4).  They don't do anything
fancy, but will draw lines and plot points.  In the 3d version, you can
rotate the view using the mouse buttons.  In fact, my parallel SPH code
uses these routines to do run-time visualization.

     Here is a sample piece of code for the SPH visualization:

   XWindow3 window(500, 500, "sph3d smoothed particle hydrodynamics");
   window.setScale(-SCALE, SCALE, -SCALE, SCALE, -SCALE, SCALE);
   window.setBGColor("black");
   window.clearWindow();
   window.showWindow();
   while (window.checkButton() != EXIT_BUTTON_NUMBER)
     {
      int n;
      float x[MAXPARTICLES][DIM], t;
      get_data(input, n, t, x);
      cout << "Particles: " << n << " Timestep: " << t << endl;
      window.clearWindow();
      window.setFGColor("yellow");
      window.drawBox(-BOUND, -BOUND, -BOUND, BOUND, BOUND, BOUND);
      window.setFGColor("green");
      window.drawAxes(BOUND);
      window.setFGColor("white");
      window.drawPoints(x, MAXPARTICLES);
      window.showWindow();
      window.mouseRotate();
     }
   while (window.checkButton() == EXIT_BUTTON_NUMBER);
   window.closeWindow();

Let me know if you would like some more information.  All of this code
is available at the following sites:

	ftp://ftp.sdsc.edu/pub/sdsc/parallel/LPARX (anonymous ftp)
	http://www-cse.ucsd.edu/users/skohn	   (www)
	also available from netlib

The sph3d code is in subdirectory sph3d and the display code in
directory graph.
If you download the entire distribution, the sph code is in subdirectory
sph3d.  Also in sph3d is a display program which does the display of particles
>from trace files, something you might be interested in for visualizing your
work.

The user's manual goes into a lot of detail about the basis of the programming
model but does not explain the sph code.  You can use the code and modify
the physics (which some are doing) without knowing anything about the LPARX
parallel programming model.  Unfortunately, we haven't yet published a paper
about how we parallelized the sph3d code.  That's on our list of thinks to do.

As far as the C++/Fortran language stuff, we tend to use C++ for the management
of data structures and Fortran for numeric performance.  This style gives you
the best of both worlds:  data structures and good number-crunching performance.
The SPH3D code is written in a mixture of C++ and Fortran.  We do not use
HPF because HPF won't work for this type of application.

For details on the physics of the SPH3D code, I suggest you contact John Wallin
(jwallin@hubble.gnu.edu).
***************************************************************************
>from jps@samay.stanford.edu

We have a couple of papers that you might be interested in.  They are
available by anonymous ftp from samay.stanford.edu in the papers/
directory. The ones of interest are:  nbody-sched.ps.Z nbody-arch.ps.Z
and fmm-sc93.ps.Z

Cheers,

JP

[They also have a thesis there by Jaswinder Pal Singh entitled "Parallel Hierarchical N-Body Methods and their implicationsfor Multiprocessors" which is
worth reading.]
***************************************************************************
***************************************************************************
A couple of parting shots. I have used Tipsy before and it's worth
using.  Documentation is a bit of a problem but Tom Quinn is working on
this. sm (supermongo) is also worth using but this is not in the public
domain (though relatively cheap) and you'll have to write your own macros to
do 3D - there already exists some 3D functionality within it [if
interested contact: Patricia Monger :monger@calliope.cis.mcmaster.ca].
xgobi is another worthwhile tool. It's in the public domain (use
archie to find your nearest copy).

I have a bibtex format file of SPH papers I've come across - in no way is it
exhaustive but if anybody's interested I'll mail them a copy. Thanks again to
all those that replied. If anyone has anything else to add please mail me. All
the best,

			Mario.

-- 
 ________________________________________________________________________
 | Mario Antonioletti:: mario@astro.cf.ac.uk:: Dept of Physics and      |
 | Astronomy,UWCC,PO Box 913,Cardiff CF2 3YB,UK.Tel: 0222 874 000 X5997	|
 |______________________________________________________________________|
