[Paraview] PV 4.01 How to get screenshot with menu

2013-08-22 Thread Stephen Wornom
I do a screenshot but the menu is not included (only the contours), How 
does one include the menu?

Thanks,
Stephen

--
stephen.wor...@inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

<>___
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://www.paraview.org/mailman/listinfo/paraview


[Paraview] Paraview Benchmark and IceT timings

2013-08-22 Thread Tijs de Kler

Hey all,

I am trying to do a benchmark, in order to be able to compare our GPU cluster and our Supercomputer. The GPU cluster has one Nvidia GTX680 per node 
and 10G ethernet, while the supercomputer has no GPU's and Infiniband


In short, i open a file with 31 million triangles, run D3() to divide it over the processes, and render it to a 1600x1200 renderview, using a python 
script (attached) and pvpython (paraview 3.98.1).


However, i am running into some unexpected deviations in my frame render times on the GPU-cluster, when using multiple (8+) nodes. Most frames render 
in a constant time, but every so many frames i get one 2 to 3 times as slow.  The output of the benchmark module doesnt shine much light on the 
subject: All processes report the same, much higher frame time for these frames, so it is not clear if one process is slowing the whole down.


Our initial hunch was that it might have to do with the compositing step: Since the infiniband is much faster in terms of latency and throughput, this 
step might be more efficient on the Supercomputer.


My question is, is there a way to separate the benchmark times of the rendering 
and the compositing part of each frame?
Or is there any other advice on pinpointing the performance culprit?

regards,
Tijs de Kler
SURFsara Visualization



from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
import time
import math
import os
import subprocess
from optparse import OptionParser
import paraview.benchmark

paraview.benchmark.maximize_logs()

parser = OptionParser()
parser.add_option("-n", "", dest="num_nodes",  help="number of nodes")
parser.add_option("-p", "", dest="ppn",  help="proces per node", default=1)
parser.add_option("-s", "", dest="server",  help="paraview server", default="v42-7")
parser.add_option("-f", "", dest="prefix",  help="becnhmark filename prefix", default="paraview")
parser.add_option("-q", "", dest="qjob",  help="job number")
(options, args) = parser.parse_args()
Connect(options.server)
#Connect("v42-7")
print "test1"
oldTime = time.time()

#que?
process = subprocess.Popen(['qstat',   '-x', options.qjob], stdout=subprocess.PIPE)
out, err = process.communicate()
#print out
nodeList = list(set(out.split('')[1].split('')[0].replace('/0', '').replace('/1', '').replace('/2', '').replace('/3', '').split('+')))
#nodeList = list(set(out.split('><')[17].split('>')[1].split('<')[0].replace('/0', '').split('+')))
print nodeList

#.split(' ')[0])

#nodeList = ['v41-7', 'v42-7', 'v42-5', 'v42-3','v42-2', 'v42-1', 'v41-8', 'v41-1']


interfaceList = ['vlan215']
#print interfaceList[1]

filename = options.prefix+ "_"+str(options.num_nodes)+"_"+str(options.ppn)+".txt"
f = open(filename, 'w')
newTime = time.time()
f.write("start perf; " + str(newTime-oldTime) +"\n")
oldTime=newTime

#ss002_512_3_bin_vtk = LegacyVTKReader( FileNames=['/home/paulm/datasets/cosmogrid/ss002.512_3.bin.vtk'] )

#contourFile = LegacyVTKReader( FileNames=['/home/tijs/test.vtk'] )
poging_pvtp = XMLPartitionedPolydataReader( FileName=['/home/tijs/data/poging.pvtp'] )
newTime = time.time()
f.write("end loading data; " + str(newTime-oldTime) +"\n")
oldTime=newTime
D31 = D3()


RenderView1 = GetRenderView()
RenderView1.CenterOfRotation = [255.5, 255.5, 255.5]

#Contour1 = Contour( PointMergeMethod="Uniform Binning" )

RenderView1.CameraPosition = [255.5, 255.5, 1965.3393248400794]
RenderView1.DepthPeeling = 0
RenderView1.CameraFocalPoint = [255.5, 255.5, 255.5]
RenderView1.CameraClippingRange = [1184.2959315916785, 2375.5144147126807]
RenderView1.CameraParallelScale = 442.53898133384814
#RenderView1.ViewSize=[6400,4800]
RenderView1.ViewSize=[1600,1200]
#RenderView1.ViewSize=[160,120]


#Contour1.PointMergeMethod = "Uniform Binning"
#Contour1.ContourBy = ['POINTS', 'scalars']
#Contour1.Isosurfaces = [0.2, 1.2, 2.2, 3.2, 4.2]

#DataRepresentation2 = Show()
#DataRepresentation2.ScaleFactor = 1.1
#DataRepresentation2.SelectionPointFieldDataArrayName = 'vtkProcessId'
#DataRepresentation2.EdgeColor = [0.0, 0.0, 0.576295109483]


ProcessIdScalars2 = ProcessIdScalars()

a1_ProcessId_PVLookupTable = GetLookupTableForArray( "ProcessId", 1, RGBPoints=[0.0, 0.0, 0.0, 1.0,  float(int(options.ppn)*int(options.num_nodes)), 1.0, 1.0, 0.0], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )

#a1_ProcessId_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 16.0, 1.0, 0.5, 0.0] )

DataRepresentation4 = Show()
DataRepresentation4.EdgeColor = [0.0, 0.0, 0.576295109483]
DataRepresentation4.SelectionPointFieldDataArrayName = 'ProcessId'
DataRepresentation4.ColorArrayName = 'ProcessId'
DataRepresentation4.LookupTable = a1_ProcessId_PVLookupTable
DataRepresentation4.ScaleFactor = 51.1

#a1_ProcessId_PVLookupTable.ScalarOpacityFunction = a1_ProcessId_PiecewiseFunction


Render()
f.write("Number of polygons: " +str(DataRepresentation4.SMProxy.GetRepresentedDataInformation

Re: [Paraview] PV 4.01 How to get screenshot with menu

2013-08-22 Thread Biddiscombe, John A.
printscreen key on keyboard? (or Alt+Printscreen)

> -Original Message-
> From: paraview-boun...@paraview.org [mailto:paraview-
> boun...@paraview.org] On Behalf Of Stephen Wornom
> Sent: 22 August 2013 10:50
> To: ParaView list
> Subject: [Paraview] PV 4.01 How to get screenshot with menu
> 
> I do a screenshot but the menu is not included (only the contours), How does
> one include the menu?
> Thanks,
> Stephen
> 
> --
> stephen.wor...@inria.fr
> 2004 route des lucioles - BP93
> Sophia Antipolis
> 06902 CEDEX
> 
> Tel: 04 92 38 50 54
> Fax: 04 97 15 53 51

___
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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Writing Images at certian time Steps using pvpython

2013-08-22 Thread Hedieh Ebrahimi
Hi Burlen,

Thanks for your reply. Actually when I mentioned final time step at  1
to get the image; by 1 I actually was referring to the the time. ( The
time step related to this time (1) is time step 40)

I see what time is relating to what time step by using the
"AnnotateTimeFilter" and seeing the times interactively.

Considering that I know the correct time, still pvpython crashes when I try
to get the image at a different time by changing the following to
time=1 or any other time that exist in my simulation result.

RenderView1.ViewTime = 1.0
RenderView1.CacheKey = 1.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 1.0
WriteImage('myImage.jpg')

Render()

Any ideas on what I could be doing wrong and how to get the image at a
different time using pvpython ?

I´d appreciate any help
Thanks


On 21 August 2013 18:27, Burlen Loring  wrote:

>  time is not always the same as time-step. Here's an example of how you
> could query the reader for time values and then use them
>
> ...
>
> nSteps = 0
> steps = reader.TimestepValues
> try:
>   nSteps = len(steps)
> except:
>   nSteps = 1
>   steps = [steps]
>
> ...
>
>
> anim = GetAnimationScene()
> anim.PlayMode = 'Snap To TimeSteps'
> anim.AnimationTime = steps[step]
> view = GetRenderView()
> view.ViewTime = steps[step]
>
> ...
>
> Render()
>
>
>
> On 08/21/2013 03:04 AM, Hedieh Ebrahimi wrote:
>
>  Hello,
>
>  My Data is of type h5 that I open using PFlotran HDF5 reader in ParaView
> which are result of PFlotran simulation.
>
>  What I am trying to do is to write an image at a certain time step and
> then finally write a batch job that writes an image for each time step of
> the simulation result.
>
>  If I try to interactively go to a certain time step and then save an
> image, everything works fine.
>
>  The problem is I have 40 time steps and I want to do the same procedure
> often. So I saved my state file as a python script and then set these few
> lines at the end of script just before Render().
>
> RenderView1.ViewTime = 0.0
> RenderView1.CacheKey = 0.0
> RenderView1.UseCache = 0
> AnimationScene1 = GetAnimationScene()
> AnimationScene1.AnimationTime = 0.0
> WriteImage('myImage.jpg')
>
> Render()
>
>
>  My timeSeries start at 0 and the python script works just fine for 0.
>
>  If I change the following lines to 1 (my final time step) or any
> other time step, then pvpython crashes, that is the following change to the
> script makes the pvpython crash:
>
> RenderView1.ViewTime = 1.0
> RenderView1.CacheKey = 1.0
> RenderView1.UseCache = 0
> AnimationScene1 = GetAnimationScene()
> AnimationScene1.AnimationTime = 1.0
> WriteImage('myImage.jpg')
>
> Render()
>
>  I used the trace to see what values I need to change to save an screen
> shot for any time step and I ended up with ViewTime and AnimationTime.
>
>  I have attached my script with this email. I would be grateful if you
> could please tell me if I need to change more in my script or add any
> additional lines to be able to get an screenshot of any timestep rather
> than 0.
>
>  Thanks in Advance.
>
>  Hedie
>
>
> ___
> 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://www.paraview.org/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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Uncertainty visualisation worked example

2013-08-22 Thread Kit Chambers
Thanks Kyle,

I guess what I was wondering is what sort of inputs it is designed for and
meant to visualise. For example

Is it something like:

Data_field_1 = My values
Data_field_2 = My uncertainties

where

MyResultsWithErrors = Data field 1 +/- Data field 2

In which case can it handle a case where the errors are asymetric?

Or is is more

Data_field_2 = 1 - the chance of Data_field_1 happening

Also can it handle point sets or just connected surface data?

Kit







On Wed, Aug 21, 2013 at 9:58 PM, Kyle Lutz  wrote:

> On Wed, Aug 21, 2013 at 7:20 AM, Kit Chambers 
> wrote:
> > Hi,
> >
> > Is there a worked example anywhere of using the uncertainty rendering
> > representation?  Apologies if it is in fact documented somewhere.
> >
>
> Hi Kit,
>
> There is currently no example demonstrating the uncertainty surface
> plugin (although there is a test case that just uses made up data on a
> wavelet).
>
> The general gist of it is to load your data set, enable the
> uncertainty surface representation, and then select your scalar
> uncertainty array in the display section of the properties panel.
>
> If you have specific problems/issues I could help with those. Let me know.
>
> Thanks,
> Kyle
>
___
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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Uncertainty visualisation worked example

2013-08-22 Thread Kyle Lutz
On Wed, Aug 21, 2013 at 4:58 PM, Kyle Lutz  wrote:
> On Wed, Aug 21, 2013 at 7:20 AM, Kit Chambers  
> wrote:
>> Hi,
>>
>> Is there a worked example anywhere of using the uncertainty rendering
>> representation?  Apologies if it is in fact documented somewhere.
>>
>
> Hi Kit,
>
> There is currently no example demonstrating the uncertainty surface
> plugin (although there is a test case that just uses made up data on a
> wavelet).
>
> The general gist of it is to load your data set, enable the
> uncertainty surface representation, and then select your scalar
> uncertainty array in the display section of the properties panel.
>
> If you have specific problems/issues I could help with those. Let me know.
>
> Thanks,
> Kyle

Also, the technique used is described in the paper entitled
"Visualization of uncertain scalar data fields using color scales and
perceptually adapted noise" by Coninx et. al.

-kyle
___
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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Uncertainty visualisation worked example

2013-08-22 Thread Kyle Lutz
On Thu, Aug 22, 2013 at 9:37 AM, Kit Chambers  wrote:
> Thanks Kyle,
>
> I guess what I was wondering is what sort of inputs it is designed for and
> meant to visualise. For example
>
> Is it something like:
>
> Data_field_1 = My values
> Data_field_2 = My uncertainties
>
> where
>
> MyResultsWithErrors = Data field 1 +/- Data field 2
>
> In which case can it handle a case where the errors are asymetric?
>
> Or is is more
>
> Data_field_2 = 1 - the chance of Data_field_1 happening
>
> Also can it handle point sets or just connected surface data?

The values (e.g. "Data_field_1") should be set as the regular "Color
by" array. The uncertainties (e.g. "Data_field_2") should be set as
the uncertainty array for the representation. The uncertainties are
expected to be positive and on the same scale as the input data. The
higher the uncertainty value, the more "noisy" the surface will be
rendered.

For now, the representation only works with surface rendering.

Hope this helps,
-kyle
___
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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Writing Images at certian time Steps using pvpython

2013-08-22 Thread Burlen Loring
if you haven't yet it worth while to print the time values reported by 
the reader. make sure it's not changing them on you. after that try to 
get a stack trace showing where the crash occurs.


On 08/22/2013 02:16 AM, Hedieh Ebrahimi wrote:

Hi Burlen,

Thanks for your reply. Actually when I mentioned final time step at  
1 to get the image; by 1 I actually was referring to the the 
time. ( The time step related to this time (1) is time step 40)


I see what time is relating to what time step by using the 
"AnnotateTimeFilter" and seeing the times interactively.


Considering that I know the correct time, still pvpython crashes when 
I try to get the image at a different time by changing the following 
to time=1 or any other time that exist in my simulation result.


RenderView1.ViewTime = 1.0
RenderView1.CacheKey = 1.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 1.0
WriteImage('myImage.jpg')

Render()

Any ideas on what I could be doing wrong and how to get the image at a 
different time using pvpython ?


I´d appreciate any help
Thanks


On 21 August 2013 18:27, Burlen Loring > wrote:


time is not always the same as time-step. Here's an example of how
you could query the reader for time values and then use them

... nSteps = 0
steps = reader.TimestepValues

try:
nSteps = len(steps)

except:
nSteps = 1

steps = [steps] ...

anim = GetAnimationScene()
anim.PlayMode = 'Snap To TimeSteps'

anim.AnimationTime = steps[step]

view = GetRenderView()
view.ViewTime = steps[step] ... Render()



On 08/21/2013 03:04 AM, Hedieh Ebrahimi wrote:

Hello,

My Data is of type h5 that I open using PFlotran HDF5 reader in
ParaView  which are result of PFlotran simulation.

What I am trying to do is to write an image at a certain time
step and then finally write a batch job that writes an image for
each time step of the simulation result.

If I try to interactively go to a certain time step and then save
an image, everything works fine.

The problem is I have 40 time steps and I want to do the same
procedure often. So I saved my state file as a python script and
then set these few lines at the end of script just before Render().

RenderView1.ViewTime = 0.0
RenderView1.CacheKey = 0.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 0.0
WriteImage('myImage.jpg')

Render()


My timeSeries start at 0 and the python script works just fine for 0.

If I change the following lines to 1 (my final time step) or
any other time step, then pvpython crashes, that is the following
change to the script makes the pvpython crash:

RenderView1.ViewTime = 1.0
RenderView1.CacheKey = 1.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 1.0
WriteImage('myImage.jpg')

Render()

I used the trace to see what values I need to change to save an
screen shot for any time step and I ended up with ViewTime and
AnimationTime.

I have attached my script with this email. I would be grateful if
you could please tell me if I need to change more in my script or
add any additional lines to be able to get an screenshot of any
timestep rather than 0.

Thanks in Advance.

Hedie


___
Powered bywww.kitware.com  

Visit other Kitware open-source projects 
athttp://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://www.paraview.org/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://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Paraview Benchmark and IceT timings

2013-08-22 Thread Moreland, Kenneth
There are some internal measurements taken, but I'm not sure there is any
way to get to them without hacking on some code.


You might be able to get a rough estimate of where the time is taken by
playing with the input a bit. If you put a small number of large polygons
on each process and force compositing on, that can give you an idea of the
time to do (mostly) just compositing. Conversely you could load in a
smaller number of polygons and turn compositing off.

Not sure if that helps...

-Ken

On 8/22/13 2:40 AM, "Tijs de Kler"  wrote:

>Hey all,
>
>I am trying to do a benchmark, in order to be able to compare our GPU
>cluster and our Supercomputer. The GPU cluster has one Nvidia GTX680 per
>node 
>and 10G ethernet, while the supercomputer has no GPU's and Infiniband
>
>In short, i open a file with 31 million triangles, run D3() to divide it
>over the processes, and render it to a 1600x1200 renderview, using a
>python 
>script (attached) and pvpython (paraview 3.98.1).
>
>However, i am running into some unexpected deviations in my frame render
>times on the GPU-cluster, when using multiple (8+) nodes. Most frames
>render 
>in a constant time, but every so many frames i get one 2 to 3 times as
>slow.  The output of the benchmark module doesnt shine much light on the
>subject: All processes report the same, much higher frame time for these
>frames, so it is not clear if one process is slowing the whole down.
>
>Our initial hunch was that it might have to do with the compositing step:
>Since the infiniband is much faster in terms of latency and throughput,
>this 
>step might be more efficient on the Supercomputer.
>
>My question is, is there a way to separate the benchmark times of the
>rendering and the compositing part of each frame?
>Or is there any other advice on pinpointing the performance culprit?
>
>regards,
>Tijs de Kler
>SURFsara Visualization
>
>
>


___
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://www.paraview.org/mailman/listinfo/paraview