CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[PyFoam] Prblems with pyFoamPVSnapshot-PATHS in OF-2.0.1

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2013, 15:03
Default
  #21
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Dear gschaider,

Yesterday I tried things and tonight I continued.
first test
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ paraview --state=testje.pvsm
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action 
.
.
.
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action 
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
The picture was visible in paraview as it was when making the .pvsm file. So no problem with paraview 3.12 only warnings.

Second test with OF221 debian binary and paraviewopenfoam debian binary
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.1/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=5 .
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamPVSnapshot.py", line 3, in <module>
    from PyFoam.Applications.PVSnapshot import PVSnapshot
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PVSnapshot.py", line 13, in <module>
    from PyFoam.Paraview.ServermanagerWrapper import ServermanagerWrapper as SM
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Paraview/__init__.py", line 15, in <module>
    from paraview import servermanager
  File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/servermanager.py", line 43, in <module>
    import paraview, re, os, os.path, new, sys, vtk
  File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/vtk/__init__.py", line 1, in <module>
    from vtkCommonPython import *
ImportError: No module named vtkCommonPython
not compiled with python support so no go.

Back to OF22x
from paraView see picture (it works)
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pvpython
Python 2.7.4 (default, Jul  5 2013, 08:24:51) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
paraview version 3.12.0, Date: 2011-07-26
>>> servermanager.LoadState("./testje.pvsm")
>>> SetActiveView(GetRenderView())
>>> Render()
<paraview.servermanager.RenderView object at 0x7fae9f56dfd0>
I got a picture Visualization Toolkit OpenGL

The next core dump I missed the cause of and I cannot reproduce it, but maybe it helps
Code:
XIO:  fatal IO error 0 (Success) on X server ":0"
      after 85 requests (85 known processed) with 6 events remaining.
*** Error in `/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/pvpython': double free or corruption (!prev): 0x0000000002d92d10 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x80a46)[0x7fae9d5daa46]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN18vtkSIProxyPropertyD1Ev+0x78)[0x7fae9cb86c28]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN18vtkSIProxyPropertyD0Ev+0x9)[0x7fae9cb86cc9]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZNSt8_Rb_treeISsSt4pairIKSs15vtkSmartPointerI13vtkSIPropertyEESt10_Select1stIS5_ESt4lessISsESaIS5_EE8_M_eraseEPSt13_Rb_tree_nodeIS5_E+0x36c)[0x7fae9cb7a48c]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN10vtkSIProxyD1Ev+0x3f)[0x7fae9cb778bf]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN16vtkSISourceProxyD0Ev+0x9)[0x7fae9cb8cff9]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN16vtkPVSessionCoreD1Ev+0x1be)[0x7fae9cb6609e]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN16vtkPVSessionCoreD0Ev+0x9)[0x7fae9cb66159]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN16vtkPVSessionBaseD1Ev+0x3f)[0x7fae9cb61d4f]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerManager.so(_ZN12vtkSMSessionD0Ev+0x9)[0x7fae9efdaa29]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVClientServerCore.so(_ZNSt8_Rb_treeIxSt4pairIKx15vtkSmartPointerI10vtkSessionEESt10_Select1stIS5_ESt4lessIxESaIS5_EE8_M_eraseEPSt13_Rb_tree_nodeIS5_E+0x207)[0x7fae9ec41c17]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVClientServerCore.so(_ZN16vtkProcessModuleD2Ev+0x80)[0x7fae9ec411b0]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVClientServerCore.so(_ZN16vtkProcessModuleD0Ev+0x9)[0x7fae9ec41219]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7fae9d59652a]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVClientServerCore.so(+0x925f3)[0x7fae9ebca5f3]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:06 10098096                           /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/pvpython
00602000-00603000 r--p 00002000 08:06 10098096                           /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/pvpython
00603000-00604000 rw-p 00003000 08:06 10098096                           /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/pvpython
014a4000-03826000 rw-p 00000000 00:00 0                                  [heap]
7fae77f8e000-7fae77fae000 rw-s 12b42c000 00:05 11642                     /dev/dri/card0
7fae77fae000-7fae789ae000 rwxp 00000000 00:00 0 
7fae789ae000-7fae78a2e000 rw-s 1156ea000 00:05 11642                     /dev/dri/card0
7fae78a2e000-7fae78eb4000 rw-p 00000000 00:00 0 
7fae78eb4000-7fae78f34000 rw-s 115165000 00:05 11642                     /dev/dri/card0
7fae78f34000-7fae78f66000 r-xp 00000000 08:06 2368350                    /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7fae78f66000-7fae79165000 ---p 00032000 08:06 2368350                    /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7fae79165000-7fae79166000 r--p 00031000 08:06 2368350                    /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7fae79166000-7fae79167000 rw-p 00032000 08:06 2368350                    /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7fae79167000-7fae7a581000 r-xp 00000000 08:06 2367484                    /usr/lib/x86_64-linux-gnu/libLLVM-3.2.so.1
7fae7a581000-7fae7a780000 ---p 0141a000 08:06 2367484                    /usr/lib/x86_64-linux-gnu/libLLVM-3.2.so.1
7fae7a780000-7fae7a87b000 r--p 01419000 08:06 2367484                    /usr/lib/x86_64-linux-gnu/libLLVM-3.2.so.1
7fae7a87b000-7fae7a881000 rw-p 01514000 08:06 2367484                    /usr/lib/x86_64-linux-gnu/libLLVM-3.2.so.1
7fae7a881000-7fae7a88f000 rw-p 00000000 00:00 0 
7fae7a88f000-7fae7a894000 r-xp 00000000 08:06 2367760                    /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7fae7a894000-7fae7aa93000 ---p 00005000 08:06 2367760                    /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7fae7aa93000-7fae7aa94000 r--p 00004000 08:06 2367760                    /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7fae7aa94000-7fae7aa95000 rw-p 00005000 08:06 2367760                    /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7fae7aa95000-7fae7ac99000 r-xp 00000000 08:06 2363811                    /usr/lib/x86_64-linux-gnu/libgallium.so.0.0.0
7fae7ac99000-7fae7ae99000 ---p 00204000 08:06 2363811                    /usr/lib/x86_64-linux-gnu/libgallium.so.0.0.0
7fae7ae99000-7fae7aea8000 r--p 00204000 08:06 2363811                    /usr/lib/x86_64-linux-gnu/libgallium.so.0.0.0
7fae7aea8000-7fae7aeac000 rw-p 00213000 08:06 2363811                    /usr/lib/x86_64-linux-gnu/libgallium.so.0.0.0
7fae7aeac000-7fae7b074000 rw-p 00000000 00:00 0 
7fae7b074000-7fae7b412000 r-xp 00000000 08:06 2363812                    /usr/lib/x86_64-linux-gnu/libdricore9.1.4.so.1.0.0
7fae7b412000-7fae7b612000 ---p 0039e000 08:06 2363812                    /usr/lib/x86_64-linux-gnu/libdricore9.1.4.so.1.0.0
7fae7b612000-7fae7b623000 r--p 0039e000 08:06 2363812                    /usr/lib/x86_64-linux-gnu/libdricore9.1.4.so.1.0.0
7fae7b623000-7fae7b62d000 rw-p 003af000 08:06 2363812                    /usr/lib/x86_64-linux-gnu/libdricore9.1.4.so.1.0.0
7fae7b62d000-7fae7b644000 rw-p 00000000 00:00 0 
7fae7b644000-7fae7b787000 r-xp 00000000 08:06 2622187                    /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
7fae7b787000-7fae7b986000 ---p 00143000 08:06 2622187                    /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
7fae7b986000-7fae7b989000 r--p 00142000 08:06 2622187                    /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
7fae7b989000-7fae7b98c000 rw-p 00145000 08:06 2622187                    /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
7fae7b98c000-7fae7b98e000 rw-p 00000000 00:00 0 
7fae7b98e000-7fae7b9bd000 r-xp 00000000 08:06 11673993                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/liblagrangian.so
7fae7b9bd000-7fae7bbbc000 ---p 0002f000 08:06 11673993                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/liblagrangian.so
7fae7bbbc000-7fae7bbbe000 r--p 0002e000 08:06 11673993                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/liblagrangian.so
7fae7bbbe000-7fae7bbbf000 rw-p 00030000 08:06 11673993                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/liblagrangian.so
7fae7bbbf000-7fae7bbc0000 rw-p 00000000 00:00 0 
7fae7bbc0000-7fae7bcdb000 r-xp 00000000 08:06 11673995                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libgenericPatchFields.so
7fae7bcdb000-7fae7bedb000 ---p 0011b000 08:06 11673995                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libgenericPatchFields.so
7fae7bedb000-7fae7bedf000 r--p 0011b000 08:06 11673995                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libgenericPatchFields.so
7fae7bedf000-7fae7bee4000 rw-p 0011f000 08:06 11673995                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libgenericPatchFields.so
7fae7bee4000-7fae7c098000 r-xp 00000000 08:06 11672144                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libvtkPV3Foam.so
7fae7c098000-7fae7c297000 ---p 001b4000 08:06 11672144                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libvtkPV3Foam.so
7fae7c297000-7fae7c29b000 r--p 001b3000 08:06 11672144                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libvtkPV3Foam.so
7fae7c29b000-7fae7c2a3000 rw-p 001b7000 08:06 11672144                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/libvtkPV3Foam.so
7fae7c2a3000-7fae7c2ca000 r-xp 00000000 08:06 21239773                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12/libPV3FoamReader_SM.so
7fae7c2ca000-7fae7c4ca000 ---p 00027000 08:06 21239773                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12/libPV3FoamReader_SM.so
7fae7c4ca000-7fae7c4cb000 r--p 00027000 08:06 21239773                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12/libPV3FoamReader_SM.so
7fae7c4cb000-7fae7c4cc000 rw-p 00028000 08:06 21239773                   /home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12/libPV3FoamReader_SM.so
7fae7c4cc000-7fae7c63e000 r-xp 00000000 08:06 9310148                    /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/openmpi-1.6.3/lib64/libmpi.so.1.0.6
7fae7c63e000-7fae7c83e000 ---p 00172000 08:06 9310148                    /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/openmpi-1.6.3/lib64/libmpi.so.1.0.6
7fae7c83e000-7fae7c843000 r--p 00172000 08:06 9310148                    /home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/openmpi-1.6.3/lib64/libmpi.so.1.0.6Aborted (core dumped)
to be sure I tried pyFoamPVSnapshot.py again:
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=1 .
 Warning in /usr/local/bin/pyFoamPVSnapshot.py : This utilitiy currently does not work with OF>=1.6 because the API in Paraview>=3.6 has changed. But we'll try 
ERROR: In /home/wouter/OpenFOAM/ThirdParty-2.2.x/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx, line 324
vtkPVSessionCore (0x1944f60): Attempt to assign existing ID 1.
while processing
Message 0 = Assign
  Argument 0 = id_value {1}
  Argument 1 = vtk_object_pointer {vtkPVSessionCoreInterpreterHelper (0x38cf130)}


ERROR: In /home/wouter/OpenFOAM/ThirdParty-2.2.x/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx, line 325
vtkPVSessionCore (0x1944f60): Aborting execution for debugging purposes.

Aborted (core dumped)
maybe this caused the previous coredump, but it is before the command.

Is there an easy way to use the system paraview3.98-python with openfoam 2.2.x? My attempt to build paraview3.98 and use it in openfoam failed because of missing headerfiles or headerfiles in the wrong places.
any help is appreciated.
best regards
wouter
Attached Images
File Type: jpg Screenshot from 2013-09-11 19:24:44.jpg (44.2 KB, 7 views)
File Type: jpg Screenshot from 2013-09-11 19:26:57.jpg (37.3 KB, 5 views)
wouter is offline   Reply With Quote

Old   September 11, 2013, 19:08
Default
  #22
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wouter View Post
Dear gschaider,

Yesterday I tried things and tonight I continued.
first test
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ paraview --state=testje.pvsm
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action 
.
.
.
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action 
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
The picture was visible in paraview as it was when making the .pvsm file. So no problem with paraview 3.12 only warnings.
Pitty. That would have solved the problem ... for me
Quote:
Originally Posted by wouter View Post
Second test with OF221 debian binary and paraviewopenfoam debian binary
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.1/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=5 .
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamPVSnapshot.py", line 3, in <module>
    from PyFoam.Applications.PVSnapshot import PVSnapshot
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PVSnapshot.py", line 13, in <module>
    from PyFoam.Paraview.ServermanagerWrapper import ServermanagerWrapper as SM
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Paraview/__init__.py", line 15, in <module>
    from paraview import servermanager
  File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/servermanager.py", line 43, in <module>
    import paraview, re, os, os.path, new, sys, vtk
  File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/vtk/__init__.py", line 1, in <module>
    from vtkCommonPython import *
ImportError: No module named vtkCommonPython
not compiled with python support so no go.
Or the library files in the PYTHONPATH. Only good way to check for Python-support is in the GUI: if no Python-Shell or Programmable-Filter in the menus then there is no Python-support
Quote:
Originally Posted by wouter View Post
Back to OF22x
from paraView see picture (it works)
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pvpython
Python 2.7.4 (default, Jul  5 2013, 08:24:51) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
paraview version 3.12.0, Date: 2011-07-26
>>> servermanager.LoadState("./testje.pvsm")
>>> SetActiveView(GetRenderView())
>>> Render()
<paraview.servermanager.RenderView object at 0x7fae9f56dfd0>
I got a picture Visualization Toolkit OpenGL

The next core dump I missed the cause of and I cannot reproduce it, but maybe it helps
Code:
XIO:  fatal IO error 0 (Success) on X server ":0"
      after 85 requests (85 known processed) with 6 events remaining.
*** Error in `/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/pvpython': double free or corruption (!prev): 0x0000000002d92d10 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x80a46)[0x7fae9d5daa46]
/home/wouter/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12/libvtkPVServerImplementation.so(_ZN18vtkSIProxyPropertyD1Ev+0x78)[0x7fae9cb86c28]

....
I'm afraid without intimate knowledge of the VTK/Paraview sources this is quite hard to interpret. But would be good to know which command caused it
Quote:
Originally Posted by wouter View Post
to be sure I tried pyFoamPVSnapshot.py again:
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=1 .
 Warning in /usr/local/bin/pyFoamPVSnapshot.py : This utilitiy currently does not work with OF>=1.6 because the API in Paraview>=3.6 has changed. But we'll try 
ERROR: In /home/wouter/OpenFOAM/ThirdParty-2.2.x/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx, line 324
vtkPVSessionCore (0x1944f60): Attempt to assign existing ID 1.
while processing
Message 0 = Assign
  Argument 0 = id_value {1}
  Argument 1 = vtk_object_pointer {vtkPVSessionCoreInterpreterHelper (0x38cf130)}


ERROR: In /home/wouter/OpenFOAM/ThirdParty-2.2.x/ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx, line 325
vtkPVSessionCore (0x1944f60): Aborting execution for debugging purposes.

Aborted (core dumped)
maybe this caused the previous coredump, but it is before the command.

Is there an easy way to use the system paraview3.98-python with openfoam 2.2.x? My attempt to build paraview3.98 and use it in openfoam failed because of missing headerfiles or headerfiles in the wrong places.
any help is appreciated.
best regards
wouter
Using it with the built-in reader is always possible. I' only had a quick look at compiling the OF-Reader. I'm afraid fixing it won't be trivial because 3.98 is practically the Beta for 4.0 where parts of the API are changing

If you still want to find the problem in pyFoam then the next thing would be to sprinkle the code with print-statements to see which call breaks everything (as the PV-libraries cause a core-dump there is no stack-trace).

One candidate would be before and after
Code:
sm.LoadState(newState)
in PVSnapshot.py to see if this is the problem
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 12, 2013, 08:19
Default
  #23
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello gschaider,
Thanks again for your commitment to pyFoam. I will try to follow the program and see where the interface has problems. It will take a while because my python knowledge is minimal.
Best regards
wouter
wouter is offline   Reply With Quote

Old   September 12, 2013, 11:57
Default
  #24
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wouter View Post
Hello gschaider,
Thanks again for your commitment to pyFoam. I will try to follow the program and see where the interface has problems. It will take a while because my python knowledge is minimal.
Best regards
wouter
Just add something like
Code:
print "I'm before ReadState"
before ReadState (and similar after). The only important thing is that the number of spaces before the print has to be the same as the command (indentation is Pyhons {} )

Sorry to offload debugging to you but it'd take me to long to reproduce the environment you have
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 12, 2013, 17:58
Default
  #25
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello gschaider,
As I wrote, my knoledge of Python is minimal. Can you tell me where I can find the module PVSnapshot.py that is called, or do I have to "compile" with setup.py
best regards
wouter
edit:
I found it in usr/local/lib/python2.7/dist-packages/PyFoam/Applications.
I also found that it goes wrong at calling SM(PV3FoamReader)
wouter is offline   Reply With Quote

Old   September 12, 2013, 18:44
Default
  #26
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wouter View Post
Hello gschaider,
As I wrote, my knoledge of Python is minimal. Can you tell me where I can find the module PVSnapshot.py that is called, or do I have to "compile" with setup.py
best regards
wouter
edit:
I found it in usr/local/lib/python2.7/dist-packages/PyFoam/Applications.
I also found that it goes wrong at calling SM(PV3FoamReader)
That would be the ServerManagerWrapper.py (that file is used to work around different versions of Paraview. I was hoping that the problem is not there). Anyway. Discovered that in fact I worked on that file recently to make it work with 3.98 (probably I forgot it because I was just fixing it to get the real work done). Anyway. Could you use the uploaded version (had to zip it because the Forum doesn't accept Python-files) and the one you have with it. If that doesn't fix it (and I'm afraid it won't) I'll have to ask you to put in prints again to find out which command triggers the problem

ServermanagerWrapper.py.gz
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 12, 2013, 18:58
Default
  #27
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello gschaider,
what do I do with this file? I cannot find this file on my system and I do know to little of python to know where to put this file.
Regards
Wouter
Edit: found it (typo in find). It is the same as you sent me (diff gave only header difference) so I go on with print and report back, but not tonight anymore.
wouter is offline   Reply With Quote

Old   September 13, 2013, 12:32
Default
  #28
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello gschaider,
succes.
Code:
        print "in __init__ ServermanagerWrapper.py" #added by wouter
        try:
            #removed by wouter self.con=self.module().Connect()
            self.con=None  #added by wouter
        except RuntimeError:
            # 3.98 doesn't seem to need this naymore
            self.con=None
Gives me the nice picture attached.
Thank you for the patience

Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=2 . >log.PVSS
 PyFoam WARNING on line 68 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Paraview/ServermanagerWrapper.py : Could not find libPV3FoamReader.so in ['/home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib', '/home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12'] 
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
This is not of consequence? The program generates the picture.

edit2:
in ServermanagerWrapper.py I replaced libPV3FoamReader.so into libvtkPV3Reader.so and the error message disappeared except for the Inconsistency. Still I get the pictures I want. I get the last error or warning also if I use paraview.

Best regards
wouter
Attached Images
File Type: jpg Snapshot_testje_00000_t=5.jpg (12.2 KB, 3 views)

Last edited by wouter; September 14, 2013 at 19:43.
wouter is offline   Reply With Quote

Old   September 16, 2013, 16:18
Default
  #29
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wouter View Post
Hello gschaider,
succes.
Code:
        print "in __init__ ServermanagerWrapper.py" #added by wouter
        try:
            #removed by wouter self.con=self.module().Connect()
            self.con=None  #added by wouter
        except RuntimeError:
            # 3.98 doesn't seem to need this naymore
            self.con=None
Gives me the nice picture attached.
Thank you for the patience
So the failure happened exactly at the connect line? Which is a bummer. Because that is exactly what the try should work around: "If it fails on Python-level set to None and continue". But if it fails one level deeper it is har to do anything.
Quote:
Originally Posted by wouter View Post
Code:
wouter@wouter-desktop:~/OpenFOAM/wouter-2.2.x/run/projects/testje$ pyFoamPVSnapshot.py --state=testje.pvsm --time=2 . >log.PVSS
 PyFoam WARNING on line 68 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Paraview/ServermanagerWrapper.py : Could not find libPV3FoamReader.so in ['/home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib', '/home/wouter/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/lib/paraview-3.12'] 
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
This is not of consequence? The program generates the picture.

edit2:
in ServermanagerWrapper.py I replaced libPV3FoamReader.so into libvtkPV3Reader.so and the error message disappeared except for the Inconsistency. Still I get the pictures I want. I get the last error or warning also if I use paraview.
But that is still with you fix above (comment out Connect) in place?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 16, 2013, 18:07
Default
  #30
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello gschaider,
The 'fix' was still in place. Because of the fix the program worked but there was still an error. I looked for it and found that the library called was not available and I replaced it with one that was available in PV3FoamReader directory.
The last error has something to do with my Thirdparty paraview, because if I only use paraview this error occures, not with paraFoam and not with /usr/bin/paraview. I tried to rebuild it but the error remained.

Best Regards
Wouter
wouter is offline   Reply With Quote

Old   September 17, 2013, 15:17
Default
  #31
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wouter View Post
Hello gschaider,
The 'fix' was still in place. Because of the fix the program worked but there was still an error. I looked for it and found that the library called was not available and I replaced it with one that was available in PV3FoamReader directory.
The last error has something to do with my Thirdparty paraview, because if I only use paraview this error occures, not with paraFoam and not with /usr/bin/paraview. I tried to rebuild it but the error remained.

Best Regards
Wouter
Thanks for the clarification. I'll have to see what to do about he fix. Because leaving out the Connect (or removing the whole try/except-business) will disable old versions of Paraview while it seems to crash new ones.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[PyFoam] Problem with pyFoamPVSnapshot Pavel Rodin OpenFOAM Community Contributions 7 September 27, 2017 07:30
Using a solver of OF 2.0.1 in OF 3.0.x ??? StefanW OpenFOAM Programming & Development 2 June 14, 2016 06:24
SpalartAllmaras wall function in OpenFOAM 2.0.1 moser_r OpenFOAM Running, Solving & CFD 4 September 18, 2013 18:37
Paths confusion in python scripts praveen SU2 Installation 9 March 3, 2013 08:51
Same SimpleFOAM Case converges with openFOAM 2.1 but diverges with openFOAM 2.0.1 alsdia OpenFOAM Running, Solving & CFD 3 October 22, 2012 12:25


All times are GMT -4. The time now is 12:56.