Using SPS

Running SPS Interactively

You can simply start sps interactively. If it is started outside a SLURM job it will write the time series to a directory sps-local in the current working directory otherwise the output directory will contain the job ID or array job and task IDs. Once done run sps-stop to stop sps and produce the output plots.

Adding SPS to a Job Script

Instead of running the profiler automatically for every job using the SPS SPANK Plugin you can also add the programs to your job script:

#!/bin/bash

# optionally set the prefix where sps will put the output
# directory. This is particularly useful when your script
# changes directory.
export SPS_PREFIX=~

# start SPS profiler
sps

# run the job tasks

# stop the profiler and produce the plots
sps-stop

You only need to set the SPS_PREFIX when you want to store the output in a particular location or if your script changes directory.

SPS SPANK Plugin

SPS can be started by a SPANK plugin. This allows the profiler to be started automatically by slurm. To run SPS automatically for every job add the line:

optional /usr/lib64/slurm/launch_sps.so

to the /etc/slurm/plugstack.conf file. Call the sps-stop from the task epilog script, e.g. set:

TaskEpilog=/usr/bin/sps-stop