How to run EnginFrame in Ubuntu on Windows WSL

This guide explains how to get EnginFrame, Neutro and SLURM running inside Ubuntu on Windows. Windows Subsystem for Linux presently supports Windows 10 and Windows Server 2019. In case running on AWS first select the Windows Server 2019 AMI

In the next step we select the instance type (head over to instaguide.io for a great overview of instances and related pricing). In our case we select a t3.large. FYI at the time of writing: WSL 2 is only available in Windows Builds 18917 or higher. We can check the Windows version with the following command: systeminfo | Select-String "^OS Name","^OS Version"

Then we enable the Windows Subsystem for Linux (WSL):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

and reboot. Now we can install the Linux-distro – in our case Ubuntu 18.04.

In case the Microsoft shop does not work you can download the Ubuntu distribution and others manually based on the list from https://docs.microsoft.com/en-us/windows/wsl/install-manual. In the case of Ubuntu 18.04 the appx file can be found here: https://aka.ms/wsl-ubuntu-1804.

You can even download the Linux distribution for WSL via commandline – and then install the APPX Linux package:

Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing
## And install the Ubuntu distribution:
Add-AppxPackage .\Ubuntu_*.appx

which will look similar to:

Now you can click on the Windows “Start” button and you can see Ubuntu 18.04 as recently added app:

After starting the Ubuntu setup will ask for a Linux user name and after entering e.g. “nisp” the Ubuntu window should look similar to this in case of Ubuntu 20.04:

You got Ubuntu 20.04 running on Windows!

Or in case you install Ubuntu 18.04 it will look like this:

EnginFrame on Ubuntu in WSL

As next step we install the NICE EnginFrame portal. As Neutro prefers the Java 8 runtime (please see our guide about the NICE Neutro session scheduler installation which you might want to install before EnginFrame for Windows session management) we install EnginFrame on Java 8 as well:

sudo apt-get install openjdk-8-jdk
# start the installation wizzard of EnginFrame and typically select pam with passwd as authentication strategy - or e.g. Activedirectory 
# in case of AD or LDAP authentication install ldap tools:
# apt install ldap-utils
java -jar enginframe-20??.*.jar

The EnginFrame installation on Ubuntu will at the end complain about the boot startup installation but you can start EnginFrame yourself with /opt/nice/enginframe/bin/enginframe start:

Now EnginFrame is running inside the Windows Subsystem for Linux in Ubuntu 18.04. Below is a screenshot of the related processes in addition to a Neutro session scheduler java process:

After logging into EnginFrame via the standard port 8080 we can find the Neutro host inside the EnginFrame Views host view:

SLURM on WSL

Now we can start the SLURM installation (here we use the guide at ftp://microway.com/pub/for-customer/SDSU-Training/Webinar_2_Slurm_II–Ubuntu16.04_and_18.04.pdf):

> yum update
> yum upgrade
> sudo apt install slurm-wlm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  openjdk-11-jre
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  freeipmi-common gcc-7-base libaec0 libdbi1 libfreeipmi16 libgfortran4 libhdf5-100 libhwloc-plugins libhwloc5
  libipmimonitoring5a libltdl7 liblua5.1-0 libmunge2 libmysqlclient20 libquadmath0 librrd8 libslurmdb32 libsz2 munge
  mysql-common ocl-icd-libopencl1 slurm-client slurm-wlm-basic-plugins slurmctld slurmd
Suggested packages:
  freeipmi-tools libhwloc-contrib-plugins opencl-icd
The following NEW packages will be installed:
  freeipmi-common gcc-7-base libaec0 libdbi1 libfreeipmi16 libgfortran4 libhdf5-100 libhwloc-plugins libhwloc5
  libipmimonitoring5a libltdl7 liblua5.1-0 libmunge2 libmysqlclient20 libquadmath0 librrd8 libslurmdb32 libsz2 munge
  mysql-common ocl-icd-libopencl1 slurm-client slurm-wlm slurm-wlm-basic-plugins slurmctld slurmd
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 7819 kB of archives.
After this operation, 28.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 freeipmi-common amd64 1.4.11-1.1ubuntu4.1 [174 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.5.0-3ubuntu1~18.04 [18.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libaec0 amd64 0.3.2-2 [18.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libdbi1 amd64 0.9.0-5 [27.3 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.4.0-1ubuntu1~18.04 [134 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgfortran4 amd64 7.5.0-3ubuntu1~18.04 [492 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libsz2 amd64 0.3.2-2 [5114 B]
Get:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libhdf5-100 amd64 1.10.0-patch1+docs-4 [1256 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libltdl7 amd64 2.4.6-2 [38.8 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/universe amd64 liblua5.1-0 amd64 5.1.5-8.1build2 [100 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7308 B]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmysqlclient20 amd64 5.7.30-0ubuntu0.18.04.1 [690 kB
]
Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 librrd8 amd64 1.7.0-1build1 [158 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libslurmdb32 amd64 17.11.2-1build1 [584 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libfreeipmi16 amd64 1.4.11-1.1ubuntu4.1 [826 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic/main amd64 ocl-icd-libopencl1 amd64 2.2.11-1ubuntu1 [30.3 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libhwloc5 amd64 1.11.9-1 [105 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libhwloc-plugins amd64 1.11.9-1 [12.5 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libipmimonitoring5a amd64 1.4.11-1.1ubuntu4.1 [42.6 kB
]
Get:20 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libmunge2 amd64 0.5.13-1 [19.5 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic/universe amd64 munge amd64 0.5.13-1 [90.0 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurm-wlm-basic-plugins amd64 17.11.2-1build1 [1196 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurm-client amd64 17.11.2-1build1 [870 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurmd amd64 17.11.2-1build1 [341 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurmctld amd64 17.11.2-1build1 [571 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurm-wlm amd64 17.11.2-1build1 [12.2 kB]
Fetched 7819 kB in 2s (3190 kB/s)
Selecting previously unselected package freeipmi-common.
(Reading database ... 45093 files and directories currently installed.)
Preparing to unpack .../00-freeipmi-common_1.4.11-1.1ubuntu4.1_amd64.deb ...
Unpacking freeipmi-common (1.4.11-1.1ubuntu4.1) ...
Selecting previously unselected package gcc-7-base:amd64.
Preparing to unpack .../01-gcc-7-base_7.5.0-3ubuntu1~18.04_amd64.deb ...
Unpacking gcc-7-base:amd64 (7.5.0-3ubuntu1~18.04) ...
Selecting previously unselected package libaec0:amd64.
Preparing to unpack .../02-libaec0_0.3.2-2_amd64.deb ...
Unpacking libaec0:amd64 (0.3.2-2) ...
Selecting previously unselected package libdbi1:amd64.
Preparing to unpack .../03-libdbi1_0.9.0-5_amd64.deb ...
Unpacking libdbi1:amd64 (0.9.0-5) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../04-libquadmath0_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking libquadmath0:amd64 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package libgfortran4:amd64.
Preparing to unpack .../05-libgfortran4_7.5.0-3ubuntu1~18.04_amd64.deb ...
Unpacking libgfortran4:amd64 (7.5.0-3ubuntu1~18.04) ...
Selecting previously unselected package libsz2:amd64.
Preparing to unpack .../06-libsz2_0.3.2-2_amd64.deb ...
Unpacking libsz2:amd64 (0.3.2-2) ...
Selecting previously unselected package libhdf5-100:amd64.
Preparing to unpack .../07-libhdf5-100_1.10.0-patch1+docs-4_amd64.deb ...
Unpacking libhdf5-100:amd64 (1.10.0-patch1+docs-4) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../08-libltdl7_2.4.6-2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-2) ...
Selecting previously unselected package liblua5.1-0:amd64.
Preparing to unpack .../09-liblua5.1-0_5.1.5-8.1build2_amd64.deb ...
Unpacking liblua5.1-0:amd64 (5.1.5-8.1build2) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../10-mysql-common_5.8+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.4) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../11-libmysqlclient20_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package librrd8:amd64.
Preparing to unpack .../12-librrd8_1.7.0-1build1_amd64.deb ...
Unpacking librrd8:amd64 (1.7.0-1build1) ...
Selecting previously unselected package libslurmdb32.
Preparing to unpack .../13-libslurmdb32_17.11.2-1build1_amd64.deb ...
Unpacking libslurmdb32 (17.11.2-1build1) ...
Selecting previously unselected package libfreeipmi16.
Preparing to unpack .../14-libfreeipmi16_1.4.11-1.1ubuntu4.1_amd64.deb ...
Unpacking libfreeipmi16 (1.4.11-1.1ubuntu4.1) ...
Selecting previously unselected package ocl-icd-libopencl1:amd64.
Preparing to unpack .../15-ocl-icd-libopencl1_2.2.11-1ubuntu1_amd64.deb ...
Unpacking ocl-icd-libopencl1:amd64 (2.2.11-1ubuntu1) ...
Selecting previously unselected package libhwloc5:amd64.
Preparing to unpack .../16-libhwloc5_1.11.9-1_amd64.deb ...
Unpacking libhwloc5:amd64 (1.11.9-1) ...
Selecting previously unselected package libhwloc-plugins.
Preparing to unpack .../17-libhwloc-plugins_1.11.9-1_amd64.deb ...
Unpacking libhwloc-plugins (1.11.9-1) ...
Selecting previously unselected package libipmimonitoring5a.
Preparing to unpack .../18-libipmimonitoring5a_1.4.11-1.1ubuntu4.1_amd64.deb ...
Unpacking libipmimonitoring5a (1.4.11-1.1ubuntu4.1) ...
Selecting previously unselected package libmunge2.
Preparing to unpack .../19-libmunge2_0.5.13-1_amd64.deb ...
Unpacking libmunge2 (0.5.13-1) ...
Selecting previously unselected package munge.
Preparing to unpack .../20-munge_0.5.13-1_amd64.deb ...
Unpacking munge (0.5.13-1) ...
Selecting previously unselected package slurm-wlm-basic-plugins.
Preparing to unpack .../21-slurm-wlm-basic-plugins_17.11.2-1build1_amd64.deb ...
Unpacking slurm-wlm-basic-plugins (17.11.2-1build1) ...
Selecting previously unselected package slurm-client.
Preparing to unpack .../22-slurm-client_17.11.2-1build1_amd64.deb ...
Unpacking slurm-client (17.11.2-1build1) ...
Selecting previously unselected package slurmd.
Preparing to unpack .../23-slurmd_17.11.2-1build1_amd64.deb ...
Unpacking slurmd (17.11.2-1build1) ...
Selecting previously unselected package slurmctld.
Preparing to unpack .../24-slurmctld_17.11.2-1build1_amd64.deb ...
Unpacking slurmctld (17.11.2-1build1) ...
Selecting previously unselected package slurm-wlm.
Preparing to unpack .../25-slurm-wlm_17.11.2-1build1_amd64.deb ...
Unpacking slurm-wlm (17.11.2-1build1) ...
Setting up libquadmath0:amd64 (8.4.0-1ubuntu1~18.04) ...
Setting up libaec0:amd64 (0.3.2-2) ...
Setting up libdbi1:amd64 (0.9.0-5) ...
Setting up mysql-common (5.8+1.0.4) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libmunge2 (0.5.13-1) ...
Setting up librrd8:amd64 (1.7.0-1build1) ...
Setting up gcc-7-base:amd64 (7.5.0-3ubuntu1~18.04) ...
Setting up munge (0.5.13-1) ...
Generating a pseudo-random key using /dev/urandom completed.
Please refer to /usr/share/doc/munge/README.Debian for instructions to generate more secure key.
Created symlink /etc/systemd/system/multi-user.target.wants/munge.service → /lib/systemd/system/munge.service.
invoke-rc.d: could not determine current runlevel
Setting up libltdl7:amd64 (2.4.6-2) ...
Setting up libmysqlclient20:amd64 (5.7.30-0ubuntu0.18.04.1) ...
Setting up liblua5.1-0:amd64 (5.1.5-8.1build2) ...
Setting up freeipmi-common (1.4.11-1.1ubuntu4.1) ...
Setting up libfreeipmi16 (1.4.11-1.1ubuntu4.1) ...
Setting up ocl-icd-libopencl1:amd64 (2.2.11-1ubuntu1) ...
Setting up libslurmdb32 (17.11.2-1build1) ...
Setting up libsz2:amd64 (0.3.2-2) ...
Setting up libgfortran4:amd64 (7.5.0-3ubuntu1~18.04) ...
Setting up libhwloc5:amd64 (1.11.9-1) ...
Setting up libipmimonitoring5a (1.4.11-1.1ubuntu4.1) ...
Setting up libhwloc-plugins (1.11.9-1) ...
Setting up libhdf5-100:amd64 (1.10.0-patch1+docs-4) ...
Setting up slurm-wlm-basic-plugins (17.11.2-1build1) ...
Setting up slurmd (17.11.2-1build1) ...
update-alternatives: using /usr/sbin/slurmd-wlm to provide /usr/sbin/slurmd (slurmd) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/slurmd.service → /lib/systemd/system/slurmd.service.
invoke-rc.d: could not determine current runlevel
Setting up slurm-client (17.11.2-1build1) ...
Setting up slurmctld (17.11.2-1build1) ...
update-alternatives: using /usr/sbin/slurmctld-wlm to provide /usr/sbin/slurmctld (slurmctld) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/slurmctld.service → /lib/systemd/system/slurmctld.service.
invoke-rc.d: could not determine current runlevel
Setting up slurm-wlm (17.11.2-1build1) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.41) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...

> sudo apt install slurm-wlm-doc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  openjdk-11-jre
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  javascript-common libjs-jquery
Suggested packages:
  apache2 | lighttpd | httpd
The following NEW packages will be installed:
  javascript-common libjs-jquery slurm-wlm-doc
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1255 kB of archives.
After this operation, 3495 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 javascript-common all 11 [6066 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjs-jquery all 3.2.1-1 [152 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 slurm-wlm-doc all 17.11.2-1build1 [1097 kB]
Fetched 1255 kB in 0s (6313 kB/s)
Selecting previously unselected package javascript-common.
(Reading database ... 45534 files and directories currently installed.)
Preparing to unpack .../javascript-common_11_all.deb ...
Unpacking javascript-common (11) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../libjs-jquery_3.2.1-1_all.deb ...
Unpacking libjs-jquery (3.2.1-1) ...
Selecting previously unselected package slurm-wlm-doc.
Preparing to unpack .../slurm-wlm-doc_17.11.2-1build1_all.deb ...
Unpacking slurm-wlm-doc (17.11.2-1build1) ...
Setting up libjs-jquery (3.2.1-1) ...
Setting up javascript-common (11) ...
Setting up slurm-wlm-doc (17.11.2-1build1) ...
# Now copy the configuration generator file over to the C partition
cp /usr/share/doc/slurm-wlm-doc/html/configurator.easy.html /mnt/c/Users/Administrator/
# adapt the hostname
hostname ubuwls
# prepare startup of SLURM
mkdir -p /var/spool/slurm-llnl
chown -R slurm:slurm /var/spool/slurm-llnl
# check if SLURM Ctld can start up properly
slurmctld-wlm -D

To finalize the SLURM configuration we load the config file into your browser from file:///C:/Users/Administrator/configurator.easy.html:

You can mostly use the defaults for the settings on this page. We suggest to make the following adjustments:

  1. Make sure the hostname of the system is ControlMachine and NodeName
  2. State Preservation: set StateSaveLocation to /var/spool/slurm-llnl
  3. Process tracking: use Pgid instead of Cgroup
  4. Event logging: this is more of a personal preference as to whether you want the logging to be sent to the standard system log (/var/log/syslog), or if you would like it saved to its own unique file to keep it clearer to read (e.g. /var/log/slurm-llnl/SlurmctldLogFile)

And click “submit” at the end of the page. Now copy what is generated on this page to a new slurm.conf file: cat > /etc/slurm-llnl/slurm.conf

Please verify that your hostname (in case you changed it) is updated in the /etc/hosts file so that SLURM can identify the node.

# Start slurmctld and slurmd (they are already enabled to start on boot)
# On WSL systemctl is not enabled
#    sudo systemctl start slurmctld
#    sudo systemctl start slurmd
#    sudo systemctl status slurmctld
# so we use standard startup
/etc/init.d/munge start
/etc/init.d/slurmctld start
/etc/init.d/slurmd start
# If slurmctld or slurmd is giving us problems, let’s start it interactively and check the debug output:
# slurmctld -Dcvvv
# https://github.com/Microsoft/WSL/issues/2761: SO_RCVLOWAT not yet implemented in WSL
root>:/etc/slurm-llnl# srun hostname
srun: error: Unable to set low water socket option: Protocol not available
ubuwls

SLURM on WSL should be up and running well:

In case you want to build SLURM on Ubuntu on WSL:

# Build SLURM on UBU WLS
# wget SLURM source
wget https://download.schedmd.com/slurm/slurm-20.02.3.tar.bz2
tar xfvj slurm-20.02.3.tar.bz2
sudo apt install python3 gcc openssl lua5.3 man2html make
cd slurm*
./configure
make
sudo make install

In this guide we have installed the Windows Subsystem for Linux to host Ubuntu where we can install EnginFrame, NEUTRO Windows session scheduler as well as the SLURM scheduler. The process is very smooth and EnginFrame and NEUTRO are running perfectly inside WSL.

Any questions just let us know.