source: trunk/packages/vizservers/start_viz.sh.in @ 2101

Last change on this file since 2101 was 2101, checked in by ldelgass, 13 years ago

Include vtkvis in build, vizservers startup script. Added --with-vtk-includes
and --with-vtk-libs options to vizservers configure. Also, require autoconf
2.60, since AC_PROG_MKDIR_P doesn't exist in earlier versions (e.g. on RHEL 5
which has autoconf 2.59).

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#! /bin/sh
2
3DISPLAY=:0
4export DISPLAY
5
6# Fail on errors
7set -e
8
9# Use the IP address of this host to construct a broadcast address.  This
10# feature will be hopefully going away very soon.
11
12broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'`
13
14render_dir="@prefix@"
15nanoscale_port=2000
16nanovis_port=2000
17vtkvis_port=2010
18pymol_port=2020
19
20# Build the name of the run directory. This is where nanoscale and the
21# visualization programs will reside.  The directory name is the same as the
22# render directory.
23dir="/tmp/`basename $render_dir`"
24
25
26PATH=${dir}/bin:$PATH
27LD_LIBRARY_PATH=${dir}/lib:$LD_LIBRARY_PATH
28PYMOL_PATH=${dir}/lib/pymol
29
30export PATH LD_LIBRARY_PATH PYMOL_PATH
31
32# Determine the number of video cards we have.  The new render server
33# motherboards have the useless XGI Volaria onboard video controllers (no 3D
34# capabilities) so we have to make sure we count only the nVidia cards.
35
36nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l`
37
38nanoscale="${dir}/bin/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
39nanovis="${dir}/bin/nanovis -p ${dir}/lib/shaders:${dir}/lib/resources"
40vtkvis="${dir}/bin/vtkvis"
41pymolproxy="${dir}/bin/pymolproxy ${dir}/bin/pymol -p -q -i -x -X 0 -Y 0"
42
43# Copy from render directory if the run copy doesn't already exist.
44# Otherwise use what's there.  This means that successive invocations
45# of nanoscale won't create their own run directories (only the first
46# one will).
47
48if test -d "$dir" ; then
49  echo "Reusing previously installed version from $render_dir"
50else
51  echo "Copying rappture from $render_dir"
52  mkdir -p $dir
53  tar -C ${render_dir} -clf - . | tar -C $dir -xpf -
54fi
55
56cd ${dir}
57
58# Don't let nanoscale and the visualization servers run away.
59# Limit cpu time to 20 minutes.
60minutes=20
61ulimit -t $(expr ${minutes} \* 60 )
62
63echo "$nanoscale -l $nanovis_port -c \"$nanovis\" -l $pymol_port -c \"$pymolproxy\""
64$nanoscale -l $nanovis_port -c "$nanovis" -l $vtkvis_port -c "$vtkvis" -l $pymol_port -c "$pymolproxy"
65
Note: See TracBrowser for help on using the repository browser.