Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | DISPLAY=:0 |
---|
4 | export DISPLAY |
---|
5 | |
---|
6 | # Fail on errors |
---|
7 | set -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 | |
---|
12 | broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'` |
---|
13 | |
---|
14 | exec_prefix="@exec_prefix@" |
---|
15 | bindir="@bindir@" |
---|
16 | libdir="@libdir@" |
---|
17 | . ${bindir}/rappture.env |
---|
18 | |
---|
19 | nanoscale_port=2000 |
---|
20 | nanovis_port=2000 |
---|
21 | vtkvis_port=2010 |
---|
22 | pymol_port=2020 |
---|
23 | |
---|
24 | PYMOL_PATH=${libdir}/pymol |
---|
25 | # lspci is either in /sbin or /usr/sbin |
---|
26 | PATH=/sbin:/usr/sbin:${PATH} |
---|
27 | |
---|
28 | export 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 | |
---|
34 | nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l` |
---|
35 | |
---|
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" |
---|
40 | |
---|
41 | cd /tmp |
---|
42 | |
---|
43 | # Don't let nanoscale and the visualization servers run away. |
---|
44 | # Limit cpu time to 20 minutes. |
---|
45 | minutes=20 |
---|
46 | ulimit -t $(expr ${minutes} \* 60 ) |
---|
47 | |
---|
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" |
---|
54 | |
---|
55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.