# Maui Scheduler Integration Guide

## Overview

Maui configuration is quite complicated and is really beyond the scope of any documents we could supply with SLURM. The best resource for Maui configuration information is the online documents at Cluster Resources Inc.: http://www.clusterresources.com/products/maui/docs/mauiadmin.shtml.

## Configuration

First, download the Maui scheduler kit from their web site http://www.clusterresources.com/pages/products/maui-cluster-scheduler.php. Note: maui-3.2.6p9 has been validated with SLURM, other versions should also work properly. We anticipate the Maui Scheduler to be upgraded to utilize a more extensive interface to Slurm in early 2007. The newer Maui Scheduler will be able to utilize a more ful featured interface to Slurm as descripted in the Moab Cluster Suite Integration Guide. This guide will be upgrade at that time.

### Maui configuration

Make sure that SLURM is installed and running before building Maui. Then build Maui from its source distribution. This is a two step process:

1. ./configure --with-key=42 --with-wiki
2. gmake

The key of 42 is arbitrary. You can use any value, but will need to specify the same value as a SLURM configuration parameter. Maui developers have assured us the authenticaion key will eventually be set in a configuration file rather than at build time.

Update the Maui configuration file maui.conf (Copy the file maui-3.2.6p9/maui.cfg.dist to maui.conf). Add the following configuration paramters to maui.conf:

    RMCFG[host]       TYPE=WIKI
    RMPORT            7321            # or whatever you choose as a port
    RMHOST            host
    RMAUTHTYPE[host]  NONE

host is the hostname where the SLURM controller is running. This must match the value of ControlMachine configured in slurm.conf. Note that localhost doesn't work. If you run Maui and SLURM on the same machine, you must specify the actual host name. The above example uses a TCP port number of 7321 for communications between SLURM and Maui, but you can pick any port that is available and accessible. You can also set a polling interval with

    RMPOLLINTERVAL  00:00:20

It may be desired to have Maui poll SLURM quite often -- in this case every 20 seconds. Note that a job submitted to an idle cluster will not be initiated until the Maui daemon polls SLURM and decides to make it run, so the value of RMPOLLINTERVAL should be set to a value appropriate for your site considering both the desired system responsiveness and the overhead of executing Maui daemons too frequently.

In order for Maui to be able to access your SLURM partition, you will need to define in maui.conf a partition with the same name as the SLURM partition(s). For example if nodes "linux[0-3]" are in SLURM partition "PartA", slurm.conf includes a line of this sort:

    PartitionName=PartA Default=yes Nodes=linux[0-3]

The add the corresponding lines to maui.cfg:

    PARTITIONMODE ON
    NODECFG[linux0]   PARTITION=PartA
    NODECFG[linux1]   PARTITION=PartA
    NODECFG[linux2]   PARTITION=PartA
    NODECFG[linux3]   PARTITION=PartA

Set the following environment variables and path:

    set path=(/root/MAUI/maui-3.2.6p9/bin $path)
    setenv MAUIHOMEDIR /root/MAUI/maui-3.2.6p9

### SLURM configuration

Set the slurm.conf scheduler parameters as follows:

    SchedulerType=sched/wiki
    SchedulerPort=7321
    SchedulerAuth=42 (for Slurm version 1.1 and earlier only)

In this case, "SchedulerAuth" has been set to 42, which was the authenticaiton key specified when Maui was configured above. Just make sure the numbers match.

For Slurm version 1.2 or higher, the authentication key is stored in a file specific to the wiki-plugin named wiki.conf. This file should be protected from reading by users. It only needs to be readable by SlurmUser (as configured in slurm.conf) and only needs to exist on computers where the slurmctld daemon executes. More information about wiki.conf is available in a man page distributed with SLURM, although that includes a description of keywords presently only supported by the sched/wiki2 plugin for use with the Moab Scheduler.

Only two wiki.conf parameters are used by the sched/wiki plugin: AuthKey should match the key used to configure Maui at build time and ExcludePartitions can be used for SLURM to directly schedule jobs in select partitions without Maui control. Jobs scheduled directly by SLURM will be initiated on a First-Come-First-Served basis. Note that Maui's use of an authentication key with SLURM is still under development. Note that SLURM's wiki plugin does not include a mechanism to submit new jobs, so even without this authentication key nobody could run jobs as another user. If that support is not in place and SLURM is configured with an AuthKey then communications between Maui and SLURM will fail and the SlurmctldLog file will contain errors of this sort: error: wiki: request lacks AUTH=. If you see this error, remove AuthKey from SLURM's configuration.

Here is a sample wiki.conf file

    # wiki.conf
    # SLURM's wiki plugin configuration file
    #
    # Matches Maui's --with-key configuration parameter
    AuthKey=42
    #
    # SLURM to directly schedule "debug" partition
    ExcludePartitions=debug

Last modified 19 September 2007