Skip to content
kshsongPublic

About

interactively switch to the working directory of a running or queued Slurm job

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

sqcd

This is a Bash utility script that allows users to interactively switch to the working directory of a running or queued Slurm job. It simplifies navigation and debugging in Slurm-based HPC environments.

🧰 Features

  • Lists all jobs submitted by the current user
  • Displays job details including JobId, JobName, WorkDir, NodeList, JobState, and UserId
  • Interactively selects a job and changes to its working directory
  • Provides helpful messages and error handling

🔧 Prerequisites

  • Must be executed in an environment with Slurm installed
  • The scontrol command must be available
  • User must have active or queued jobs to interact with

📦 Usage

  1. Put it into the scripts directory
chmod +x sqcd.sh
cp -f sqcd.sh  ~/scripts/
echo "alias sqcd='source ~/scripts/sqcd.sh'" >> ~/.bashrc
source ~/.bashrc
  1. Use sqcd everywhere
$ sqcd
Querying job information...
Current job list:
[1] JobId=123 JobName=test_script WorkDir=/home/user/test NodeList=node1 JobState=RUNNING UserId=user

Please enter the number of the job to switch to: 1
Switching to directory: /home/user/test
Switched successfully! Current directory: /home/user/test

About

interactively switch to the working directory of a running or queued Slurm job

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages