[Paraview] Unable to compile with Python enabled

2014-10-15 Thread Chris Bording

Hi,
  Okay spent a couple days experimenting with building Paraview-4.1 and 
4.2. on our local GPU-cluster it is The SGI supercomputer comprises 96 
nodes, each containing two 6-core Intel Xeon X5650 CPUs, an NVIDIA Tesla 
C2075 GPU and 72 GB RAM, resulting in a system containing 1152 cores and 
96 GPUs.


I keep hitting the build.make errors when I set
-DPARAVIEW_ENABLE_PYTHON:BOOL=ON
-DUSE_SYSTEM_python:BOOL=ON
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_DIR/bin/python
-DPYTHON_LIBRARY:FILEPATH=$PYTHONPATH
-DPYTHON_INCLUDE_DIR:PATH=$PYTHON_DIR/include/python$PYTHON_LIB_VERSION

The error

make[2]: Entering directory 
`/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build'
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:127: 
*** target pattern contains no `%'.  Stop.


if I go to the 
VTK/Utilities/PythonInterpreter/CmakeFiles/vtkPythonInterpreter.dir


[cbording@login2 PythonInterpreter]$ cd CMakeFiles/
[cbording@login2 CMakeFiles]$ ls
CMakeDirectoryInformation.cmake  progress.marks 
 vtkPythonInterpreter.cmake  vtkPythonInterpreter.dir

[cbording@login2 CMakeFiles]$ cd vtkPythonInterpreter.dir/
[cbording@login2 vtkPythonInterpreter.dir]$ ls
build.make  cmake_clean.cmake  DependInfo.cmake  depend.make  flags.make 
 Labels.txt  link.txt  progress.make

[cbording@login2 vtkPythonInterpreter.dir]$ pwd
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir

so build.make is there and offending line is in RED

# Object files for target vtkPythonInterpreter
vtkPythonInterpreter_OBJECTS = \
"CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o" \
"CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInteractiveInterpreter.cxx.o"

# External object files for target vtkPythonInterpreter
vtkPythonInterpreter_EXTERNAL_OBJECTS =

lib/libvtkPythonInterpreter-pv4.1.so.1: 
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o
lib/libvtkPythonInterpreter-pv4.1.so.1: 
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInteractiveInterpreter.cxx.o
lib/libvtkPythonInterpreter-pv4.1.so.1: 
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make

lib/libvtkPythonInterpreter-pv4.1.so.1: lib/libvtkCommonCore-pv4.1.so.1
lib/libvtkPythonInterpreter-pv4.1.so.1: 
/ivec/apps/gcc/4.4.7/python/2.6.9/lib/python2.6/site-packages:/ivec/python/lib/python2.6/site-packages

lib/libvtkPythonInterpreter-pv4.1.so.1: lib/libvtksys-pv4.1.so.1
lib/libvtkPythonInterpreter-pv4.1.so.1: 
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold 
"Linking CXX shared library ../../../lib/libvtkPythonInterpreter-pv4.1.so"
cd 
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Utilities/PythonInterpreter 
&& $(CMAKE_COMMAND) -E cmake_link_script 
CMakeFiles/vtkPythonInterpreter.dir/link.txt --verbose=$(VERBOSE)
cd 
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Utilities/PythonInterpreter 
&& $(CMAKE_COMMAND) -E cmake_symlink_library 
../../../lib/libvtkPythonInterpreter-pv4.1.so.1 
../../../lib/libvtkPythonInterpreter-pv4.1.so.1 
../../../lib/libvtkPythonInterpreter-pv4.1.so


lib/libvtkPythonInterpreter-pv4.1.so: lib/libvtkPythonInterpreter-pv4.1.so.1

# Rule to build all files generated by this target.
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build: 
lib/libvtkPythonInterpreter-pv4.1.so
.PHONY : 
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build




Here is what is in the python module.
---
/ivec/modulefiles/apps/python/2.6.9:

setenv   PYTHON_VERSION 2.6.9
setenv   PYTHON_LIB_VERSION 2.6
setenv   PYTHON_DIR /ivec/apps/gcc/4.4.7/python/2.6.9
setenv   IBS_PYTHON_LIBDIR lib
prepend-path PATH /ivec/apps/gcc/4.4.7/python/2.6.9/bin
prepend-path LD_LIBRARY_PATH /ivec/apps/gcc/4.4.7/python/2.6.9/lib
prepend-path MANPATH /ivec/apps/gcc/4.4.7/python/2.6.9/share/man
prepend-path PYTHONPATH 
/ivec/apps/gcc/4.4.7/python/2.6.9/lib/python2.6/site-packages



Currently Loaded Modulefiles:
  1) ibs/1.5.7   2) gcc/4.4.7
.. loading openmpi/1.6.5
.. loading python/2.6.9
.. loading qt/4.8.4
.. loading zlib/1.2.7
.. loading hdf5/1.8.10
.. loading netcdf/4.2.1.1
.. loading boost/1.55.0
.. loading silo/4.8
.. check for build only modules
.. you are using cmake, will use ibs_cmake_build to process
.. loading cmake/2.8.12.1
.. unpacking the source code for paraview 4.1.0
 only need to unpack first source
.. compiling paraview 4.1.0 with gcc/4.4.7
Running cmake 
-DCMAKE_INSTALL_PREFIX=/group/director100/cbording/vis/apps/gcc/4.4.7/paraview/4.1.0 
-DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF 
-DPARAVIEW_USE_MPI:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON 
-DPARAVIEW_

Re: [Paraview] Unable to compile with Python enabled (UNCLASSIFIED)

2014-10-15 Thread Su, Simon M CTR USARMY ARL (US)
Classification: UNCLASSIFIED
Caveats: NONE

Chris,

Maybe try the http://www.paraview.org/Wiki/ParaView/Superbuild route?

I can confirm that for ParaView v4.2.0-1 and Superbuild, ParaView is
building for CRAY XC-30, SGI UV

And we are building it with -DUSE_SYSTEM_python:BOOL=OFF

HTH,
-simon

-Original Message-
From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of Chris
Bording
Sent: Wednesday, October 15, 2014 5:19 AM
To: paraview@paraview.org
Subject: [Paraview] Unable to compile with Python enabled

Hi,
  Okay spent a couple days experimenting with building Paraview-4.1 and 4.2.
on our local GPU-cluster it is The SGI supercomputer comprises 96 nodes,
each containing two 6-core Intel Xeon X5650 CPUs, an NVIDIA Tesla C2075 GPU
and 72 GB RAM, resulting in a system containing 1152 cores and 96 GPUs.


I keep hitting the build.make errors when I set
-DPARAVIEW_ENABLE_PYTHON:BOOL=ON -DUSE_SYSTEM_python:BOOL=ON
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_DIR/bin/python
-DPYTHON_LIBRARY:FILEPATH=$PYTHONPATH
-DPYTHON_INCLUDE_DIR:PATH=$PYTHON_DIR/include/python$PYTHON_LIB_VERSION

The error

make[2]: Entering directory
`/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build'
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.ma
ke:127: *** target pattern contains no `%'.  Stop.

if I go to the
VTK/Utilities/PythonInterpreter/CmakeFiles/vtkPythonInterpreter.dir

[cbording@login2 PythonInterpreter]$ cd CMakeFiles/
[cbording@login2 CMakeFiles]$ ls
CMakeDirectoryInformation.cmake  progress.marks  vtkPythonInterpreter.cmake
vtkPythonInterpreter.dir
[cbording@login2 CMakeFiles]$ cd vtkPythonInterpreter.dir/
[cbording@login2 vtkPythonInterpreter.dir]$ ls build.make  cmake_clean.cmake
DependInfo.cmake  depend.make  flags.make  Labels.txt  link.txt
progress.make
[cbording@login2 vtkPythonInterpreter.dir]$ pwd
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Uti
lities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir

so build.make is there and offending line is in RED

# Object files for target vtkPythonInterpreter vtkPythonInterpreter_OBJECTS
= \ "CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o" \
"CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInteractiveInterpreter.cxx.o"

# External object files for target vtkPythonInterpreter
vtkPythonInterpreter_EXTERNAL_OBJECTS =

lib/libvtkPythonInterpreter-pv4.1.so.1:
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPytho
nInterpreter.cxx.o
lib/libvtkPythonInterpreter-pv4.1.so.1:
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPytho
nInteractiveInterpreter.cxx.o
lib/libvtkPythonInterpreter-pv4.1.so.1:
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.ma
ke
lib/libvtkPythonInterpreter-pv4.1.so.1: lib/libvtkCommonCore-pv4.1.so.1
lib/libvtkPythonInterpreter-pv4.1.so.1:
/ivec/apps/gcc/4.4.7/python/2.6.9/lib/python2.6/site-packages:/ivec/python/l
ib/python2.6/site-packages
lib/libvtkPythonInterpreter-pv4.1.so.1: lib/libvtksys-pv4.1.so.1
lib/libvtkPythonInterpreter-pv4.1.so.1:
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold
"Linking CXX shared library ../../../lib/libvtkPythonInterpreter-pv4.1.so"
cd
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Uti
lities/PythonInterpreter && $(CMAKE_COMMAND) -E cmake_link_script
CMakeFiles/vtkPythonInterpreter.dir/link.txt --verbose=$(VERBOSE) cd
/group/director100/cbording/vis/build/ParaView-v4.1.0/paraview-build/VTK/Uti
lities/PythonInterpreter && $(CMAKE_COMMAND) -E cmake_symlink_library
../../../lib/libvtkPythonInterpreter-pv4.1.so.1
../../../lib/libvtkPythonInterpreter-pv4.1.so.1
../../../lib/libvtkPythonInterpreter-pv4.1.so

lib/libvtkPythonInterpreter-pv4.1.so: lib/libvtkPythonInterpreter-pv4.1.so.1

# Rule to build all files generated by this target.
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build:
lib/libvtkPythonInterpreter-pv4.1.so
.PHONY :
VTK/Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build



Here is what is in the python module.
---
/ivec/modulefiles/apps/python/2.6.9:

setenv   PYTHON_VERSION 2.6.9 
setenv   PYTHON_LIB_VERSION 2.6 
setenv   PYTHON_DIR /ivec/apps/gcc/4.4.7/python/2.6.9 
setenv   IBS_PYTHON_LIBDIR lib 
prepend-path PATH /ivec/apps/gcc/4.4.7/python/2.6.9/bin 
prepend-path LD_LIBRARY_PATH /ivec/apps/gcc/4.4.7/python/2.6.9/lib 
prepend-path MANPATH /ivec/apps/gcc/4.4.7/python/2.6.9/share/man 
prepend-path PYTHONPATH
/ivec/apps/gcc/4.4.7/python/2.6.9/lib/python2.6/site-packages 


Currently Loaded Modulefiles:
  1) ibs/1.5.7   2) gcc/4.4.7
.. loading openmpi/1.6.5
.. loading python/2.6.9
.. loading qt/4.8.4
.. loading zlib/1.2.7
.. loading hdf5/1.8.10
.. loading netcdf/4.2.1.1
.. 

[Paraview] service_identity issue

2014-10-15 Thread Kit Chambers
Hi All,

I am currently getting the following error message when running a matplot
lib script through a ParaView derived application.

lib/paraview-4.2/site-packages/twisted/internet/_sslverify.py:184:
UserWarning: You do not have the service_identity module installed. Please
install it from . Without
the service_identity module and a recent enough pyOpenSSL tosupport it,
Twisted can perform only rudimentary TLS client hostnameverification.  Many
valid certificate/hostname mappings may be rejected.
  verifyHostname, VerificationError = _selectVerifyImplementation()

I have tried various things:
-- installing  python3-openssl
-- installing python-pip and through that service_identity.
-- recompiles tce.

However, the message keeps coming up. I am running Ubuntu 14.04 using the
git ParaView. Has anyone else seen this? Any ideas are welcome.

Cheers

Kit Chambers
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] service_identity issue

2014-10-15 Thread Utkarsh Ayachit
I am not sure why that module is being imported. Is something
importing it manually?

On Wed, Oct 15, 2014 at 11:51 AM, Kit Chambers
 wrote:
> Hi All,
>
> I am currently getting the following error message when running a matplot
> lib script through a ParaView derived application.
>
> lib/paraview-4.2/site-packages/twisted/internet/_sslverify.py:184:
> UserWarning: You do not have the service_identity module installed. Please
> install it from . Without the
> service_identity module and a recent enough pyOpenSSL tosupport it, Twisted
> can perform only rudimentary TLS client hostnameverification.  Many valid
> certificate/hostname mappings may be rejected.
>   verifyHostname, VerificationError = _selectVerifyImplementation()
>
> I have tried various things:
> -- installing  python3-openssl
> -- installing python-pip and through that service_identity.
> -- recompiles tce.
>
> However, the message keeps coming up. I am running Ubuntu 14.04 using the
> git ParaView. Has anyone else seen this? Any ideas are welcome.
>
> Cheers
>
> Kit Chambers
>
>
>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] ParaView with VirtualGL

2014-10-15 Thread Craig Michoski
Ah, okay, I figured out part of my problem.  I had to connect to the
server and display the output on the server side, not just the client
side, which I guess is where the print commands redirects.  Now I have
several other problems.  First:

1) the print command outputs n_processor number of outputs.  Can I
make this just one value?  For example, if I am summing a value over a
mesh, I just want to total value output once over the entire mesh?  Is
this possible?

2)  I am getting an error when trying to simply get my loaded inputs.
When I do:

print "Gets here!"

alpha0 = inputs[0].PointData['alpha_0']

Traceback (most recent call last):
  File "", line 22, in 
  File "", line 8, in RequestData
TypeError: 'NoneType' object has no attribute '__getitem__'

I don't understand what is hppening here, can anyone help please?

Craig
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] ParaView with VirtualGL

2014-10-15 Thread Berk Geveci
Hi Craig,

Which version of ParaView are you using?

What file format are you loading?

Best,
-berk

On Wed, Oct 15, 2014 at 4:52 PM, Craig Michoski  wrote:

> Ah, okay, I figured out part of my problem.  I had to connect to the
> server and display the output on the server side, not just the client
> side, which I guess is where the print commands redirects.  Now I have
> several other problems.  First:
>
> 1) the print command outputs n_processor number of outputs.  Can I
> make this just one value?  For example, if I am summing a value over a
> mesh, I just want to total value output once over the entire mesh?  Is
> this possible?
>
> 2)  I am getting an error when trying to simply get my loaded inputs.
> When I do:
>
> print "Gets here!"
>
> alpha0 = inputs[0].PointData['alpha_0']
>
> Traceback (most recent call last):
>   File "", line 22, in 
>   File "", line 8, in RequestData
> TypeError: 'NoneType' object has no attribute '__getitem__'
>
> I don't understand what is hppening here, can anyone help please?
>
> Craig
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] ParaView with VirtualGL

2014-10-15 Thread Craig Michoski
Hi Berk,

Thanks for the response.  I see I'm at the fount.  So, I'm using paraview
4.1.0, and loading everything in from vtu files.  The basic python filter
I'm trying to get running in parallel is this below, for a basic
integration along a dimension in two of the loaded fields (one a scalar
alpha_0, the other a two dimensional vector sigma_0_0__sigma_0_1).


import numpy

alpha0 = inputs[0].PointData['alpha_0']
alpha1 = inputs[0].PointData['alpha_0']
sigma0 = inputs[0].PointData['sigma_0_0__sigma_0_1']

pdi = self.GetInputDataObject(0,0)
bg_field = 1
pdi = self.GetInputDataObject(0,0)
pdo = self.GetOutputDataObject(0)
numPoints = pdi.GetNumberOfPoints()
import time

ind=self.GetInput()
iin=ind.GetInformation()
timestep = time.clock()

dx = 100.0
dy = 100.0

for (j,alpha) in enumerate(alpha0):
x1,y1,z1 = pdi.GetPoint(j)[:3]
x2,y2,z2 = pdi.GetPoint(j+1)[:3]
if abs(x2-x1) <= dx and abs(x2-x1)>0:
dx = x2 - x1
if abs(y2-y1) <= dy and abs(y2-y1)>1e-6:
dy = y2 - y1

counter = 0
last_step = -1.0
prev_x = 0.0
efold = numpy.zeros(numPoints)
y_first = -1.0

for (j,alpha) in enumerate(alpha0):
x,y,z = pdi.GetPoint(j)
if x<380.0 and x>70.0 and y==0.0:
y_first = []
for (i,alpha_1) in enumerate(alpha1):
x1,y1,z1 = pdi.GetPoint(i)
if x1 == x and y1 == y:
for (k,sigmax) in enumerate(sigma0):
x2,y2,z2 = pdi.GetPoint(i)
if x2 == x1: #and y2 == y1:
if y2 not in y_first:
efold[k] +=  ( 1.0/exp(2.0*alpha_1) ) *
sigmax[0] * dy  #exp(alpha_1)*sigmax[0]*dy
y_first.append(y2)

if x!=last_step:
counter = counter + 1
print "y_integrated_chi_at1(",floor(timestep),",",
counter,") = ", efold[k]/377.0, ";"
print "x(",counter,") = ", x, ";"
last_step = x


Craig


On Wed, Oct 15, 2014 at 5:38 PM, Berk Geveci 
wrote:

> Hi Craig,
>
> Which version of ParaView are you using?
>
> What file format are you loading?
>
> Best,
> -berk
>
> On Wed, Oct 15, 2014 at 4:52 PM, Craig Michoski 
> wrote:
>
>> Ah, okay, I figured out part of my problem.  I had to connect to the
>> server and display the output on the server side, not just the client
>> side, which I guess is where the print commands redirects.  Now I have
>> several other problems.  First:
>>
>> 1) the print command outputs n_processor number of outputs.  Can I
>> make this just one value?  For example, if I am summing a value over a
>> mesh, I just want to total value output once over the entire mesh?  Is
>> this possible?
>>
>> 2)  I am getting an error when trying to simply get my loaded inputs.
>> When I do:
>>
>> print "Gets here!"
>>
>> alpha0 = inputs[0].PointData['alpha_0']
>>
>> Traceback (most recent call last):
>>   File "", line 22, in 
>>   File "", line 8, in RequestData
>> TypeError: 'NoneType' object has no attribute '__getitem__'
>>
>> I don't understand what is hppening here, can anyone help please?
>>
>> Craig
>> ___
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] ParaView with VirtualGL

2014-10-15 Thread Berk Geveci
First things first, you need to upgrade to 4.2 :-) It has significant
improvements to the Python API and you are like to need them.

When running in parallel, if you want to restrict which ranks print out
information, you can do something like this:

import vtk
contr = vtk.vtkMultiProcessController.GetGlobalController()
rank = contr.GetLocalProcessId()

if id == 0:
  print 'hello'

You will likely need MPI methods here. See:

http://www.kitware.com/blog/home/post/716

The reason you are seeing the error is that one of the ranks does not have
any data. I can't remember from the top of my head if we automatically
distribute vtu files. Try applying the D3 filter and see what happens.

Best,
-berk

On Wed, Oct 15, 2014 at 6:47 PM, Craig Michoski  wrote:

> Hi Berk,
>
> Thanks for the response.  I see I'm at the fount.  So, I'm using paraview
> 4.1.0, and loading everything in from vtu files.  The basic python filter
> I'm trying to get running in parallel is this below, for a basic
> integration along a dimension in two of the loaded fields (one a scalar
> alpha_0, the other a two dimensional vector sigma_0_0__sigma_0_1).
>
> 
> import numpy
>
> alpha0 = inputs[0].PointData['alpha_0']
> alpha1 = inputs[0].PointData['alpha_0']
> sigma0 = inputs[0].PointData['sigma_0_0__sigma_0_1']
>
> pdi = self.GetInputDataObject(0,0)
> bg_field = 1
> pdi = self.GetInputDataObject(0,0)
> pdo = self.GetOutputDataObject(0)
> numPoints = pdi.GetNumberOfPoints()
> import time
>
> ind=self.GetInput()
> iin=ind.GetInformation()
> timestep = time.clock()
>
> dx = 100.0
> dy = 100.0
>
> for (j,alpha) in enumerate(alpha0):
> x1,y1,z1 = pdi.GetPoint(j)[:3]
> x2,y2,z2 = pdi.GetPoint(j+1)[:3]
> if abs(x2-x1) <= dx and abs(x2-x1)>0:
> dx = x2 - x1
> if abs(y2-y1) <= dy and abs(y2-y1)>1e-6:
> dy = y2 - y1
>
> counter = 0
> last_step = -1.0
> prev_x = 0.0
> efold = numpy.zeros(numPoints)
> y_first = -1.0
>
> for (j,alpha) in enumerate(alpha0):
> x,y,z = pdi.GetPoint(j)
> if x<380.0 and x>70.0 and y==0.0:
> y_first = []
> for (i,alpha_1) in enumerate(alpha1):
> x1,y1,z1 = pdi.GetPoint(i)
> if x1 == x and y1 == y:
> for (k,sigmax) in enumerate(sigma0):
> x2,y2,z2 = pdi.GetPoint(i)
> if x2 == x1: #and y2 == y1:
> if y2 not in y_first:
> efold[k] +=  ( 1.0/exp(2.0*alpha_1) ) *
> sigmax[0] * dy  #exp(alpha_1)*sigmax[0]*dy
> y_first.append(y2)
>
> if x!=last_step:
> counter = counter + 1
> print "y_integrated_chi_at1(",floor(timestep),",",
> counter,") = ", efold[k]/377.0, ";"
> print "x(",counter,") = ", x, ";"
> last_step = x
> 
>
> Craig
>
>
> On Wed, Oct 15, 2014 at 5:38 PM, Berk Geveci 
> wrote:
>
>> Hi Craig,
>>
>> Which version of ParaView are you using?
>>
>> What file format are you loading?
>>
>> Best,
>> -berk
>>
>> On Wed, Oct 15, 2014 at 4:52 PM, Craig Michoski 
>> wrote:
>>
>>> Ah, okay, I figured out part of my problem.  I had to connect to the
>>> server and display the output on the server side, not just the client
>>> side, which I guess is where the print commands redirects.  Now I have
>>> several other problems.  First:
>>>
>>> 1) the print command outputs n_processor number of outputs.  Can I
>>> make this just one value?  For example, if I am summing a value over a
>>> mesh, I just want to total value output once over the entire mesh?  Is
>>> this possible?
>>>
>>> 2)  I am getting an error when trying to simply get my loaded inputs.
>>> When I do:
>>>
>>> print "Gets here!"
>>>
>>> alpha0 = inputs[0].PointData['alpha_0']
>>>
>>> Traceback (most recent call last):
>>>   File "", line 22, in 
>>>   File "", line 8, in RequestData
>>> TypeError: 'NoneType' object has no attribute '__getitem__'
>>>
>>> I don't understand what is hppening here, can anyone help please?
>>>
>>> Craig
>>> ___
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/paraview
>>>
>>
>>
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] BOX -> volume?

2014-10-15 Thread B.W.H. van Beest
I am still busy with finding out which etensions are needed, and how I
can enable them.
THis opebnGL-world is a bit alien to me, so it will take some time.

Regards,
Bertwim

On 10/14/2014 11:07 PM, Aashish Chaudhary wrote:
> Looks like certain extensions are still not quite working on yours
> system even with the proprietary driver. I will see if I can run your
> code on my laptop but that would be for tomorrow. 
>
> ** Assuming that this is not data dependent issue (which it should not). 
>
> I think its probably this line causing the issue: 
>
> bool driverSupport
>
>   #if defined(__APPLE__)
>
>   = true;
>
>   #else
>
>   = !(extensions->DriverIsATI()
>
>   && (extensions->GetDriverGLVersionMajor() >= 3))
>
>   || extensions->GetIgnoreDriverBugs("ATI texturing bug");
>
>   #endif
>
>
>
> On line number 181: can you change this code to : 
>
> this->HasHardwareSupport=renwin!=NULL&&this->IsSupported(renwin);
> to 
> this->HasHardwareSupport=1; 
>
> - Aashish
>
>
>
> On Tue, Oct 14, 2014 at 4:53 PM, B.W.H. van Beest  > wrote:
>
> Progress indeed. But I don't understand what you are saying about
> the transfer function.
>
> I' starting to wonder if I have two issues occurring simultaneously.
> In a new thread I just posted I described my problem in getting
> the colours in place.
> I need to write to a vtk file first and load it back.  I just
> found that when I just did that
> and then switched fo volume rendering, an error was there about
> the absence
> of an opengl extension:
>
> ERROR: In
> 
> /usr/local/git/ParaView/VTK/Rendering/VolumeOpenGL/vtkOpenGLProjectedTetrahedraMapper.cxx,
> line 185
> vtkOpenGLProjectedTetrahedraMapper (0x58ae490): The required
> extensions are not supported.
>
>  This is complete unknown terrain for me.
>
> Regards,
> Bertwim
>
>
>
> On 10/14/2014 09:58 PM, Burlen Loring wrote:
>> progress!  it sounds like volume rendering is working on the
>> wavelet dataset.
>>
>> You do need the scalars for volume rendering, so make sure you
>> have those when you try. You need to select the scalars in the
>> drop down also, I usually do this before changing to the volume
>> representation. You also may need to edit the transfer function.
>> For testing you could make the opacity over the entire scalar
>> range in which case you should see a solid cube.
>>
>> If you've done all that and don't see anything it's likely that
>> the dataset is messed up.  Add a dataset->Print(cerr) statement
>> to the end of your request data,  look in the information panel
>> and verify correct number of points and scalar ranges.
>>
>> If all else fails post the dataset to the list. After creating
>> your cube go to the file menu and "save data".
>>
>>
>> On 10/14/2014 10:40 AM, B.W.H. van Beest wrote:
>>> Hi Burlen,
>>>
>>> I have upgraded to the AMD drivers. Thanks for the hint. It has
>>> improved the situation a bit.
>>>
>>> Furthermore, I created the wavelet source. When selecting
>>> "volume" representation, I do see a three 3 picture, in all 5
>>> volume rendering mode (smart, raycast and texture mapping, ray
>>> cast only, texture mapping only, GPU based). The picture a
>>> rather fuzzy, but then I don't know what I'm supposed to see
>>> here. The good news is that the openGL errors I had before when
>>> displaying a wavelet, now have gone.
>>>
>>> The situation with my own cube, though, has unchanged.
>>> unfortunately. 
>>> The cube disappears in "volume" representation node, also when
>>> I  re-inserted scalar values for each of the 8 vertices.
>>>
>>> Regards,
>>> Bertwim
>>>
>>> On 10/14/2014 06:06 PM, Burlen Loring wrote:
 Hi Bertwim,

 In recent releases of ParaView I have experienced
 issues/flakeyness with volume rendering. Something you should
 try: Create the wavelet source, then in the properties panel
 find "volume rendering mode" and set it to "ray cast only". 
 This has worked for me on a number of systems. may or may not
 work, but worth a try.

 The output you pasted below shows that although you've got a
 sweet ATI GPU you're not taking advantage of it! You're using
 the Intel integrated GPU with Mesa drivers. If I were you I
 would install proprietary the AMD drivers
 . This should give you
 nice performance boost and may even solve the OpenGL errors you
 reported, which these days are as often (or more) a result of
 bugs in the Mesa drivers than in VTK.

 Burlen

 On 10/13/2014 11:44 AM, B.W.H. van Beest wrote:
>
>
> OS:   OpenSuSe 13.1
>
> # lspci | grep -i vga
> 00:02.0 VGA compatible controller: Intel 

[Paraview] Cannot add 3D cell to umesh

2014-10-15 Thread B.W.H. van Beest
Hello,

I'm wondering how I should add e.g. a 3D cell like a tri-prism
(a prism with identical triangles as base) or a skew variation of it
(triangles are not the same) to an (empty) unstructured grid.
The 3D cell itself is described by its points (vtkPoints) and its faces,
collected in a vtkCellArray.
Is this a cell of type VTK_POLYHEDRON?

Do I need to add such a cell face by face, or what?
There are quite a few methods in vtkUnstructuredGrid that promise to do
so or
something similar, but so far I did not have success (segfaults).

The methods I found from the documentation are:

vtkIdType InsertNextCell (int type, vtkIdType npts, vtkIdType *pts)
vtkIdType InsertNextCell (int type, vtkIdList *ptIds)

void SetCells (int type, vtkCellArray *cells)
void SetCells (int *types, vtkCellArray *cells)
void SetCells (vtkUnsignedCharArray *cellTypes, vtkIdTypeArray
*cellLocations, vtkCellArray *cells)

int InsertNextLinkedCell (int type, int npts, vtkIdType *pts)

I'm afraid I don't really appreciate the differences.
Any help is appreciated.

Kind Regards,
Bertwim
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview