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

How to get Python Shell into ParaView 3.8.1?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By blaise

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2011, 11:06
Default How to get Python Shell into ParaView 3.8.1?
  #1
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hi all,

I managed to install all ThirdParty thingies coming with OF 1.6-ext using the new rpm based installation scripts. ParaView 3.8.1 runs, but I have no Python Shell built into it, and very likely no MPI for parallel processing too. I need both. I tried to find a solution and read a lot of related pages, but did not find a suitable answer.

So I changed these two lines in the rpmBuild/SPECS/ParaView-3.8.1.spec file for ParaView to:

%{!?_withMPI: %define _withMPI true}
%{!?_withPython: %define _withPython true}

and started the compilation again (both were defined "false" before), but this did not change anything. Then I inserted the compilation options for python and mpi directly into the AllMake.stage4 script:

------- snippet ------------
rpm_make -p ParaView-3.8.1 -s ParaView-3.8.1.spec -u ...paraview.org/.../ParaView-3.8.1.tar.gz -a --define='_qmakePath $QT_BIN_DIR/qmake _withPython=true _withMPI=true'
--------------------------------

Now these options show up in the output of AllMake.stage4 (maybe this was a little bit over the top, but now the options turn up both in the "Additional flags" line and in the optional args):

------------ snippet ------------
Additional flags : --define=_qmakePath $QT_BIN_DIR/qmake _withPython=true _withMPI=true
Updating the ThirdParty environment variables before building package ParaView-3.8.1
Making package ParaView-3.8.1 using RPM.
Building package ParaView-3.8.1 using SPEC file : ParaView-3.8.1.spec. Optional args: --define=_qmakePath $QT_BIN_DIR/qmake _withPython=true _withMPI=true
------------------------------

The compilation runs fine, ParaView can be started, but still no Python Shell integrated!

How can I get the Python Shell into ParaView 3.8.1??????

By the way: Will Paraview-3.10.0 work too?

I am doing this on a CentOS 5.3 system, freshly compiled gcc-4.4.5, and I have installed all the packages from Allwmake.stage3 (but zoltan).

Any hint is warmly welcomed!

Cheers,

Pascal.

----------

Edit:

Just found out that I had to insert
PARAVIEW_ENABLE_PYTHON=true
into Allwmake.stage4 (rpm_make call). To be on the safe side I inserted

addCMakeVariable PARAVIEW_ENABLE_PYTHON:BOOL=ON

into the spec file. Now the Python Shell is there and seems to work. I will find out which setting does the trick. Tomorrow I will try to do the same for MPI support, if necessary. Anyway, the spec file doesn't seem to work as it should, if this kind of hacking is required. Did anybody else experience these problems?

Cheers,

Pascal.

Last edited by blaise; August 22, 2011 at 11:30. Reason: Partially solved
blaise is offline   Reply With Quote

Old   August 23, 2011, 06:23
Default Solved
  #2
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hi all, myself ;-)

ok, I found out that I have to insert these two lines in the ParaView rpm spec file (ThirdParty-1.6-ext/rpmBuild/SPECS/ParaView-3.8.1.spec, just where the other cmake variables are added):

addCMakeVariable PARAVIEW_ENABLE_PYTHON:BOOL=ON
addCMakeVariable PARAVIEW_USE_MPI:BOOL=ON

With this, the Python Shell and MPI support gets built in when compiling. Just using the "true" flag in the cmake compiling options doesn't seem to help.

Cheers,

Pascal.
elvis and rialzuga like this.
blaise is offline   Reply With Quote

Old   July 24, 2012, 04:29
Default
  #3
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 16
flowris is on a distinguished road
Hi Blaise,

Does this also work for Paraview-3.12? I added the cmake variables, deleted the folder ThirdParty/packages/ParaView-3.12.0/ and ran ./Allmake again from within ThirdParty, but the Tools > Python Shell is still not available.

Any tips?
flowris is offline   Reply With Quote

Old   July 24, 2012, 05:58
Default
  #4
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 flowris View Post
Hi Blaise,

Does this also work for Paraview-3.12? I added the cmake variables, deleted the folder ThirdParty/packages/ParaView-3.12.0/ and ran ./Allmake again from within ThirdParty, but the Tools > Python Shell is still not available.

Any tips?
Haven't used it in a long time, but I think the Allwmake regenerates the CMake-files. There is a specialized Script for generating CMake and compiling paraview (look for it. The name is a strong hint) and that has an option that adds Python
gschaider is offline   Reply With Quote

Reply


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
[OpenFOAM] Open simulated case/geometry at Paraview 3.8.1 Gitesh P ParaView 0 June 20, 2011 07:21
OF 1.7.0 & paraView 3.8.1 (paraFoam) maysmech OpenFOAM 8 November 3, 2010 02:10
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
ParaView 33 Python Shell error and fix mschoenberg OpenFOAM Bugs 1 August 21, 2008 05:43
[OpenFOAM] ParaView 33 Python Shell error mschoenberg ParaView 2 August 20, 2008 11:42


All times are GMT -4. The time now is 13:22.