Question regarding Esys-Particle Tutorial / User's Guide (Version 2.2.2)

Asked by Robert Sarracino

I'm beginning the Esys-Particle Tutorial, Version 2.2.2. The command

from esys.lsm import *

in section 2.1, page 7, gives an error message because neither InstallInfo nor LsmPy, called by __init__.py in esys.lsm, exist among the files extracted from the Version 2.2.2 tarball.

Is there something I'm missing? What beginning import statements should I use?

Question information

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

Hi Robert,

Assuming that you successfully compiled and installed ESyS-Particle from the source tarball, my first guess is that your environment variables are not correctly set. Try issuing the following three commands at the terminal prompt before running python:
export PATH=/usr/local/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH

More instructions on installing and testing ESyS-Particle are available here:
https://answers.launchpad.net/esys-particle/+faq/1613

If installing from a source tarball, only steps 7 and 8 are relevant.

If you encounter further problems, please post a copy of any error messages obtained.

Cheers,

Dion

Revision history for this message
Robert Sarracino (robert-sarracino) said :
#2

Hi Dion,

After extracting the tarball I found on this site to folder ESyS-Particle-2.2.2 I tried step 7 of the installation. Below is what happened. Please note the first message, that 'libtoolize' is not found. Other files are not found as well.

rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$ sh autogen.sh ./configure CC=mpicc CXX=mpic++

autogen.sh: 5: autogen.sh: libtoolize: not found
Fields/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Fields/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Fields/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Fields/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Fields/Makefile.am:16: its definition is in aclocal's search path.
Foundation/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Foundation/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Foundation/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Foundation/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Foundation/Makefile.am:16: its definition is in aclocal's search path.
Geometry/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Geometry/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Geometry/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Geometry/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Geometry/Makefile.am:16: its definition is in aclocal's search path.
Model/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
Model/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
Model/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
Model/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
Model/Makefile.am:17: its definition is in aclocal's search path.
Parallel/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
Parallel/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
Parallel/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
Parallel/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
Parallel/Makefile.am:17: its definition is in aclocal's search path.
Python/BoostPythonUtil/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Python/BoostPythonUtil/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/BoostPythonUtil/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/BoostPythonUtil/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Python/BoostPythonUtil/Makefile.am:16: its definition is in aclocal's search path.
Python/esys/lsm/Makefile.am:27: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/Makefile.am:27: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/Makefile.am:27: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/Makefile.am:27: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/Makefile.am:27: its definition is in aclocal's search path.
Python/esys/lsm/geometry/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/geometry/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/geometry/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/geometry/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/geometry/Makefile.am:16: its definition is in aclocal's search path.
Python/esys/lsm/util/Makefile.am:28: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/util/Makefile.am:28: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/util/Makefile.am:28: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/util/Makefile.am:28: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/util/Makefile.am:28: its definition is in aclocal's search path.
Tools/StressCalculator/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Tools/StressCalculator/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Tools/StressCalculator/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Tools/StressCalculator/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Tools/StressCalculator/Makefile.am:16: its definition is in aclocal's search path.
ntable/src/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
ntable/src/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
ntable/src/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
ntable/src/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
ntable/src/Makefile.am:16: its definition is in aclocal's search path.
pis/Makefile.am:16: library used but `RANLIB' is undefined
pis/Makefile.am:16: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
pis/Makefile.am:16: to `configure.ac' and run `autoconf' again.
ppa/src/Makefile.am:19: Libtool library used but `LIBTOOL' is undefined
ppa/src/Makefile.am:19: The usual way to define `LIBTOOL' is to add `LT_INIT'
ppa/src/Makefile.am:19: to `configure.ac' and run `aclocal' and `autoconf' again.
ppa/src/Makefile.am:19: If `LT_INIT' is in `configure.ac', make sure
ppa/src/Makefile.am:19: its definition is in aclocal's search path.
tml/comm/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/comm/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/comm/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/comm/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/comm/Makefile.am:17: its definition is in aclocal's search path.
tml/message/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/message/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/message/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/message/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/message/Makefile.am:17: its definition is in aclocal's search path.
tml/type/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/type/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/type/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/type/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/type/Makefile.am:17: its definition is in aclocal's search path.
Makefile.am:17: required directory ./libltdl does not exist
autogen.sh: 12: autogen.sh: bzr: not found
using existing bzrversion.h
rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$ make
make: *** No targets specified and no makefile found. Stop.
rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$ sudo make install
sudo: unable to resolve host ccore-rsarracino
[sudo] password for rsarracino:
make: *** No rule to make target `install'. Stop.
rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$ cd
rsarracino@ccore-rsarracino:~$ pwd
/home/rsarracino
rsarracino@ccore-rsarracino:~$ cd ESyS-Particle-2.2.2
rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$ sh autogen.sh ./configure CC=mpicc CXX=mpic++
autogen.sh: 5: autogen.sh: libtoolize: not found
Fields/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Fields/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Fields/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Fields/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Fields/Makefile.am:16: its definition is in aclocal's search path.
Foundation/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Foundation/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Foundation/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Foundation/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Foundation/Makefile.am:16: its definition is in aclocal's search path.
Geometry/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Geometry/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Geometry/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Geometry/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Geometry/Makefile.am:16: its definition is in aclocal's search path.
Model/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
Model/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
Model/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
Model/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
Model/Makefile.am:17: its definition is in aclocal's search path.
Parallel/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
Parallel/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
Parallel/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
Parallel/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
Parallel/Makefile.am:17: its definition is in aclocal's search path.
Python/BoostPythonUtil/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Python/BoostPythonUtil/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/BoostPythonUtil/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/BoostPythonUtil/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Python/BoostPythonUtil/Makefile.am:16: its definition is in aclocal's search path.
Python/esys/lsm/Makefile.am:27: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/Makefile.am:27: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/Makefile.am:27: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/Makefile.am:27: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/Makefile.am:27: its definition is in aclocal's search path.
Python/esys/lsm/geometry/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/geometry/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/geometry/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/geometry/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/geometry/Makefile.am:16: its definition is in aclocal's search path.
Python/esys/lsm/util/Makefile.am:28: Libtool library used but `LIBTOOL' is undefined
Python/esys/lsm/util/Makefile.am:28: The usual way to define `LIBTOOL' is to add `LT_INIT'
Python/esys/lsm/util/Makefile.am:28: to `configure.ac' and run `aclocal' and `autoconf' again.
Python/esys/lsm/util/Makefile.am:28: If `LT_INIT' is in `configure.ac', make sure
Python/esys/lsm/util/Makefile.am:28: its definition is in aclocal's search path.
Tools/StressCalculator/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
Tools/StressCalculator/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
Tools/StressCalculator/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
Tools/StressCalculator/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
Tools/StressCalculator/Makefile.am:16: its definition is in aclocal's search path.
ntable/src/Makefile.am:16: Libtool library used but `LIBTOOL' is undefined
ntable/src/Makefile.am:16: The usual way to define `LIBTOOL' is to add `LT_INIT'
ntable/src/Makefile.am:16: to `configure.ac' and run `aclocal' and `autoconf' again.
ntable/src/Makefile.am:16: If `LT_INIT' is in `configure.ac', make sure
ntable/src/Makefile.am:16: its definition is in aclocal's search path.
pis/Makefile.am:16: library used but `RANLIB' is undefined
pis/Makefile.am:16: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
pis/Makefile.am:16: to `configure.ac' and run `autoconf' again.
ppa/src/Makefile.am:19: Libtool library used but `LIBTOOL' is undefined
ppa/src/Makefile.am:19: The usual way to define `LIBTOOL' is to add `LT_INIT'
ppa/src/Makefile.am:19: to `configure.ac' and run `aclocal' and `autoconf' again.
ppa/src/Makefile.am:19: If `LT_INIT' is in `configure.ac', make sure
ppa/src/Makefile.am:19: its definition is in aclocal's search path.
tml/comm/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/comm/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/comm/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/comm/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/comm/Makefile.am:17: its definition is in aclocal's search path.
tml/message/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/message/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/message/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/message/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/message/Makefile.am:17: its definition is in aclocal's search path.
tml/type/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
tml/type/Makefile.am:17: The usual way to define `LIBTOOL' is to add `LT_INIT'
tml/type/Makefile.am:17: to `configure.ac' and run `aclocal' and `autoconf' again.
tml/type/Makefile.am:17: If `LT_INIT' is in `configure.ac', make sure
tml/type/Makefile.am:17: its definition is in aclocal's search path.
Makefile.am:17: required directory ./libltdl does not exist
autogen.sh: 12: autogen.sh: bzr: not found
using existing bzrversion.h
rsarracino@ccore-rsarracino:~/ESyS-Particle-2.2.2$

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

Hi Robert,

It would appear that your OS does not yet have all the necessary packages installed to compile ESyS-Particle.

If you are running Debian, Ubuntu or variants of either of these, complete steps 1-3 in the link I sent earlier. This will install all the required packages. After that issue this command:
sh autogen.sh
When that has completed, issue the configure command:
./configure CC=mpicc CXX=mpic++
Once that is complete (it will take some time) type:
make
Once compilation is complete, type
sudo make install

Then continue to step 8 before testing the ESyS-Particle installation.

If you are not using a Debian or Ubuntu variant, please let me know which OS is installed on your computer.

Cheers,

Dion

Revision history for this message
Robert Sarracino (robert-sarracino) said :
#4

Hi Dion,

I've installed the esys package from the Ubuntu Software Center, which has Version 2.1.3. I've also installed MPI for Python.

The first two commands on page 7, now run without a problem. The third command, however, gives the error message below. I typed (from ipython)

In [3]: sim = LsmMpi(numWorkerProcesses=1, mpiDimList=[1,1,1])

and received the following error message:

*** The MPI_comm_size() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.

How do i call MPI_INIT?

Revision history for this message
Robert Sarracino (robert-sarracino) said :
#5

Hi Dion,

As a follow up I went back and installed esys version 2.2.2, going through steps 1, 2, 3, 7 and 8, and when I entered the command

sim = LsmMpi(...) etc,

got the same error message as the one above.

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

Hi Robert,

Given that the 'from esys.lsm import *' command now works, ESyS-Particle is now successfully installed on your system.

Regarding your current 'MPI_INIT' error, this occurs because you are attempting to execute ESyS-Particle interactively via the python interface. ESyS-Particle is not designed for interactive use, but rather batch use on parallel supercomputers. Consequently, to run an ESyS-Particle simulation, one must first write a text file containing the entire simulation script. This can be done with any text editor. Once you have typed in the script (e.g. bingle_output.py from the Tutorial), the simulation is executed with a terminal command like:

mpirun -np 2 esysparticle bingle_output.py

where the number following '-np' should be equal to (number of worker processes) + 1, the additional process for the ESyS-Particle master process. This step is explained in the early sections of the Tutorial.

For info, mpirun is an executable supplied with the implementation of MPI installed on your system. It's role is to set up an environment in which MPI programs can communicate with one-another using MPI messaging subroutines. The -np argument informs mpirun of how many processes will reside within the comminution environment.

esysparticle is an executable supplied with ESyS-Particle specifically designed to initialise the master and worker processes, then execute the commands in the supplied simulation script. It is esysparticle that calls MPI_INIT. Thereafter the master process launches an instance of the python interpretter and passes your simulation script to the interpretter. Worker processes are also set up by esysparticle, awaiting MPI instructions from the master process. Each call to sim.someFunction(..) in the simulation script causes the master process to send MPI instructions to the workers. For the bulk of the simulation script, these are initialisation commands of one form or another. Once sim.run() is called, the actual simulation is executed by the worker processes. Thereafter, the only way to interact with the simulation is via Runnables, a concept that is also explained in the Tutorial.

For completeness, I should mention that it is possible to execute ESyS-Particle interactively, one command at a time but this should only be done for testing/experimental purposes. An interactive ESyS-Particle terminal can be started with the following command:
mpirun -xterm 0 -np 2 esysparticle
This command will open a terminal window running the interactive python interpretter in which ESyS-Particle commands may be issued one by one. I should re-iterate that it is NOT recommended to run ESyS-Particle simulations in this fashion. Writing simulation scripts is a far better option.

I hope this helps and have fun!

Cheers,

Dion

Revision history for this message
Robert Sarracino (robert-sarracino) said :
#7

Thanks, Dion.

Revision history for this message
Robert Sarracino (robert-sarracino) said :
#8

Thanks Dion Weatherley, that solved my question.