Package: cloudmesh-slurm
Documentation for cms SLURM installationAbstractDocumentation for cms SLURM installationAbstract1.0 Installation2.0 Method 1 - Install from Host3.0 Method 2 - Install on Manager4.0 Install Single-Node5.0 Manual Pages5.1 Manual Page for theslurmcommand1.0 InstallationThe installation takes around an hour to two hours,
for example, on a cluster of five Raspberry Pi 4
Model B computers.To use the cloudmesh SLURM command, one must have
cloudmesh installed by using the following
commands.We assume you are in a venv Python
environment. Ours is called (ENV3)(ENV3)you@yourlaptop$mkdir~/cm(ENV3)you@yourlaptop$cd~/cm(ENV3)you@yourlaptop$pipinstallcloudmesh-installer(ENV3)you@yourlaptop$cloudmesh-installergetpiInitialize the cms command:(ENV3)you@yourlaptop$cmshelpThen clone the cloudmesh-slurm repository:(ENV3)you@yourlaptop$cd~/cm(ENV3)you@yourlaptop$cloudmesh-installergetcmd5(ENV3)you@yourlaptop$gitclonehttps://github.com/cloudmesh/cloudmesh-slurm.git(ENV3)you@yourlaptop$cdcloudmesh-slurm(ENV3)you@yourlaptop$pipinstall-e.(ENV3)you@yourlaptop$cmshelpYou may proceed ifslurmshows in
the documented commands.After followingthe burn tutorialand ensuring that the cluster is online,
you have two methods of installing
SLURM.2.0 Method 1 - Install from HostYou can install SLURM on a cluster
by executing commands from the
host computer. The host computer
is the same computer that is
previously referred to asyou@yourlaptopand it is
used tosshinto the Pis.Use this command:cmsslurmpiinstallashost--hosts=red,red0[1-4]--mount=//dev//sdaThe--hostsparameter should
be edited to have the hostnames
of your manager and workers,
separated by comma.The--mountparameter should
point to the mount place of
your USB, inserted in the top-most
blue USB3.0 port (on Pi 4's),
andit will be formatted.The command may seem to hang
at certain points, but these
points should not last more
than 45 minutes and are likely
simply building from source.Once the script ends, you
can check if SLURM is installed
by issuing on the manager:srun --nodes=3 hostnameand replacing the--nodesparameter with the number
of workers.3.0 Method 2 - Install on ManagerThis method involves the user
logging into the manager viassh, installing cloudmesh
via:(ENV3)you@yourhostcomputer$sshred
pi@red$curl-Lshttp://cloudmesh.github.io/get/pi|sh-and then, after activating venv
and rebooting (as instructed in
console output), issue the
commands:(ENV3)you@yourhostcomputer$sshred
pi@red:~$cd~/cm
pi@red:~/cm$gitclonehttps://github.com/cloudmesh/cloudmesh-slurm.git
pi@red:~/cm$cdcloudmesh-slurm
pi@red:~/cm/cloudmesh-slurm$pipinstall-e.
pi@red:~/cm/cloudmesh-slurm$cmshelppi@red:~/cm/cloudmesh-slurm$cmsslurmpiinstall--workers=red0[1-4]--mount=/dev/sdaThe user mustsshback into
the manager after the cluster
reboots and perform the last
command (cms slurm pi install...)
3 more times. The script
will inform the user when
this is no longer necessary
and SLURM is fully installed.Notice this method does not
need two forward slashes in--mountbecause it is done
on Raspberry Pi OS and not
Windows.You can check if SLURM is installed
by issuing on the manager:srun --nodes=3 hostnameand replacing the--nodesparameter with the number
of workers.4.0 Install Single-NodeSingle-node installation, which is a SLURM cluster
with only one node, can be easily configured by
using the host command with the manager and
workers listed as the same hostname. In the
following example,redis the single-node.cmsslurmpiinstallashost--hosts=red,red--mount=//dev//sda5.0 Manual Pages5.1 Manual Page for theslurmcommandNote to execute the command on the command line you have to type incms slurmand not justslurm.slurm pi install as worker
      slurm pi example --n=NUMBER [COMMAND]
      slurm pi install as host [--os=OS] [--hosts=HOSTS] [--mount=MOUNT]

This command installs slurm on the current PI and also worker nodes if you specify them.

TODO: how can the master be made also a worker, e.g. The slurm without worker nodes example
      we want a new command for that "install as worker"

Arguments:
    COMMAND  the slurm command to be executed [default: salloc]

Options:
    -f                   specify the file
    --interactive        asks questions
    --os=OS              The operating system. SO far only RaspberryPiOS [default: RaspberryPiOS]

Description:

  Install:

    pip install cloudmesh-slurm
    cms help
    cms slurm pi install --interactive

  Example:
    cms slurm example --n=4 [COMMAND]

    MODE is one of salloc, srun, sbatch

    will run the command

      salloc -N 4 mpiexec python -m mpi4py.bench helloworld

    API:

      from cloudmesh.slurm.slurm import Slurm
      from cloudmesh.slurm import Slurm

      Slurm.install()

      in case you use self

      slurm = Slurm()    slef instead of Slurm
      slurm.install