#! /bin/sh DISPLAY=:0 export DISPLAY # Fail on errors set -e # Use the IP address of this host to construct a broadcast address. This # feature will be hopefully going away very soon. broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'` exec_prefix="@exec_prefix@" bindir="@bindir@" libdir="@libdir@" . ${bindir}/rappture.env nanoscale_port=2000 nanovis_port=2000 vtkvis_port=2010 pymol_port=2020 PYMOL_PATH=${libdir}/pymol # lspci is either in /sbin or /usr/sbin PATH=/sbin:/usr/sbin:${PATH} export PATH LD_LIBRARY_PATH PYMOL_PATH # Determine the number of video cards we have. The new render server # motherboards have the useless XGI Volari onboard video controllers (no 3D # capabilities) so we have to make sure we count only the nVidia cards. nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l` nanoscale="${bindir}/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast" nanovis="${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources" vtkvis="${bindir}/vtkvis" pymolproxy="${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0" cd /tmp # Don't let nanoscale and the visualization servers run away. # Limit cpu time to 20 minutes. minutes=20 ulimit -t $(expr ${minutes} \* 60 ) set -xv echo `ldd $vtkvis` exec $nanoscale \ -l $nanovis_port -c "$nanovis" \ -l $vtkvis_port -c "$vtkvis" \ -l $pymol_port -c "$pymolproxy"