Goal: submit, monitor, and account for a tiny CPU job without computing on a login node.
Prerequisites: the public-key login test passes, the
Euler CPU Track is started, and my_share_info lists
the intended account.
Execution context: all commands run on an Euler login node - Bash.
1. Confirm Context And Share#
hostname
my_share_info
pwd
Expected result: the hostname begins with an Euler login-node name and
es_fuge appears for IDEAL Lab users.
2. Create The Tiny Script#
mkdir -p "$HOME/passport-euler/logs"
cd "$HOME/passport-euler"
cat > first-job.slurm <<'EOF'
#!/usr/bin/env bash
#SBATCH --job-name=passport-cpu
#SBATCH --account=es_fuge
#SBATCH --time=00:02:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=1G
#SBATCH --output=logs/%x_%j.out
#SBATCH --error=logs/%x_%j.err
set -euo pipefail
echo "job_id=$SLURM_JOB_ID"
echo "host=$(hostname)"
echo "cpus=$SLURM_CPUS_PER_TASK"
for number in 1 2 3 4 5; do
printf '%s squared is %s\n' "$number" "$((number * number))"
done
EOF
bash -n first-job.slurm
sed -n '1,80p' first-job.slurm
This intentionally requests one CPU, 1 GiB per CPU, two minutes, and no GPU.
3. Submit And Monitor#
job_id="$(sbatch --parsable first-job.slurm)"
printf 'Submitted job: %s\n' "$job_id"
squeue -j "$job_id"
If you notice an error in the script or request:
scancel "$job_id"
4. Inspect Output And Accounting#
After the job leaves squeue:
cat "logs/passport-cpu_${job_id}.out"
cat "logs/passport-cpu_${job_id}.err"
sacct -j "$job_id" \
--format=JobID,JobName%20,Account,State,ExitCode,Elapsed,AllocCPUS,ReqMem,MaxRSS
seff "$job_id"
The error file should be empty and the main job should complete. Accounting
may include .batch and .extern steps; that is normal.
Verification#
- The output hostname is a compute node, not the login node.
- The main job state is
COMPLETEDwith a successful exit code. - Exactly one CPU and no GPU were requested.
- You can explain
Elapsed,ReqMem,MaxRSS, and theseffsummary.
Common Failures And Safe Recovery#
- Invalid account: stop and confirm
my_share_info; do not guess an account. - Job pending: inspect
myjobs -j "$job_id"; do not submit duplicates. - Error log not empty: read the first meaningful error before changing resources.
- Accounting temporarily blank: wait briefly and rerun
sacct.
Understand Before Accepting AI Output#
- I read the script before submitting it.
- I recorded the real job ID.
- I know how to cancel it.
- I personally inspected output and accounting.
Evidence#
Record the script, job ID, state, exit code, elapsed time, requested memory,
MaxRSS, and a two-sentence interpretation. Do not include usernames, tokens,
private paths, or unrelated job history in a public location.
Ask For Help When#
The account is missing, the job cannot enter the queue, the state/exit code is unclear, or the login node was used accidentally for computation.