Last change
on this file since 1231 was
1231,
checked in by gah, 15 years ago
|
allow multiple screens for render server
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | DISPLAY=:0 |
---|
4 | export DISPLAY |
---|
5 | |
---|
6 | # Fail on errors |
---|
7 | set -e |
---|
8 | |
---|
9 | broadcast="192.168.200.255" |
---|
10 | render_dir="@prefix@" |
---|
11 | nanoscale_port=2000 |
---|
12 | nanovis_port=2000 |
---|
13 | pymol_port=2020 |
---|
14 | |
---|
15 | # Build the name of the run directory. This is where nanoscale and the |
---|
16 | # visualization programs will reside. The directory name is the same as the |
---|
17 | # render directory. |
---|
18 | dir="/tmp/`basename $render_dir`" |
---|
19 | |
---|
20 | |
---|
21 | PATH=${dir}/bin:$PATH |
---|
22 | LD_LIBRARY_PATH=${dir}/lib:$LD_LIBRARY_PATH |
---|
23 | PYMOL_PATH=${dir}/lib/pymol |
---|
24 | |
---|
25 | export PATH LD_LIBRARY_PATH PYMOL_PATH |
---|
26 | |
---|
27 | nscreens=`lspci | fgrep VGA | wc -l` |
---|
28 | nanoscale="${dir}/bin/nanoscale -S${nscreens} -b $nanoscale_port -s $broadcast" |
---|
29 | nanovis="${dir}/bin/nanovis -p ${dir}/lib/shaders:${dir}/lib/resources" |
---|
30 | pymolproxy="${dir}/bin/pymolproxy ${dir}/bin/pymol -p -q -i -x -X 0 -Y 0" |
---|
31 | |
---|
32 | # Copy from render directory if the run copy doesn't already exist. |
---|
33 | # Otherwise use what's there. This means that successive invocations |
---|
34 | # of nanoscale won't create their own run directories (only the first |
---|
35 | # one will). |
---|
36 | |
---|
37 | if test -d "$dir" ; then |
---|
38 | echo "Reusing previously installed version from $render_dir" |
---|
39 | else |
---|
40 | echo "Copying rappture from $render_dir" |
---|
41 | mkdir -p $dir |
---|
42 | tar -C ${render_dir} -clf - . | tar -C $dir -xpf - |
---|
43 | fi |
---|
44 | |
---|
45 | cd ${dir} |
---|
46 | |
---|
47 | # Don't let nanoscale and the visualization servers run away. |
---|
48 | # Limit cpu time to 20 minutes. |
---|
49 | minutes=20 |
---|
50 | ulimit -t $(expr ${minutes} \* 60 ) |
---|
51 | |
---|
52 | echo "$nanoscale -l $nanovis_port -c \"$nanovis\" -l $pymol_port -c \"$pymolproxy\"" |
---|
53 | $nanoscale -l $nanovis_port -c "$nanovis" -l $pymol_port -c "$pymolproxy" |
---|
54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.