| 1 |
#!/bin/bash |
| 2 |
# This script installs and configures a Sun Grid Engine installation for use |
| 3 |
# on a Travis instance. |
| 4 |
# |
| 5 |
# Written by Dan Blanchard ([email protected]), September 2013 |
| 6 |
|
| 7 |
cd travis |
| 8 |
sudo apt-get update -qq |
| 9 |
echo "gridengine-master shared/gridenginemaster string localhost" | sudo debconf-set-selections |
| 10 |
echo "gridengine-master shared/gridenginecell string default" | sudo debconf-set-selections |
| 11 |
echo "gridengine-master shared/gridengineconfig boolean true" | sudo debconf-set-selections |
| 12 |
sudo apt-get install gridengine-common gridengine-master |
| 13 |
# Do this in a separate step to give master time to start |
| 14 |
sudo apt-get install libdrmaa1.0 gridengine-client gridengine-exec |
| 15 |
export CORES=$(grep -c '^processor' /proc/cpuinfo) |
| 16 |
sed -i -r "s/template/$USER/" user_template |
| 17 |
sudo qconf -Auser user_template |
| 18 |
sudo qconf -au $USER arusers |
| 19 |
sudo qconf -as localhost |
| 20 |
export LOCALHOST_IN_SEL=$(qconf -sel | grep -c 'localhost') |
| 21 |
if [ $LOCALHOST_IN_SEL != "1" ]; then sudo qconf -Ae host_template; else sudo qconf -Me host_template; fi |
| 22 |
sed -i -r "s/UNDEFINED/$CORES/" queue_template |
| 23 |
sudo qconf -Ap smp_template |
| 24 |
sudo qconf -Aq queue_template |
| 25 |
echo "Printing queue info to verify that things are working correctly." |
| 26 |
qstat -f -q all.q -explain a |
| 27 |
echo "You should see sge_execd and sge_qmaster running below:" |
| 28 |
ps aux | grep "sge" |