This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository contains a unified SLURM batch script for launching Positron (an IDE) on Alpine (CU Boulder) and amc-bodhi (CU Anschutz) HPC clusters. The script allocates compute resources, provides SSH connection instructions, and includes a one-time setup subcommand.
The repository is intentionally minimal:
positron-remote.sh: Unified SLURM batch script supporting both Alpine and amc-bodhi clusters- Cluster-specific config (partition, memory, proxy host) via a
casestatement setupsubcommand automates SSH key exchange and scratch symlink creation- Cluster is selected via argument:
./positron-remote.sh alpineor./positron-remote.sh bodhi
- Cluster-specific config (partition, memory, proxy host) via a
- Uses a ProxyJump SSH configuration pattern to connect through the login node to the allocated compute node
Submit the job (the script self-submits to SLURM):
./positron-remote.sh alpine # Alpine (default)
./positron-remote.sh bodhi # amc-bodhiOne-time setup (run from local machine):
./positron-remote.sh setup alpine
./positron-remote.sh setup bodhiMonitor job status:
squeue -u $USERCancel the job when done:
scancel <JOB_ID>View connection info:
cat logs/positron-<JOB_ID>.outCluster-specific SLURM settings are passed via sbatch CLI overrides:
--time: Maximum job duration (currently 8 hours)--mem: Memory allocation (24gb Alpine, 20gb bodhi)--cpus-per-task: Number of CPU cores (currently 4)--partition: Cluster partition (amilan for Alpine, normal for bodhi)--qos: Quality of service tier
These parameters should be adjusted based on computational requirements. Alpine documentation: https://curc.readthedocs.io/en/latest/compute/alpine.html
When you run ./positron-remote.sh alpine:
- The script checks if it's running under SLURM (via the
POSITRON_SLURM_EXECenvironment variable) - If not, it submits itself to SLURM using
sbatchwith cluster-specific overrides and exits - The cluster name is passed to the SLURM execution via
POSITRON_CLUSTERenvironment variable - When SLURM runs the script on a compute node, it displays the SSH connection info in the log file
The script generates a temporary SSH config entry using:
- ProxyJump: Routes connection through the cluster's login node
- Dynamic hostname: Uses the allocated compute node's hostname
- Job-specific alias:
positron-{alpine|bodhi}-${SLURM_JOB_ID}for easy identification - ForwardAgent: Enables SSH agent forwarding for git operations on the compute node
This pattern enables Positron's Remote-SSH extension to connect directly to the compute node while respecting the cluster's security model.
- Positron or VS Code with Remote-SSH extension (recommended in
.vscode/extensions.json) - SSH key configured for cluster access (use
./positron-remote.sh setupto automate) - Access to Alpine or amc-bodhi HPC cluster