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

Last change on this file since 2924 was 2250, checked in by ldelgass, 13 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
RevLine 
[749]1#! /bin/sh
2
3DISPLAY=:0
4export DISPLAY
5
[1231]6# Fail on errors
7set -e
8
[1265]9# Use the IP address of this host to construct a broadcast address.  This
10# feature will be hopefully going away very soon.
11
[1278]12broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'`
[1265]13
[2235]14exec_prefix="@exec_prefix@"
15bindir="@bindir@"
16libdir="@libdir@"
17. ${bindir}/rappture.env
18
[1111]19nanoscale_port=2000
20nanovis_port=2000
[2101]21vtkvis_port=2010
[1111]22pymol_port=2020
[985]23
[2235]24PYMOL_PATH=${libdir}/pymol
[2250]25# lspci is either in /sbin or /usr/sbin
26PATH=/sbin:/usr/sbin:${PATH}
[749]27
[760]28export PATH LD_LIBRARY_PATH PYMOL_PATH
[749]29
[1265]30# Determine the number of video cards we have.  The new render server
[2110]31# motherboards have the useless XGI Volari onboard video controllers (no 3D
[1265]32# capabilities) so we have to make sure we count only the nVidia cards.
33
34nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l`
35
[2235]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"
[1111]40
[2235]41cd /tmp
[749]42
[1132]43# Don't let nanoscale and the visualization servers run away.
[1131]44# Limit cpu time to 20 minutes.
[852]45minutes=20
46ulimit -t $(expr ${minutes} \* 60 )
47
[2235]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"
[1111]54
[2235]55
Note: See TracBrowser for help on using the repository browser.