bingle_output.py

Asked by Thomas Wagner

When running the bingle example as suggested in the Beginners Guide:

mpirun -np 1 /usr/local/bin/mpipython bingle_output.py

it results in the output:

wrong number of processes !! aborting

When running bingle_output.py with -np 2 it runs all 10000 time steps and outputs the positions of both particles. The last output is timestep 9900. However the process does not return. Pressing Control+C results in the output of:

1 additional process aborted (not shown)

and returns to the shell. Is this behaviour intended?

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Thomas Wagner
Solved:
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Thomas,

The first error "wrong number of processes !! aborting" is normal behaviour. Since writing the Beginners Guide I changed the MPI implementation so that now the number after -np must be equal to the number of worker processes + 1. When the LsmMpi() container class is initialised, the number of worker processes is set by the numWorkerProcesses and MpiDimList arguments. To run the example correctly (as you found), the following commandline should be used:
mpirun -np 2 /usr/local/bin/mpipython bingle_output.py

The second problem with the process not returning is an annoying recurrent problem that's bugging me at the moment as well. I haven't yet figured out why MPI_Finalise() is not being called and how to cause the simulation to return. Strangely, this doesn't happen for all scripts and on all architectures so is tricky to track down. The error you got upon typing ^C is normal when a simulation is terminated in this way.

In answer to your question then, the behaviour is normal but not exactly intended!

Cheers,

Dion.

Revision history for this message
Dion Weatherley (d-weatherley) said :
#2

The Beginner's Guide has been updated to provide more information about running simulations.

The new version is available for download from:
http://www.uq.edu.au/~uqdweath/ESyS-Particle_Tutorial.pdf

Cheers,

Dion.

Revision history for this message
Thomas Wagner (thwagner) said :
#3

In the Tutorial http://www.uq.edu.au/~uqdweath/ESyS-Particle_Tutorial.pdf
the bingle_runnable.py on line 11 should read:
from POVsnaps import POVsnaps

Revision history for this message
Dion Weatherley (d-weatherley) said :
#4

Thanks Thomas.

I'll fix that for the next version of the tutorial.

Cheers,

Dion.

Revision history for this message
Dennis Arogancia (dcarogancia) said :
#5

I tried running the bingle example in the Esys-Particle Users Guide:

  mpiexec --machinefile hosts.txt -np 2 mpipython bingle_output.py

It results in the output:
  CSubLatticeControler::initMPI()
slave started at local/global rank -1075790200 / 1
Traceback (most recent call last):
  File "bingle_output.py", line 26, in ?
    particle.setLinearVelocity(Vec3(1.0,-1.0,1.0))
AttributeError: 'NRotSphere' object has no attribute 'setLinearVelocity'

Im using version 2.0 of esys-particle. May I know what's wrong?

Revision history for this message
Dennis Arogancia (dcarogancia) said :
#6

I tried running the bingle example in the Esys-Particle Users Guide:

  mpiexec --machinefile hosts.txt -np 2 mpipython bingle_output.py

It results in the output:
  CSubLatticeControler::initMPI()
slave started at local/global rank -1075790200 / 1
Traceback (most recent call last):
  File "bingle_output.py", line 26, in ?
    particle.setLinearVelocity(Vec3(1.0,-1.0,1.0))
AttributeError: 'NRotSphere' object has no attribute 'setLinearVelocity'

Im using version 2.0 of esys-particle. I installed it in CERN Linux 4.7. May I know what's wrong?

Sincerely,
Dennis Arogancia

Revision history for this message
Dion Weatherley (d-weatherley) said :
#7

Hi Dennis,

The problem is largely due to updates I made last week to the Users Guide in preparation for the version 2.0 "stable" release at the end of this week. The two versions of ESyS-Particle currently available for download on Launchpad are both out of date and will be replaced by the new version.

You have two options to fix this problem before I release the new version.

1/ Change setLinearVelocity(...) to setVelocity(...). This will fix bingle.py but you will also find problems with the other tutorial examples.

2/ Obtain a copy of the development source tree from our SVN repository:
svn checkout https://svn.esscc.uq.edu.au/svn/esys3/lsm/trunk ESyS-Particle-2.0
and then "make uninstall" your current ESyS-Particle installation before installing the new version. All the tutorial examples should work with this new version.

The development source tree is now pretty much identical to the v2.0 release version. We are just doing some tidying up this week.

Sorry for the hassles. The v2.0 stable release will hopefully eliminate many of these annoying little problems.

Cheers,

Dion.

Revision history for this message
Dennis Arogancia (dcarogancia) said :
#8

Thanks so much for your help. I installed the new version in a Fedora 10 OS. Though I have not tested all the tutorial examples I think it should work.

Sincerely,
Dennis Arogancia