First 15 minutes on Mjolnir
This walkthrough takes you from a freshly approved account to a completed job and its output. You do not need to know Slurm beforehand.
You need an approved account (Request access) and a connection to the UCPH VPN (VPN and SSH access).
1. Connect#
Connect to the UCPH VPN with Cisco AnyConnect, then:
ssh <KU-ID>@mjolnirgate.unicph.domainReplace <KU-ID> with your KU user ID and use your KU password.
2. See where you have landed#
hostnameYou are on the login node. This machine is shared with everyone logged in right now, and it is for preparing work — not running it. See Login nodes vs compute nodes.
3. Find your working location#
ls /projects/You can enter the projects you have been given access to — project access is assigned through your PI or project membership, not something you set up yourself. Move into your own area within that project:
cd /projects/<project>/people/<KU-ID>Replace <project> with the project you were assigned to, and <KU-ID> with your own KU user ID. Your home directory is capped at 100 GB and is not the place for analyses — Where should my files go? explains the layout. If you need to bring data with you, see Data transfer.
Note If the project or your personal folder inside it isn't there, don't create it yourself — raise it through Getting help.
4. Understand what happens next#
Note If you want the whole picture first, How Mjolnir works shows the path from login to compute node in one diagram.
You will not run your analysis by typing it at the prompt. You describe it in a small script and hand that to Slurm, the scheduler. Slurm finds a compute node with the resources you asked for and runs your script there — possibly immediately, possibly after a wait.
5. Write a first job script#
Create a file called first-job.sh:
#!/bin/bash
#SBATCH --job-name=first-job
#SBATCH --partition=cpuqueue
#SBATCH --qos=normal
#SBATCH --nodes=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=1G
#SBATCH --time=00:05:00
#SBATCH --output=first-job-%j.out
echo "Job $SLURM_JOB_ID running on $(hostname)"
echo "Working directory: $(pwd)"
echo "Allocated CPUs: $SLURM_CPUS_PER_TASK"
sleep 30
echo "Finished at $(date)"Important --qos is mandatory on Mjolnir. A job submitted without it is rejected. If you copy a script written before March 2025, this is the line it will be missing.
The %j in the output filename is replaced with the job ID, so repeated runs do not overwrite each other. Submitting jobs explains each directive.
6. Submit it#
sbatch first-job.shSlurm replies with the job ID:
Submitted batch job 12345677. Check its state#
squeue -u $USERThe ST column shows the state — PD while pending, R while running. The last column shows either the node it is running on, or the reason it is waiting.
An empty result means the job has finished. See Monitoring jobs for more.
8. Read the output#
When the job finishes, its output is in the file you named:
cat first-job-*.outYou should see the compute node's hostname — a different machine from the login node you typed on. That is the whole point: your work ran on compute resources.
9. If it stays pending#
Pending is normal on a shared cluster, and usually means your job is queued behind others rather than that anything is wrong. To see why:
squeue -u $USER -o "%.10i %.8T %R"Why is my job pending? explains the common reasons and which ones need action from you.
10. Know where to get help#
Formal support goes through the Support Center — see Getting help. Include your job ID, the command you ran, and the error text.
Where to go next#
| To do this | Read |
|---|---|
| Understand job scripts properly | Submitting jobs |
| Watch and inspect running jobs | Monitoring jobs |
| Choose the right partition and resources | Partitions, QoS, and fairshare |
| Decide where data belongs | Where should my files go? |
