Running yade on Red Hat

Asked by Klaus Thoeni on 2012-02-16

Hi Guys,

I currently got access to a Red Hat cluster (Red Hat Enterprise Linux Server release 6.2 (Santiago)). I asked the admin to install all the libraries listed on our webpage under

https://yade-dem.org/doc/installation.html#prerequisities

I compiled the code and after fixing some includes everything looked good. However, I can't load or save simulations. Here the error yade gives me:

Yade [1]: O.load('01_netonly.xml.bz2')
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)

/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/__init__.pyc in <module>()
----> 1
      2
      3
      4
      5

RuntimeError: stream error

When running yade --test I got the following output:

geotech-r710-3-TMP: yade --test
Math: Matrix3 operations ... ok
Math: Quaternion operations ... ok
Math: Vector2 operations ... ok
Math: Vector3 operations ... ok
Core: correct types are instantiated ... ok
Core: dispatcher ctors with functors ... ok
Core: Attr::hidden ... ok
Core: InteractionLoop special ctor ... ok
Core: invalid attribute access raises AttributeError ... ok
Core: Attr::noSave ... ERROR
Core: ParallelEngine special ctor ... ok
Core: class ctor's attributes ... ok
Core: Attr::triggerPostLoad ... ok
Core: dispatcher and functor type mismatch is detected ... ok
Bodies: erased bodies are None in python ... ok
Bodies: Iterator silently skips erased ones ... ok
Bodies: Iteration ... ok
Bodies: len(O.bodies) ... ok
Bodies: Negative index counts backwards (like python sequences). ... ok
I/O: All classes can be saved and loaded with boost::serialization ... WARNING: cannot open files used for capillary law, all forces will be null. Instructions on how to download and install them is found here : https://yade-dem.org/wiki/CapillaryTriaxialTest.
FAIL
Loop: dead engines are not run ... ok
Loop: O.engines can be modified inside the loop transparently. ... ok
Loop: substepping ... ok
Material+State: CpmMat returns CpmState when asked for newAssocState ... ok
Material+State: throws when body has material and state that don't work together. ... ok
Material+State: throws when body has material but NULL state. ... ok
Material: find by index or label; KeyError raised for invalid label. ... ok
Material: iteration over O.materials ... ok
Material: len(O.materials) ... ok
Material: negative index counts backwards. ... ok
Material: shared_ptr's makes change in material immediate everywhere ... ok
Material: shared_ptr's are preserved when saving/loading ... ERROR
PBC: degenerate cell raises exception ... ok
PBC: homothetic cell deformation adjusts particle velocity ... ok
PBC: utils.kineticEnergy considers only fluctuation velocity, not the velocity gradient ... ok
PBC: L3Geom computes incident velocity correctly ... ok
PBC: ScGeom computes incident velocity correctly ... ok
PBC: setBox modifies hSize correctly ... ok
PBC: chaing trsf changes hSize0, but does not modify hSize ... ok
PBC: velGrad changes hSize but not hSize0, accumulates in trsf ... ok
Clump: ids and flags consistency ... ok
Clump: mass, centroid, intertia ... ok
Clump: velocities of member assigned by NewtonIntegrator ... ok
CohesiveChain: velocity/positions tested in transient dynamics and equilibrium state ... ok
Doctest: yade.eudoxos.IntrSmooth3d ... ok
Doctest: yade.pack.SpherePack_toSimulation ... ok
Doctest: yade.plot.addAutoData ... ok
Doctest: yade.plot.addData ... ok
Doctest: yade.plot.plot ... ok
Doctest: yade.plot.saveDataTxt ... ok
Doctest: yade.utils.SpherePWaveTimeStep ... ok
Doctest: yade.utils.saveVars ... /home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/utils.py:55: UserWarning: Overwriting yade.params.something which already exists.
  if mark in yade.params.__dict__: warnings.warn('Overwriting yade.params.%s which already exists.'%mark)
ok
Doctest: yade.utils.sphere ... ok
Doctest: yade.utils.typedEngine ... ok

======================================================================
ERROR: Core: Attr::noSave
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/wrapper.py", line 86, in testNoSave
    O.saveTmp(quiet=True)
RuntimeError: unregistered class

======================================================================
ERROR: Material: shared_ptr's are preserved when saving/loading
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/core.py", line 150, in testSharedAfterReload
    O.saveTmp(quiet=True); O.loadTmp(quiet=True)
RuntimeError: unregistered class

======================================================================
FAIL: I/O: All classes can be saved and loaded with boost::serialization
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/core.py", line 79, in testSaveAllClasses
    self.assert_(len(failed)==0,'Failed classes were: '+' '.join(failed))
AssertionError: Failed classes were: BoundaryController Collider Dem3DofGeom ElastMat FrictMat FrictPhys GenericSpheresContact IntrCallback MindlinPhys PeriodicEngine Recorder ScGeom Sphere TriaxialStressController

----------------------------------------------------------------------
Ran 54 tests in 65.778s

FAILED (failures=1, errors=2)
******************** SOME TESTS FAILED ********************
Yade: error exit.

Anyone knows what the problem could be? Maybe boost? On my local machines I am using boost version 1.42 and 1.46 whereas the Red Hat cluster uses 1.41. Well, the documentation tells us 1.35 or later. I have no idea. I would really appreciate if someone can tell me what's going wrong.

Thanks,
Klaus

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Klaus Thoeni
Solved:
2012-02-21
Last query:
2012-02-21
Last reply:
Klaus Thoeni (klaus.thoeni) said : #1

Any Red Hat user around? Can you save and load simulations? Yade is running
but I can't save or load simulations.

Does anyone have an idea where the problem could be?

Thanks,
Klaus

On Thu, 16 Feb 2012 03:25:45 PM you wrote:
> New question #187904 on Yade:
> https://answers.launchpad.net/yade/+question/187904
>
> Hi Guys,
>
> I currently got access to a Red Hat cluster (Red Hat Enterprise Linux
> Server release 6.2 (Santiago)). I asked the admin to install all the
> libraries listed on our webpage under
>
> https://yade-dem.org/doc/installation.html#prerequisities
>
> I compiled the code and after fixing some includes everything looked good.
> However, I can't load or save simulations. Here the error yade gives me:
>
> Yade [1]: O.load('01_netonly.xml.bz2')
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call last)
>
> /home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/__init__.pyc in
> <module>() ----> 1
> 2
> 3
> 4
> 5
>
> RuntimeError: stream error
>
>
> When running yade --test I got the following output:
>
> geotech-r710-3-TMP: yade --test
> Math: Matrix3 operations ... ok
> Math: Quaternion operations ... ok
> Math: Vector2 operations ... ok
> Math: Vector3 operations ... ok
> Core: correct types are instantiated ... ok
> Core: dispatcher ctors with functors ... ok
> Core: Attr::hidden ... ok
> Core: InteractionLoop special ctor ... ok
> Core: invalid attribute access raises AttributeError ... ok
> Core: Attr::noSave ... ERROR
> Core: ParallelEngine special ctor ... ok
> Core: class ctor's attributes ... ok
> Core: Attr::triggerPostLoad ... ok
> Core: dispatcher and functor type mismatch is detected ... ok
> Bodies: erased bodies are None in python ... ok
> Bodies: Iterator silently skips erased ones ... ok
> Bodies: Iteration ... ok
> Bodies: len(O.bodies) ... ok
> Bodies: Negative index counts backwards (like python sequences). ... ok
> I/O: All classes can be saved and loaded with boost::serialization ...
> WARNING: cannot open files used for capillary law, all forces will be
> null. Instructions on how to download and install them is found here :
> https://yade-dem.org/wiki/CapillaryTriaxialTest. FAIL
> Loop: dead engines are not run ... ok
> Loop: O.engines can be modified inside the loop transparently. ... ok
> Loop: substepping ... ok
> Material+State: CpmMat returns CpmState when asked for newAssocState ... ok
> Material+State: throws when body has material and state that don't work
> together. ... ok Material+State: throws when body has material but NULL
> state. ... ok Material: find by index or label; KeyError raised for
> invalid label. ... ok Material: iteration over O.materials ... ok
> Material: len(O.materials) ... ok
> Material: negative index counts backwards. ... ok
> Material: shared_ptr's makes change in material immediate everywhere ... ok
> Material: shared_ptr's are preserved when saving/loading ... ERROR
> PBC: degenerate cell raises exception ... ok
> PBC: homothetic cell deformation adjusts particle velocity ... ok
> PBC: utils.kineticEnergy considers only fluctuation velocity, not the
> velocity gradient ... ok PBC: L3Geom computes incident velocity correctly
> ... ok
> PBC: ScGeom computes incident velocity correctly ... ok
> PBC: setBox modifies hSize correctly ... ok
> PBC: chaing trsf changes hSize0, but does not modify hSize ... ok
> PBC: velGrad changes hSize but not hSize0, accumulates in trsf ... ok
> Clump: ids and flags consistency ... ok
> Clump: mass, centroid, intertia ... ok
> Clump: velocities of member assigned by NewtonIntegrator ... ok
> CohesiveChain: velocity/positions tested in transient dynamics and
> equilibrium state ... ok Doctest: yade.eudoxos.IntrSmooth3d ... ok
> Doctest: yade.pack.SpherePack_toSimulation ... ok
> Doctest: yade.plot.addAutoData ... ok
> Doctest: yade.plot.addData ... ok
> Doctest: yade.plot.plot ... ok
> Doctest: yade.plot.saveDataTxt ... ok
> Doctest: yade.utils.SpherePWaveTimeStep ... ok
> Doctest: yade.utils.saveVars ...
> /home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/utils.py:55:
> UserWarning: Overwriting yade.params.something which already exists. if
> mark in yade.params.__dict__: warnings.warn('Overwriting yade.params.%s
> which already exists.'%mark) ok
> Doctest: yade.utils.sphere ... ok
> Doctest: yade.utils.typedEngine ... ok
>
> ======================================================================
> ERROR: Core: Attr::noSave
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/wrapper.py",
> line 86, in testNoSave O.saveTmp(quiet=True)
> RuntimeError: unregistered class
>
> ======================================================================
> ERROR: Material: shared_ptr's are preserved when saving/loading
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/core.py",
> line 150, in testSharedAfterReload O.saveTmp(quiet=True);
> O.loadTmp(quiet=True)
> RuntimeError: unregistered class
>
> ======================================================================
> FAIL: I/O: All classes can be saved and loaded with boost::serialization
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/kt748/YADE-bzr/install/lib/yade-bzr2999/py/yade/tests/core.py",
> line 79, in testSaveAllClasses self.assert_(len(failed)==0,'Failed classes
> were: '+' '.join(failed)) AssertionError: Failed classes were:
> BoundaryController Collider Dem3DofGeom ElastMat FrictMat FrictPhys
> GenericSpheresContact IntrCallback MindlinPhys PeriodicEngine Recorder
> ScGeom Sphere TriaxialStressController
>
> ----------------------------------------------------------------------
> Ran 54 tests in 65.778s
>
> FAILED (failures=1, errors=2)
> ******************** SOME TESTS FAILED ********************
> Yade: error exit.
>
> Anyone knows what the problem could be? Maybe boost? On my local machines I
> am using boost version 1.42 and 1.46 whereas the Red Hat cluster uses
> 1.41. Well, the documentation tells us 1.35 or later. I have no idea. I
> would really appreciate if someone can tell me what's going wrong.
>
> Thanks,
> Klaus

Klaus Thoeni (klaus.thoeni) said : #2

Ok, the problem was indeed the version of boost.

I currently downloaded the sources of boost 1.46.1 (since that's the version I am using on my ubuntu machine) from

http://www.boost.org/doc/libs/1_46_1/more/getting_started/unix-variants.html

and compiled/installed it into /usr/local.

After adding LIBPATH ='/usr/local/boost_1_46_1/stage/lib' and CPPPATH = '/usr/local/boost_1_46_1' to my scons.profile I could compile yade. However, before launching I still had to specify the path to the new dynamic libraries with

export LD_LIBRARY_PATH=/usr/local/boost_1_46_1/stage/lib

or for permanent use by adding it to my .bashrc.

That's it, saving and loading is working now.

Klaus