yade on kubuntu 16.04

Asked by Klaus Thoeni

Hi,

I just installed Kubuntu 16.04 on a virtual machine. I then installed yade 1.20 from packages. When starting yade everything looks fine except some QSettings value, but this doesn't seem to have an influence:

yade@kubuntu:~/YADE/$ yade
Welcome to Yade 1.20.0
TCP python prompt on localhost:9000, auth cookie `secuas'
XMLRPC info provider on http://localhost:21000
QSettings::value: Empty key passed
QSettings::value: Empty key passed
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

Yade [1]:

However, when I try to launch yade with a script things are getting crazy and yade even crashes when doing some simple things in the command line:

elcome to Yade 1.20.0
TCP python prompt on localhost:9000, auth cookie `kdyuea'
XMLRPC info provider on http://localhost:21000
Running script simple-scene.py
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]
[0;34mYade [[1;34m1[0;34m]: [0mO.bodies
[0;34mYade [[1;34m1[0;34m]: [0m -> [1]: <yade.wrapper.BodyContainer at 0x7fe6ee669398>
len(O.bodies)
[0;34mYade [[1;34m2[0;34m]: [0m -> [2]: 2
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/bin/yade in <module>()
    289 import yade.qt
    290 qapp=QApplication(sys.argv)
--> 291 userSession(gui=gui,qapp=qapp)
    292
    293 if __name__ == "__main__":

/usr/bin/yade in userSession(gui, qapp)
    240 InteractiveShellEmbed.banner1=banner+'\n'
    241 ipshell=InteractiveShellEmbed()
--> 242 ipshell()
    243
    244 ## run userSession in a way corresponding to the features we use:

/usr/lib/python2.7/dist-packages/IPython/terminal/embed.pyc in __call__(self, header, local_ns, module, dummy, stack_depth, global_ns, compile_flags)
    151 # our call and get the original caller's namespaces.
    152 self.mainloop(local_ns, module, stack_depth=stack_depth,
--> 153 global_ns=global_ns, compile_flags=compile_flags)
    154
    155 self.banner2 = self.old_banner2

/usr/lib/python2.7/dist-packages/IPython/terminal/embed.pyc in mainloop(self, local_ns, module, stack_depth, display_banner, global_ns, compile_flags)
    243
    244 with self.builtin_trap, self.display_trap:
--> 245 self.interact(display_banner=display_banner)
    246
    247 # now, purge out the local namespace of IPython's hidden variables.

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in interact(self, display_banner)
    567 self.run_cell(source_raw, store_history=True)
    568 hlen_b4_cell = \
--> 569 self._replace_rlhist_multiline(source_raw, hlen_b4_cell)
    570
    571 # Turn off the exit flag, so the mainloop can be restarted if desired

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in _replace_rlhist_multiline(self, source_raw, hlen_before_cell)
    472
    473 for i in range(hlen - hlen_before_cell):
--> 474 self.readline.remove_history_item(hlen - i - 1)
    475 stdin_encoding = get_stream_enc(sys.stdin, 'utf-8')
    476 self.readline.add_history(py3compat.unicode_to_str(source_raw.rstrip(),

ValueError: No history item at position 2600

After that I compiled yade from sources (today's version). Here is my cmake output:

/home/yade/YADE/source-code/build> /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/home/yade/YADE/source-code/install -DCMAKE_BUILD_TYPE=Release /home/yade/YADE/source-code/trunk/
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
-- Found unsuitable Qt version "" from NOTFOUND
-- Version is set to 2016-07-01.git-d2c0216
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 and -save-temps
-- GCC Version >= 4.9. Adding -fstack-protector-strong
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- chrono
-- atomic
-- Boost_VERSION: 105800
-- Boost_LIB_VERSION: 1_58
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_python.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_iostreams.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_serialization.so/usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found Eigen3, version: 3.2.92
-- Disable vectorization
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GTS
-- Found GUI-Qt5-LIBS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- Could NOT find Cholmod (missing: CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY)
-- Could NOT find Metis (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Missing dependency for LINSOLV, disabled
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at your own risk!
-- Suffix is set to -2016-07-01.git-d2c0216
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/yade/YADE/source-code/install
Yade will be installed to /home/yade/YADE/source-code/install
-- Use system gts version
-- VTK version >5 is found
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW SPH GL2PS LBMFLOW
-- Disabled features: LINSOLV LIQMIGRATION MASK_ARBITRARY PROFILING PotentialParticles
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yade/YADE/source-code/build
*** Finished ***

There are some "warnings" about qmake, QT and vtk but compilation still works. When launching the compiled version I got an error about a missing python library: python-qtwebkit. In fact, installing python-pyqt5.qtwebkit solves that problem. I can now launch my own compiled version of yade. However, when launching it with a script I have the exact same behaviour as with the version installed form packages.

Anyone having similar problems? Any idea how this can be fixed?

Cheers
Klaus

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#1

Forgot to mention that I tried to run yade with a simple hello world script (e.g., print 'hello world') and the behaviour is the same. So I can exclude that the problem is the script.

Thanks,
Klaus

Revision history for this message
Anton Gladky (gladky-anton) said :
#2

Hi Klaus,

it looks there are some problems with Yade and 16.04. I will try to get 16.04 on virtual machine and fix the problem.

Anton

Revision history for this message
Henry (wenjiexu) said :
#3

I have also meet problem on Ubuntu16.04:

Welcome to Yade 2016-07-09.git-9003796
Traceback (most recent call last):
  File "/usr/local/bin/yade", line 129, in <module>
    import yade
  File "/usr/local/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /usr/local/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/libyade.so: undefined symbol: _ZN17vtkSampleFunction14SetModelBoundsEdddddd

Thanks !

Revision history for this message
Anton Gladky (gladky-anton) said :
#4

Hi guys,

I am travelling now and not able to fix it quickly. But it
looks like the problem is that Kubuntu AFAIK no more
"official" ubuntu release. It can also be that they use
slightly different QT-version, which can cause problems.

I will try to investigate and fix it as far as possible.

Cheers

Anton

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#5

Hi Anton,

I tried it on both Ubuntu and Kubuntu 16.04 using a virtual machine. The problem is exactly the same. Kubuntu is not supported by Canonical but it's still based on Ubuntu and should have the same packages/libraries. To me it looks like the problem is either related to QT or IPython.

I would appreciate feedback of other Ubuntu 16.04 users, if any.

Cheers
Klaus

Revision history for this message
James X (jaxie) said :
#6

Hello,

I was asked to respond to this question, as I also am using ubuntu 16.04 with Yade. I do not seem to have the problems described in this question. I'm not quite sure what script files are being used to test this, but for example, I can run the "hourglass.py" in the example folder "hourglass" without issue.

I should point out that, instead of compiling it myself from source code, I installed Yade using the set of instructions including the'sudo apt-get install yadedaily' line, and I run scripts using the 'yadedaily' command.

I hope this helps.

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#7

Hi James,

please can you run yade or yadedaily with a script (any script will do) and copy/paste the terminal output (the initial lineas when yade is loading including the first lines of the ipython terminal). Then run the script and try to use the terminal, e.g., check the number of bodies in the simulation by tying len(O.bodies). Check some more things from the terminal and let us know if you get the strange behaviour.

Cheers
Klaus

Revision history for this message
Henry (wenjiexu) said :
#8

Hello,
      The errors will occur when choosing "ENABLE_POTENTIAL_PARTICLES". And the errors as follows (Ubuntu16.04 QT5):

Welcome to Yade 2016-07-09.git-9003796
Traceback (most recent call last):
  File "/usr/local/bin/yade", line 129, in <module>
    import yade
  File "/usr/local/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /usr/local/lib/x86_64-linux-gnu/yade-2016-07-09.git-9003796/libyade.so: undefined symbol: _ZN17vtkSampleFunction14SetModelBoundsEdddddd

   However, if not select "ENABLE_POTENTIAL_PARTICLES", everything is ok.

Henry

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#9

Hi Henry,

this specific issue seems to be related to VTK. Nevertheless, I still think you should have the same problem as described above. Yade is just running fine but has a strange behaviour when running scripts and doing some operations in the ipython terminal. Please could you copy/paste the terminal output after you launch a script, start it and do some operations in the terminal? Maybe try as well to use the Inspector (click the "Inspect" button in the controller) because this should cause problems as well.

Cheers
Klaus

Revision history for this message
James X (jaxie) said :
#10

OK, so my prior message was just an example of me not understanding what yade was supposed to do (I wasn't aware that you could/should run commands in yade if you were running from a script file). I just assumed that script files were designed to be run and then exited/cancelled out of when they finished running.

for example, if I run "hourglass.py", I get the same error as originally described. Strangely enough, there seem to be seem terminal commands that work just fine. For example, when I type in "O.run()" and "O.bodies[0]", the simulation runs or I am told what O.bodies[0] is.

Below is the print out of what happens when I run yadedaily "hourglass.py", then first attempt to add "10+5", then attempt to run the simulation by typing "O.run()", then pausing it by typing "O.pause()", then multiplying "10 * int(5.5)", then finding what is returned when I type in "O.bodies[1]", and finally crashing the program by running "len(O.bodies)". I would try using the inspector, but I'm still very new to Yade and quite honestly have no idea what to do with it.

~/trunk-master/examples/hourglass$ yadedaily hourglass.py
Welcome to Yade 2016.06a-2-86aa164~xenial
TCP python prompt on localhost:9000, auth cookie `eukysd'
XMLRPC info provider on http://localhost:21000
Running script hourglass.py
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]
[0;34mYade [[1;34m1[0;34m]: [0m10+5
[0;34mYade [[1;34m1[0;34m]: [0m -> [1]: 15
O 2[0;34m]: [0mO.run()
[0;34mYade [[1;34m2[0;34m]: [0mO.pause()
[0;34mYade [[1;34m4[0;34m]: [0m10*int(5.5)
[0;34mYade [[1;34m4[0;34m]: [0m -> [4]: 50

[0;34mYade [[1;34m5[0;34m]: [0mO.bodies[1]
[0;34mYade [[1;34m5[0;34m]: [0m -> [5]: <Body instance at 0x3084be0>

[0;34mYade [[1;34m6[0;34m]: [0mlen(O.bodies)
[0;34mYade [[1;34m6[0;34m]: [0m -> [6]: 3500
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/bin/yadedaily in <module>()
    289 import yade.qt
    290 qapp=QApplication(sys.argv)
--> 291 userSession(gui=gui,qapp=qapp)
    292
    293 if __name__ == "__main__":

/usr/bin/yadedaily in userSession(gui, qapp)
    240 InteractiveShellEmbed.banner1=banner+'\n'
    241 ipshell=InteractiveShellEmbed()
--> 242 ipshell()
    243
    244 ## run userSession in a way corresponding to the features we use:

/usr/lib/python2.7/dist-packages/IPython/terminal/embed.pyc in __call__(self, header, local_ns, module, dummy, stack_depth, global_ns, compile_flags)
    151 # our call and get the original caller's namespaces.
    152 self.mainloop(local_ns, module, stack_depth=stack_depth,
--> 153 global_ns=global_ns, compile_flags=compile_flags)
    154
    155 self.banner2 = self.old_banner2

/usr/lib/python2.7/dist-packages/IPython/terminal/embed.pyc in mainloop(self, local_ns, module, stack_depth, display_banner, global_ns, compile_flags)
    243
    244 with self.builtin_trap, self.display_trap:
--> 245 self.interact(display_banner=display_banner)
    246
    247 # now, purge out the local namespace of IPython's hidden variables.

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in interact(self, display_banner)
    567 self.run_cell(source_raw, store_history=True)
    568 hlen_b4_cell = \
--> 569 self._replace_rlhist_multiline(source_raw, hlen_b4_cell)
    570
    571 # Turn off the exit flag, so the mainloop can be restarted if desired

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in _replace_rlhist_multiline(self, source_raw, hlen_before_cell)
    472
    473 for i in range(hlen - hlen_before_cell):
--> 474 self.readline.remove_history_item(hlen - i - 1)
    475 stdin_encoding = get_stream_enc(sys.stdin, 'utf-8')
    476 self.readline.add_history(py3compat.unicode_to_str(source_raw.rstrip(),

ValueError: No history item at position 2600

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#11

Hi James,

thanks for confirming. I just filed a bug report. Hopefully we will soon find out what the problem is.

Klaus

Revision history for this message
Launchpad Janitor (janitor) said :
#12

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Luc Scholt├Ęs (luc) said :
#13

Sorry to dig this one up but did you find how to solve this problem? I face similar issues working on ubuntu 16.04...

Luc

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#14

Hi Luc and others,

I just posted my work-around here:

https://bugs.launchpad.net/yade/+bug/1604266

HTH
Klaus