Sun Grid Engine install from source code
Background
I have been using SGE on laptop for a while. Recent OS upgrade from Ubuntu16.04
to 18.04 caused me a bit headache. Everything broke, and reinstalling from
apt-get
did not resolve the issue. I decided to compile and install from the
source.
My current setup is
Ubuntu 18.04.2 LTS
Memory: 15.6 GiB
Processor: Inter Core i7-4712HQ CPU@2.30GHz x 8
and network host setup as the following:
$ hostname
joezhu-M3800
$ cat /etc/hosts
#127.0.0.1 localhost
127.0.0.1 master master
#127.0.1.1 master master
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Cleaning up
First, remove whatever was left.
$ sudo rm -rf /var/lib/gridengine/
$ sudo apt-get remove gridengine-exec gridengine-client gridengine-common --purge -y
Install from source code
Download source code from http://gridscheduler.sourceforge.net/CompileGridEngineSource.html
This is a helpful page http://gridscheduler.sourceforge.net/CompileGridEngineSource.html
There are some library dependencies, which can resolved by
$ sudo apt-get install libxpm-dev libxmu-dev libopenmpi-dev
Missing headers
*Error*: `../utilbin/authuser.c:72:10: fatal error: security/pam_appl.h: No such file or directory`
Thanks to http://ask.xmodulo.com/fatal-error-security-pam-modules.html
Resolved by:
$ sudo apt-get install libpam0g-dev
*Error*: `../Xmt310/Xmt/Xmt.h:56:10: fatal error: Xm/Xm.h: No such file or directory`
Thanks to https://askubuntu.com/questions/219414/installing-missing-package-that-provides-xm-xm-h
Resolved by:
$ sudo apt-get install libmotif-dev
Compile code with the following
./aimk -no-java -no-jni -no-secure -spool-classic -no-dump -only-depend
./scripts/zerodepend
./aimk -no-java -no-jni -no-secure -spool-classic -no-dump depend
./aimk -no-java -no-jni -no-secure -spool-classic -no-dump
Note: This did not go very smoothly for me. Had troubles when compiling
qmake
and qtcsh
. Resolved by modify the source code.
$ diff 3rdparty/qmake/glob/glob.c 3rdparty/qmake/glob/glob_unchanged.c
211,212c211
< //#if !defined __alloca && !defined __GNU_LIBRARY__
< #if !defined __alloca && defined __GNU_LIBRARY__
---
> #if !defined __alloca && !defined __GNU_LIBRARY__
$ diff 3rdparty/qtcsh/sh.proc.c 3rdparty/qtcsh/sh.proc_unchanged.c
55c55
< //# define BSDWAIT
---
> # define BSDWAIT
59,61c59,61
< //# ifndef BSDWAIT
< //# define BSDWAIT
< //# endif /* !BSDWAIT */
---
> # ifndef BSDWAIT
> # define BSDWAIT
> # endif /* !BSDWAIT */
Install
export SGE_ROOT=$HOME/lib/gridengine/
mkdir $SGE_ROOT
scripts/distinst -all -local -noexit
cd $SGE_ROOT
sudo ./install_qmaster
sudo ./install_execd
Check everything is running
ps aux | grep sge_ | grep -v grep
joezhu 8360 0.0 0.0 139188 6008 ? Sl 18:06 0:03 /home/joezhu/lib/gridengine/bin/linux-x64/sge_qmaster
joezhu 8804 0.0 0.0 64768 5012 ? Sl 18:07 0:02 /home/joezhu/lib/gridengine/bin/linux-x64/sge_execd
After install
If see
$ ~/lib/gridengine/bin/linux-x64/qhost
error: commlib error: access denied (server host resolves destination host "joezhu-M3800.home" as "(HOST_NOT_RESOLVABLE)")
error: unable to contact qmaster using port 6444 on host "joezhu-M3800"
do
~/lib/gridengine/bin/linux-x64/qconf -as joezhu-M3800.home
Make softlinks to $HOME/bin/
cd $HOME/bin
ln -s ~/lib/gridengine/bin/linux-x64/qstat
ln -s ~/lib/gridengine/bin/linux-x64/qhost
ln -s ~/lib/gridengine/bin/linux-x64/qsub
ln -s ~/lib/gridengine/bin/linux-x64/qacct
ln -s ~/lib/gridengine/bin/linux-x64/qdel
ln -s ~/lib/gridengine/bin/linux-x64/qmon
Set scheduler
Call qmon
, and choose Scheduler, set max jobs 6