Error importing lsm

Asked by Temitope

Hi there,

I am trying to run esys-particle directly from the flash drive in which it has been installed into. I am currently trying the first tutorial (bingle.py) but i am getting the error message below while trying to run it:

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ cd /home/ubuntu/Desktop/Esys_tutorial
ubuntu@ubuntu:~/Desktop/Esys_tutorial$ python bingle.py
Traceback (most recent call last):
  File "bingle.py", line 1, in <module>
    from esys.lsm import *
  File "/usr/local/lib/python2.7/dist-packages/esys/lsm/__init__.py", line 15, in <module>
    from .util import InstallInfo
  File "/usr/local/lib/python2.7/dist-packages/esys/lsm/util/__init__.py", line 13, in <module>
    from esys.lsm.util.FoundationPy import *
ImportError: libFoundation-2.3.2.so: cannot open shared object file: No such file or directory
ubuntu@ubuntu:~/Desktop/Esys_tutorial$

Please help me

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Qi Shao
Solved:
Last query:
Last reply:

This question was reopened

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

Hi Temitope,

It looks like your path variables are not set correctly. Could you please post the output from the following 3 commands?

$ echo $LD_LIBRARY_PATH

$ ls /usr/local/lib/libFoundation*

$ which esysparticle

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#2

Hi Dion,

I did run the command. Please see the response below;

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ echo $LD_LIBRARY_PATH

ubuntu@ubuntu:~$ ls /usr/local/lib/libFoundation*
/usr/local/lib/libFoundation-2.3.2.so /usr/local/lib/libFoundation.la
/usr/local/lib/libFoundation.a /usr/local/lib/libFoundation.so
ubuntu@ubuntu:~$ which esysparticle
/usr/local/bin/esysparticle
ubuntu@ubuntu:~$

Kind Regards
Tope

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

Hi Tope,

Thanks for the reply. That confirms that your path variables are not set correctly.

There are two options to fix this. The first is temporary and the second should be permanent. I suggest you try option 1 first to ensure that this works. If so, then try option 2. Otherwise, reply with details of any further error messages.

Option 1:
=======

In the terminal where you wish to execute ESyS-Particle, type the following commands:

$ 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/site-packages/:$PYTHONPATH

N.B. if you choose this option, you will need to type these commands each time you login.

Option 2:
=======

The option will permanently update your path variables so that ESyS-Particle will work each time you login. You need to use a text editor to modify a file called ~/.bashrc and add the lines above to the end of the file (without the leading '$' symbol). For example, using the 'gedit' text editor:

$ gedit ~/.bashrc

[add these lines to the end of the file then save and exit the text editor:]

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/site-packages/:$PYTHONPATH

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#4

Hi Dion,

I did try option 1. It seems to work since i did not get any error message. However , i tried to work through the bingle.py tutorial. i stared getting this error from the third command (sim = LsmMpi(numWorkerProcesses=1, mpiDimList=[1,1,1]).
Here is the message from the terminal:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ export PATH=/usr/local/bin/:$PATH
ubuntu@ubuntu:~$ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
ubuntu@ubuntu:~$ export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
ubuntu@ubuntu:~$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
ubuntu@ubuntu:~$ cd /home/ubuntu/Desktop/Esys_tutorial
ubuntu@ubuntu:~/Desktop/Esys_tutorial$ python bingle.py
*** 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.
[ubuntu:2838] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!
ubuntu@ubuntu:~/Desktop/Esys_tutorial$

Regards
Tope

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

Hi Tope,

Yes, the path problem looks to be fixed now.

Your current error message is because esys-particle scripts (like bingle.py) need to be executed with a particular command.

To test bingle.py, issue the following command:

$ mpirun -np 2 esysparticle bingle.py

The number after '-np' must equal one more than the number of worker processes i.e. Nw + 1. Since bingle.py only uses one worker process (see the LsmMpi command in the script), we must instruct mpirun to set up 2 threads, one for the master process and one for the worker process.

Assuming bingle.py now executes without another error message, I strongly suggest you carefully read and work through the examples in the ESyS-Particle Tutorial:
https://launchpad.net/esys-particle/2.3/2.3.1/+download/ESyS-Particle_Tutorial.pdf

The Tutorial covers most of the basics for building and executing ESyS-Particle simulations, as well as some of the basics of DEM modelling.

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#6

Thank you Dion,

I am working through the tutorial. After executing the command up to : sim = LsmMpi(numWorkerProcesses=1, mpiDimList=[1,1,1])
sim.initNeighbourSearch(
particleType="NRotSphere",
gridSpacing=2.5,
verletDist=0.5
)

I got the following message, I seem not to understand what it means.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ export PATH=/usr/local/bin/:$PATH
ubuntu@ubuntu:~$ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
ubuntu@ubuntu:~$ cd /home/ubuntu/Desktop/Esys_tutorial
ubuntu@ubuntu:~/Desktop/Esys_tutorial$ mpirun -np 2 /usr/local/bin/mpipython bingle.py
WARNING:
=======

The use of 'mpipython' to execute ESyS-Particle simulations
WARNING:
=======

The use of 'mpipython' to execute ESyS-Particle simulations
is deprecated as of ESyS-Particle v2.2.

is deprecated as of ESyS-Particle v2.2.

Instead, use a commandline similar to:
Instead, use a commandline similar to:
mpirun -np 3 esysparticle myscript.py

Now executing: "esysparticle bingle.py"...

mpirun -np 3 esysparticle myscript.py

Now executing: "esysparticle bingle.py"...

CSubLatticeControler::initMPI()
slave started at local/global rank 0 / 1
Traceback (most recent call last):
  File "bingle.py", line 7, in <module>

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

Hi Tope,

The warning messages prior to "CSubLatticeControler::initMPI()" are normal and will not cause any problems with ESyS-Particle simulations. To remove these warnings, execute your simulation with the following command:

mpirun -np 2 /usr/local/bin/esysparticle bingle.py

The 'mpipython' command is now deprecated and has been replaced with the 'esysparticle' command.

From your last post, it would appear that there is still a problem though. The last 2 lines of your post:

Traceback (most recent call last):
  File "bingle.py", line 7, in <module>

appear to be the start of a Python error message. It is likely that there is a syntax/spelling/grammatical error on line number 6 or 7 of your script.

Could you please re-run bingle.py with the 'esysparticle' command above then post all output following "Traceback"?

Also, please post the contents of your bingle.py script.

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#8

Hi Dion,

I did execute the command (mpirun -np 2 /usr/local/bin/esysparticle bingle.py) and the warning went off. Thanks for that.

However, it seems i still have the argument error. Here is the message and the content of my bingle.py script.

Message:

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ export PATH=/usr/local/bin/:$PATH
ubuntu@ubuntu:~$ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ cd /home/ubuntu/Desktop/Esys_tutorial
ubuntu@ubuntu:~/Desktop/Esys_tutorial$ mpirun -np 2 /usr/local/bin/esysparticle bingle.py
CSubLatticeControler::initMPI()
slave started at local/global rank 0 / 1
Traceback (most recent call last):
  File "bingle.py", line 7, in <module>
    verletDist=0.5
Boost.Python.ArgumentError: Python argument types in
    LsmMpi.initNeighbourSearch(LsmMpi)
did not match C++ signature:
    initNeighbourSearch(esys::lsm::LsmMpiPy {lvalue}, std::string particleType, double gridSpacing, double verletDist)

Content of bingle.py script:

from esys.lsm import *
from esys.lsm.util import Vec3, BoundingBox
sim = LsmMpi(numWorkerProcesses=1, mpiDimList=[1,1,1])
sim.initNeighbourSearch (
   ParticleType="NRotSphere",
   gridSpacing=2.5,
   verletDist=0.5
)

Kind Regards
Tope

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

Hi Tope,

Try changing "ParticleType" to "particleType".

Python is case-sensitive so I think the capital letter 'P' is causing the error in this case.

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#10

Hi Dion,

It's now working.

Thank you.

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

Superb! Have fun Tope!

Dion

Revision history for this message
Temitope (temitope) said :
#12

Hi Dion,

I am currently working on a computer installed with ubuntu. I tried some of the previous steps you suggested while trying to run from a flash drive. Below is the response that I got: I do not know what to do from here. please help. Is there any other easy way to run it since i have downloaded the latest version of Esysparticle and will be running directly on an ubuntu computer.

adminuser@adminuser-Lenovo-B570e:~$ export PATH=/usr/local/bin/:$PATH
adminuser@adminuser-Lenovo-B570e:~$ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
adminuser@adminuser-Lenovo-B570e:~$ export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
adminuser@adminuser-Lenovo-B570e:~$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH
adminuser@adminuser-Lenovo-B570e:~$ cd /home/adminuser/Downloads/Tutorials
adminuser@adminuser-Lenovo-B570e:~/Downloads/Tutorials$ mpirun -np 2 /usr/local/bin/esysparticle bingle.py
The program 'mpirun' can be found in the following packages:
 * lam-runtime
 * mpich
 * openmpi-bin
Try: sudo apt-get install <selected package>
adminuser@adminuser-Lenovo-B570e:~/Downloads/Tutorials$

Revision history for this message
Qi Shao (uqqshao) said :
#13

Hi Temitope,

Dion asked me to assist you with your questions. It seems that ESyS-Particle has not been installed correctly in your system. Did you follow the instructions shown in the following link to install ESyS-Particle?

https://answers.launchpad.net/esys-particle/+faq/1613

You can check whether EsyS-Particle is installed via the following command:

$ which esysparticle

Some mandatory dependencies are also required to be pre-installed prior to building EsyS-Particle. To find out whether they are installed in your system, please use the following commands:

$ dpkg -l |grep openmpi
$ dpkg -l |grep libboost

Could you please post the output from above-mentioned commands?

Cheers,
Qi

Revision history for this message
Temitope (temitope) said :
#14

Hi Qi,

I tried the installation intruction from the link and also executed the two commands you gave me. Here is what i got:

adminuser@adminuser-Lenovo-B570e:~$ sudo apt-get install libtool automake build-essential bzr
[sudo] password for adminuser:
Sorry, try again.
[sudo] password for adminuser:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
build-essential set to manually installed.
The following extra packages will be installed:
  autoconf autotools-dev libjs-jquery libltdl-dev libsigsegv2 m4 python-bzrlib
  python-configobj python-gpgme python-keyring python-launchpadlib
  python-lazr.restfulclient python-lazr.uri python-oauth python-secretstorage
  python-simplejson python-wadllib
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc bzr-doc bzrtools
  python-bzrlib.tests javascript-common libtool-doc automaken gfortran
  fortran95-compiler gcj-jdk python-bzrlib-dbg python-kerberos python-paramiko
  python-pycurl python-configobj-doc python-fs python-gdata python-kde4
  python-keyczar python-testresources python-secretstorage-doc
The following NEW packages will be installed:
  autoconf automake autotools-dev bzr libjs-jquery libltdl-dev libsigsegv2
  libtool m4 python-bzrlib python-configobj python-gpgme python-keyring
  python-launchpadlib python-lazr.restfulclient python-lazr.uri python-oauth
  python-secretstorage python-simplejson python-wadllib
0 upgraded, 20 newly installed, 0 to remove and 255 not upgraded.
Need to get 3,244 kB of archives.
After this operation, 16.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://za.archive.ubuntu.com/ubuntu/ wily/main libsigsegv2 amd64 2.10-4 [14.1 kB]
Get:2 http://za.archive.ubuntu.com/ubuntu/ wily/main m4 amd64 1.4.17-4 [193 kB]
Get:3 http://za.archive.ubuntu.com/ubuntu/ wily/main autoconf all 2.69-8 [321 kB]
Get:4 http://za.archive.ubuntu.com/ubuntu/ wily/main autotools-dev all 20140911.1 [39.6 kB]
Get:5 http://za.archive.ubuntu.com/ubuntu/ wily/main automake all 1:1.15-1ubuntu1 [511 kB]
Get:6 http://za.archive.ubuntu.com/ubuntu/ wily/main python-configobj all 5.0.6-2 [34.2 kB]
Get:7 http://za.archive.ubuntu.com/ubuntu/ wily/main python-bzrlib amd64 2.6.0+bzr6602-2ubuntu4 [1,390 kB]
Get:8 http://za.archive.ubuntu.com/ubuntu/ wily/main bzr all 2.6.0+bzr6602-2ubuntu4 [37.3 kB]
Get:9 http://za.archive.ubuntu.com/ubuntu/ wily/main libjs-jquery all 1.7.2+dfsg-3ubuntu2 [69.0 kB]
Get:10 http://za.archive.ubuntu.com/ubuntu/ wily/main libltdl-dev amd64 2.4.2-1.11 [158 kB]
Get:11 http://za.archive.ubuntu.com/ubuntu/ wily/main libtool all 2.4.2-1.11 [180 kB]
Get:12 http://za.archive.ubuntu.com/ubuntu/ wily/main python-gpgme amd64 0.3-1build1 [24.3 kB]
Get:13 http://za.archive.ubuntu.com/ubuntu/ wily/main python-keyring all 4.0-1ubuntu1 [48.7 kB]
Get:14 http://za.archive.ubuntu.com/ubuntu/ wily/main python-lazr.uri all 1.0.3-2build1 [13.6 kB]
Get:15 http://za.archive.ubuntu.com/ubuntu/ wily/main python-simplejson amd64 3.7.3-1ubuntu1 [60.0 kB]
Get:16 http://za.archive.ubuntu.com/ubuntu/ wily/main python-wadllib all 1.3.2-3 [28.2 kB]
Get:17 http://za.archive.ubuntu.com/ubuntu/ wily/main python-oauth all 1.0.1-4 [12.9 kB]
Get:18 http://za.archive.ubuntu.com/ubuntu/ wily/main python-lazr.restfulclient all 0.13.4-5build1 [50.8 kB]
Get:19 http://za.archive.ubuntu.com/ubuntu/ wily/main python-launchpadlib all 1.10.3-2ubuntu1 [45.7 kB]
Get:20 http://za.archive.ubuntu.com/ubuntu/ wily/main python-secretstorage all 2.1.2-1 [12.0 kB]
Fetched 3,244 kB in 4s (665 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 175380 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.10-4_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.10-4) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.17-4_amd64.deb ...
Unpacking m4 (1.4.17-4) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-8_all.deb ...
Unpacking autoconf (2.69-8) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20140911.1_all.deb ...
Unpacking autotools-dev (20140911.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.15-1ubuntu1_all.deb ...
Unpacking automake (1:1.15-1ubuntu1) ...
Selecting previously unselected package python-configobj.
Preparing to unpack .../python-configobj_5.0.6-2_all.deb ...
Unpacking python-configobj (5.0.6-2) ...
Selecting previously unselected package python-bzrlib.
Preparing to unpack .../python-bzrlib_2.6.0+bzr6602-2ubuntu4_amd64.deb ...
Unpacking python-bzrlib (2.6.0+bzr6602-2ubuntu4) ...
Selecting previously unselected package bzr.
Preparing to unpack .../bzr_2.6.0+bzr6602-2ubuntu4_all.deb ...
Unpacking bzr (2.6.0+bzr6602-2ubuntu4) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../libjs-jquery_1.7.2+dfsg-3ubuntu2_all.deb ...
Unpacking libjs-jquery (1.7.2+dfsg-3ubuntu2) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../libltdl-dev_2.4.2-1.11_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.2-1.11) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.2-1.11_all.deb ...
Unpacking libtool (2.4.2-1.11) ...
Selecting previously unselected package python-gpgme.
Preparing to unpack .../python-gpgme_0.3-1build1_amd64.deb ...
Unpacking python-gpgme (0.3-1build1) ...
Selecting previously unselected package python-keyring.
Preparing to unpack .../python-keyring_4.0-1ubuntu1_all.deb ...
Unpacking python-keyring (4.0-1ubuntu1) ...
Selecting previously unselected package python-lazr.uri.
Preparing to unpack .../python-lazr.uri_1.0.3-2build1_all.deb ...
Unpacking python-lazr.uri (1.0.3-2build1) ...
Selecting previously unselected package python-simplejson.
Preparing to unpack .../python-simplejson_3.7.3-1ubuntu1_amd64.deb ...
Unpacking python-simplejson (3.7.3-1ubuntu1) ...
Selecting previously unselected package python-wadllib.
Preparing to unpack .../python-wadllib_1.3.2-3_all.deb ...
Unpacking python-wadllib (1.3.2-3) ...
Selecting previously unselected package python-oauth.
Preparing to unpack .../python-oauth_1.0.1-4_all.deb ...
Unpacking python-oauth (1.0.1-4) ...
Selecting previously unselected package python-lazr.restfulclient.
Preparing to unpack .../python-lazr.restfulclient_0.13.4-5build1_all.deb ...
Unpacking python-lazr.restfulclient (0.13.4-5build1) ...
Selecting previously unselected package python-launchpadlib.
Preparing to unpack .../python-launchpadlib_1.10.3-2ubuntu1_all.deb ...
Unpacking python-launchpadlib (1.10.3-2ubuntu1) ...
Selecting previously unselected package python-secretstorage.
Preparing to unpack .../python-secretstorage_2.1.2-1_all.deb ...
Unpacking python-secretstorage (2.1.2-1) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for install-info (6.0.0.dfsg.1-3) ...
Processing triggers for doc-base (0.10.6) ...
Processing 1 added doc-base file...
Setting up libsigsegv2:amd64 (2.10-4) ...
Setting up m4 (1.4.17-4) ...
Setting up autoconf (2.69-8) ...
Setting up autotools-dev (20140911.1) ...
Setting up automake (1:1.15-1ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up python-configobj (5.0.6-2) ...
Setting up python-bzrlib (2.6.0+bzr6602-2ubuntu4) ...
Setting up bzr (2.6.0+bzr6602-2ubuntu4) ...
Setting up libjs-jquery (1.7.2+dfsg-3ubuntu2) ...
Setting up libltdl-dev:amd64 (2.4.2-1.11) ...
Setting up libtool (2.4.2-1.11) ...
Setting up python-gpgme (0.3-1build1) ...
Setting up python-keyring (4.0-1ubuntu1) ...
Setting up python-lazr.uri (1.0.3-2build1) ...
Setting up python-simplejson (3.7.3-1ubuntu1) ...
Setting up python-wadllib (1.3.2-3) ...
Setting up python-oauth (1.0.1-4) ...
Setting up python-lazr.restfulclient (0.13.4-5build1) ...
Setting up python-launchpadlib (1.10.3-2ubuntu1) ...
Setting up python-secretstorage (2.1.2-1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
adminuser@adminuser-Lenovo-B570e:~$ which esysparticle
adminuser@adminuser-Lenovo-B570e:~$ dpkg -l |grep openmpi
adminuser@adminuser-Lenovo-B570e:~$ dpkg -l |grep libboost
ii libboost-date-time1.58.0:amd64 1.58.0+dfsg-3.1ubuntu1 amd64 set of date-time libraries based on generic programming concepts
ii libboost-filesystem1.58.0:amd64 1.58.0+dfsg-3.1ubuntu1 amd64 filesystem operations (portable paths, iteration over directories, etc) in C++
ii libboost-iostreams1.58.0:amd64 1.58.0+dfsg-3.1ubuntu1 amd64 Boost.Iostreams Library
ii libboost-system1.58.0:amd64 1.58.0+dfsg-3.1ubuntu1 amd64 Operating system (e.g. diagnostics support) library
adminuser@adminuser-Lenovo-B570e:~$

Kind Regards

Revision history for this message
Qi Shao (uqqshao) said :
#15

Hi Temitope,

It seems that openmpi has not been installed in your system. This video explains how to install openmpi step by step:

https://www.youtube.com/watch?v=QIMAu_o_5V8

Please install openmpi and then build ESyS-Particle following the instruction. Let me know if there is any issue.

Cheers,
Qi

Revision history for this message
Qi Shao (uqqshao) said :
#16

Hi Temitope,

I just noticed that you have not completed all the steps shown in the FAQ (installation instruction), except for the first step "sudo apt-get install libtool automake build-essential bzr". Please disregard my last reply, and go through all the steps shown below (selectively copied from the FAQ). Let you know if you have difficulties in any of these steps.

2) Install MANDATORY dependencies:
sudo apt-get install libtool automake build-essential bzr
sudo apt-get install mpi-default-bin mpi-default-dev libboost-all-dev

5) Configure bazaar:
5a) bzr whoami "Your Name <email address hidden>"
5b) ssh-keygen -t rsa
5c) upload the public key to launchpad -- instructions are available here:
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
5d) bzr launchpad-login launchpad-username

6) Obtain and install the latest development version of ESyS-Particle:
bzr co lp:esys-particle
sh autogen.sh
./configure CC=mpicc CXX=mpic++
make
sudo make install

7) Set up environment variables
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

[OPTIONALLY, append these 'export' lines to the end of ~/.bashrc]

8) run a test script e.g. bingle_output.py from the ESyS-Particle Tutorial
mpirun -np 2 esysparticle bingle_output.py

Revision history for this message
Temitope (temitope) said :
#17

Hi Qi,

I encountered the following message from ((5c) uploading the public key to launchpad) of the instruction you gave:

dminuser@adminuser-Lenovo-B570e:~$ sudo apt-get install openssh-client
[sudo] password for adminuser:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  libpam-ssh keychain monkeysphere
The following packages will be upgraded:
  openssh-client
1 upgraded, 0 newly installed, 0 to remove and 252 not upgraded.
Need to get 604 kB of archives.
After this operation, 9,216 B of additional disk space will be used.
Get:1 http://za.archive.ubuntu.com/ubuntu/ wily-updates/main openssh-client amd64 1:6.9p1-2ubuntu0.2 [604 kB]
Fetched 604 kB in 1s (334 kB/s)
(Reading database ... 190357 files and directories currently installed.)
Preparing to unpack .../openssh-client_1%3a6.9p1-2ubuntu0.2_amd64.deb ...
Unpacking openssh-client (1:6.9p1-2ubuntu0.2) over (1:6.9p1-2) ...
Processing triggers for man-db (2.7.4-1) ...
Setting up openssh-client (1:6.9p1-2ubuntu0.2) ...
adminuser@adminuser-Lenovo-B570e:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/adminuser/.ssh/id_rsa):
/home/adminuser/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/adminuser/.ssh/id_rsa.
Your public key has been saved in /home/adminuser/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:w00YQ/bpcrpZAAwudE3JIEqhHLSRSQmlplwHwW4IzXc adminuser@adminuser-Lenovo-B570e
The key's randomart image is:
+---[RSA 2048]----+
|=@Xo==.o= |
|=B*=ooE. = . |
|=++o.oo . + |
|+..+. o + |
|... S + |
| * |
| . . |
| + |
| o |
+----[SHA256]-----+
adminuser@adminuser-Lenovo-B570e:~$

Revision history for this message
Temitope (temitope) said :
#18

Additional info:

I tried to run the id_rsa file but permission was denied. I'm not sure if this was initially created. Please see the response below:

adminuser@adminuser-Lenovo-B570e:~$ /.ssh/id_rsa
bash: /.ssh/id_rsa: No such file or directory
adminuser@adminuser-Lenovo-B570e:~$ /home/adminuser/.ssh/id_rsa
bash: /home/adminuser/.ssh/id_rsa: Permission denied
adminuser@adminuser-Lenovo-B570e:~$ 3144
3144: command not found
adminuser@adminuser-Lenovo-B570e:~$ ssh-add /path/to/file/id_rsa_newfile
/path/to/file/id_rsa_newfile: No such file or directory
adminuser@adminuser-Lenovo-B570e:~$ /home/adminuser/.ssh/id_rsa
bash: /home/adminuser/.ssh/id_rsa: Permission denied
adminuser@adminuser-Lenovo-B570e:

Revision history for this message
Qi Shao (uqqshao) said :
#19

Hi Temitope,

Instead of running the id_rsa.pub file, you will need to open this file in a text editor and copy & paste its contents to your SSH keys page. You can get its contents using the command:

cat ~/.ssh/id_rsa.pub

Then follow the instructions shown by link in (5c) to import your public key to launchpad.

Alternatively, you can download the source-code tarball from:

https://launchpad.net/esys-particle/trunk/2.3.5

Unzip the tarball file and then continue with step 6).

Cheers,
Qi

Revision history for this message
Temitope (temitope) said :
#20

Hi Qi,

I did access the content and followed the instruction to upload my SSH public key which was successfully added. The error for step 5d is :

adminuser@temitope-oladele:~$ bzr launchpad-login launchpad-username
bzr: ERROR: The user name launchpad-username is not registered on Launchpad.
adminuser@temitope-oladele:~$

Revision history for this message
Qi Shao (uqqshao) said :
#21

Hi Temitope,

Please make sure the username you typed in is consistent with the one you registered on LaunchPad. Actually you do not need to log in to download the code. Just use the following command to get a copy of the branch:

bzr branch lp:esys-particle

Cheers,
Qi

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

Hi Temitope,

When you issue this command:

$ bzr launchpad-login launchpad-username

you need to replace the word "launchpad-username" with your assigned username for the launchpad website. Your launchpad username is "temitope" so issue this command:

$ bzr launchpad-login temitope

After that command is successful (no error message), you can continue with the remaining installation instructions in the FAQ.

Cheers,

Dion

Revision history for this message
Temitope (temitope) said :
#23

Hi Dion and Qi,

I was able to log with with the correct user name "temitope"

In step 6, only the first line of the command could be executed in the terminal. here is the message below together with the error message:

adminuser@temitope-oladele:~$ bzr launchpad-login temitope
adminuser@temitope-oladele:~$ bzr co lp:esys-particle
The authenticity of host 'bazaar.launchpad.net (91.189.95.84)' can't be established.
RSA key fingerprint is SHA256:dS2DmMhdbMsWaFP4HOF7A/ut73ozMR/gDL2Xxs01/7A.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bazaar.launchpad.net,91.189.95.84' (RSA) to the list of known hosts.
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
adminuser@temitope-oladele:~$

Revision history for this message
Qi Shao (uqqshao) said :
#24

Hi Temitope,

It might because you have not successfully registered your key with Launchpad. You can visit your SSH keys page at https://launchpad.net/people/+me/+editsshkeys to check if you already have any SSH key there. If yes, please make sure you have copied and pasted ALL the contents in your id_rsa.pub file. If no, then re-upload your SSH key to Lauchpad following the instructions.

As I said, if you have trouble with bazaar and just want to install ESyS-Particle as soon as possible, you can always download the source-code tarball for installation.

Cheers,
Qi

Revision history for this message
Temitope (temitope) said :
#25

Hi Qi,

I checked the SSH key page and i found that it was successful and i did try to re-register it again which was also successful. i got a confirmatory email. I continued with step 6 and i got the same error message as shown below:adminuser@temitope-oladele:~$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdJTjmp2myzVCKRYIdAUWV1HJHjJXQwOLjU1PnjxsYNDGin6XlaO7K042lrg72L9jqyvKnGRNXaP61EQd8Bw/CqnnHTKw2uoWZU3IDOho86m/MMmrYQgPOSeg2PvfVRfmYK+26U08x1/Y9N+wdvEZpkBZjRbAwRKqr3HXwN5v7qJE1AV/F2u9a9Yu8F2DRqZiYPLsR0Y8i5wexJzUCKX9O23+MzoMFeNfrQH3YSeCVAcPDxDoBUESFG4RYDR3trxBUkNKaOeAHukunWbMdwpTBrd5EgRLb0J5dHWnw0oPtjY5cBNpzOehptwqND86DKzyh9FFkOFiF3zyIzYnFm+v1 adminuser@temitope-oladele
adminuser@temitope-oladele:~$ bzr launchpad-login temitope
adminuser@temitope-oladele:~$ bzr co lp:esys-particle
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
adminuser@temitope-oladele:~$

I also went through the alternative route of downloading the source-code tarball for installation, unzipped the folder and continued with step 6. but i also got the same error as shown below:

adminuser@temitope-oladele:~$ bzr co lp:esys-particle
Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
adminuser@temitope-oladele:~$

Regards
Tope

Revision history for this message
Best Qi Shao (uqqshao) said :
#26

Hi Tope,

Sorry but I am not quite sure why you still have the ‘’Permission denied (publickey)" problem after you have successfully regestered your SSH key. I hope Dion or other users can answer this question for you.

However, I may be able to assist you with intalling ESyS-Particle from the source-code tarball. After extracting files from the downloaded tarball, proceed with the following procedures:

cd ESyS-Particle-2.3.5
sh autogen.sh
./configure CC=mpicc CXX=mpic++
make
sudo make install

7) Set up environment variables
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

[OPTIONALLY, append these 'export' lines to the end of ~/.bashrc]

8) run a test script e.g. bingle_output.py from the ESyS-Particle Tutorial
mpirun -np 2 esysparticle bingle_output.py

Cheers,
QI

Revision history for this message
Temitope (temitope) said :
#27

Thank you Qi. It worked!