hbp_nrp_commons.cluster.LuganoVizCluster module

This script contains common code to launch services on the Lugano viz cluster.

class LuganoVizCluster(processes, gpus=0, timezone=None, reservation=None)[source]

Bases: object

Represents a SLURM allocation instance running on the Lugano viz cluster.

There is a wide usage of pexpect in this class because of the remote connections via ssh needed to access the Lugano machines. Every time a remote command is launched, expect() is used to match strings with the shell output in order to understand its status.

ALLOCATION_TIME = datetime.timedelta(seconds=36000)
CLUSTER_DIR_COPY = 'scp -r {src} bbpnrsoa@{node}.cscs.ch:{trg}'
CLUSTER_SLURM_FRONTEND = 'bbpviz1'
CLUSTER_SSH = 'ssh -M -K bbpnrsoa@{node}.cscs.ch'
CURRENT_NODES_COMMAND = 'squeue -u bbpnrsoa -t PENDING,RUNNING -h -o "%N"'
DEALLOCATION_COMMAND = 'scancel %s'
NODE_DOMAIN = '.cscs.ch'
SMALL_TIMEOUT = 2
TIMEOUT = 20
stop()[source]

Delete any temporary directory files and deallocate the node.