CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] Prblems with pyFoamPVSnapshot-PATHS in OF-2.0.1 (https://www.cfd-online.com/Forums/openfoam-community-contributions/108162-prblems-pyfoampvsnapshot-paths-2-0-1-a.html)

wouter September 11, 2013 15:03

2 Attachment(s)
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

gschaider September 11, 2013 19:08

Quote:

Originally Posted by wouter (Post 451195)
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 (Post 451195)
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 (Post 451195)
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 (Post 451195)
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

wouter September 12, 2013 08:19

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

gschaider September 12, 2013 11:57

Quote:

Originally Posted by wouter (Post 451333)
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

wouter September 12, 2013 17:58

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)

gschaider September 12, 2013 18:44

1 Attachment(s)
Quote:

Originally Posted by wouter (Post 451413)
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

Attachment 25324

wouter September 12, 2013 18:58

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 September 13, 2013 12:32

1 Attachment(s)
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

gschaider September 16, 2013 16:18

Quote:

Originally Posted by wouter (Post 451571)
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 (Post 451571)
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?

wouter September 16, 2013 18:07

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

gschaider September 17, 2013 15:17

Quote:

Originally Posted by wouter (Post 452098)
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.


All times are GMT -4. The time now is 11:01.