mpi4py does not currently works with the standard python interpreter. This prevents us
to works whith models interactively in parallel.
However, using pgwin, while showing your model in a window, you can interact with it in
parallel. Try to run :
[lunix@lunix examples]$ mpirun -np 2 pgwin -t gadget gadget_z00.dat
If everything works, a window should open, displaying your model.
Figure 2.1:
Snapshot of pgwin.
|
With your mouse, you can interact with the model. A right click redisplay the model. As a more complete documentation
will describe pgwin futher in this document, we will here only focus on some parallel features.
Try node info on the Operations menu. You get the number of particles contained
by each processus as well as the number particles of each type.
Now, we can interact with the model using the bottom entry, at the left of the clear button.
The commands you can entrer here are similar to the one used in the python cosole or in scripts. The
only but major difference is that the variable corresponding to the model object is called
self.nb instead of nb.
Try for example :
self.nb.translate([3125,-4690,1720])
and then press on the right button of the mouse. The model is now center on
.
Now select a small region around this point :
self.nb = self.nb.selectc((self.nb.rxyz()<500))
Now, if you display the number of particles per processus, using node info on the Operations menu,
you probably see processus with much more particles.
You can redistribute the number of particles in order to increase the preformaces, with the command
redistribute particles on the Operations menu
Documentation released on February 2007.
See About this document... for information on suggesting changes.