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
|
Rev | Line | |
---|
[749] | 1 | #! /bin/sh |
---|
| 2 | |
---|
| 3 | DISPLAY=:0 |
---|
| 4 | export DISPLAY |
---|
| 5 | |
---|
[1231] | 6 | # Fail on errors |
---|
| 7 | set -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] | 12 | broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'` |
---|
[1265] | 13 | |
---|
[2235] | 14 | exec_prefix="@exec_prefix@" |
---|
| 15 | bindir="@bindir@" |
---|
| 16 | libdir="@libdir@" |
---|
| 17 | . ${bindir}/rappture.env |
---|
| 18 | |
---|
[1111] | 19 | nanoscale_port=2000 |
---|
| 20 | nanovis_port=2000 |
---|
[2101] | 21 | vtkvis_port=2010 |
---|
[1111] | 22 | pymol_port=2020 |
---|
[985] | 23 | |
---|
[2235] | 24 | PYMOL_PATH=${libdir}/pymol |
---|
[2250] | 25 | # lspci is either in /sbin or /usr/sbin |
---|
| 26 | PATH=/sbin:/usr/sbin:${PATH} |
---|
[749] | 27 | |
---|
[760] | 28 | export 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 | |
---|
| 34 | nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l` |
---|
| 35 | |
---|
[2235] | 36 | nanoscale="${bindir}/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast" |
---|
| 37 | nanovis="${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources" |
---|
| 38 | vtkvis="${bindir}/vtkvis" |
---|
| 39 | pymolproxy="${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0" |
---|
[1111] | 40 | |
---|
[2235] | 41 | cd /tmp |
---|
[749] | 42 | |
---|
[1132] | 43 | # Don't let nanoscale and the visualization servers run away. |
---|
[1131] | 44 | # Limit cpu time to 20 minutes. |
---|
[852] | 45 | minutes=20 |
---|
| 46 | ulimit -t $(expr ${minutes} \* 60 ) |
---|
| 47 | |
---|
[2235] | 48 | set -xv |
---|
| 49 | echo `ldd $vtkvis` |
---|
| 50 | exec $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.