source: branches/1.2/packages/vizservers/start_viz.sh.in @ 3589

Last change on this file since 3589 was 2250, checked in by ldelgass, 9 years ago

Add /sbin:/usr/sbin to PATH for lspci (FYI, it's in different places on Debian
and RHEL).

  • 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# lspci is either in /sbin or /usr/sbin
26PATH=/sbin:/usr/sbin:${PATH}
27
28export PATH LD_LIBRARY_PATH PYMOL_PATH
29
30# Determine the number of video cards we have.  The new render server
31# motherboards have the useless XGI Volari onboard video controllers (no 3D
32# capabilities) so we have to make sure we count only the nVidia cards.
33
34nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l`
35
36nanoscale="${bindir}/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
37nanovis="${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources"
38vtkvis="${bindir}/vtkvis"
39pymolproxy="${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0"
40
41cd /tmp
42
43# Don't let nanoscale and the visualization servers run away.
44# Limit cpu time to 20 minutes.
45minutes=20
46ulimit -t $(expr ${minutes} \* 60 )
47
48set -xv
49echo `ldd $vtkvis`
50exec $nanoscale \
51 -l $nanovis_port -c "$nanovis" \
52 -l $vtkvis_port  -c "$vtkvis" \
53 -l $pymol_port   -c "$pymolproxy"
54
55
Note: See TracBrowser for help on using the repository browser.