[vtkusers] vtk without DISPLAY

Robert Belleman robbel at wins.uva.nl
Wed Feb 14 03:26:49 EST 2001


David,

It *is* possible to use tcl in batch jobs. You just need to be careful
that your script doesn't use anything that requires an X connection.
That means you can NOT use the "vtk" executable, but you CAN use
"tclsh" and load the vtk libraries from there.

For example; something like this works well in a nohup job (verified):

----------------------------------------------------------------------
#!/usr/bin/env tclsh8.3

catch {load vtktcl}

vtkSphereSource sphere
  sphere SetCenter 15 15 15
  sphere SetRadius 5.5

vtkImplicitModeller imp
  imp SetInput [sphere GetOutput]
  imp SetSampleDimensions 30 30 30

vtkStructuredPointsWriter dump
  dump SetInput [imp GetOutput]
  dump SetFileName "grid.vtk"
  dump Write
----------------------------------------------------------------------

Best,
-- Rob

[] Robert Belleman         X  Section Computational Science            []
[] robbel at science.uva.nl  |X| University of Amsterdam, the Netherlands []
[] tel: (+31) 20 525 7510  X  http://www.science.uva.nl/~robbel/       []

On Tue, Feb 13, 2001 at 04:53:42PM -0500, David Gobbi wrote:
> Hi Patrick,
> 
> I think you have missed the point.  Erik most likely wants to either
> run batch jobs on a remote machine without requiring an X connection
> back to his own machine, or he want to be able to nohup the vtk process so
> that he can log out of his machine without killing the batch job.
> 
> As far as I know, neither of these are possible with the tcl vtk 
> executable because the vtk executable requires an X connection.
> There are ways to work around this, but I can't think of any
> trivial ways to do so.
> 
>  - David
> 
> On Tue, 13 Feb 2001, Patrick Lowry wrote:
> 
> > David:
> > 
> > It is unclear to me what tcl has to do with evoking vtk without a DISPLAY
> > device.  I run vtk filters with tcl all the time where I only show a small
> > top level window that tell me when the process is finished.  No window has
> > to be shown at all if desired.
> > 
> > Patrick Lowry
> > 
> > At 03:44 PM 2/13/2001 -0500, you wrote:
> > >On Tue, 13 Feb 2001, Erik Sobel wrote:
> > >
> > >> Is there a command line option to vtk to envoke it without a DISPLAY
> > device 
> > >> - for batch filtering etc.
> > >> 
> > >> Thanks,
> > >> Erik
> > >
> > >Sure, just don't use tcl.  This is no problem for VTK programs written
> > >in Python or C++ (and probably also true for Java).
> > >
> > > - David




More information about the vtkusers mailing list