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

Last change on this file since 2235 was 2235, checked in by gah, 9 years ago
  • Property svn:executable set to *
File size: 1.3 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
14exec_prefix="@exec_prefix@"
15bindir="@bindir@"
16libdir="@libdir@"
17. ${bindir}/rappture.env
18
19nanoscale_port=2000
20nanovis_port=2000
21vtkvis_port=2010
22pymol_port=2020
23
24PYMOL_PATH=${libdir}/pymol
25
26export PATH LD_LIBRARY_PATH PYMOL_PATH
27
28# Determine the number of video cards we have.  The new render server
29# motherboards have the useless XGI Volari onboard video controllers (no 3D
30# capabilities) so we have to make sure we count only the nVidia cards.
31
32nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l`
33
34nanoscale="${bindir}/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
35nanovis="${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources"
36vtkvis="${bindir}/vtkvis"
37pymolproxy="${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0"
38
39cd /tmp
40
41# Don't let nanoscale and the visualization servers run away.
42# Limit cpu time to 20 minutes.
43minutes=20
44ulimit -t $(expr ${minutes} \* 60 )
45
46set -xv
47echo `ldd $vtkvis`
48exec $nanoscale \
49 -l $nanovis_port -c "$nanovis" \
50 -l $vtkvis_port  -c "$vtkvis" \
51 -l $pymol_port   -c "$pymolproxy"
52
53
Note: See TracBrowser for help on using the repository browser.