Summary and Schedule
Software Environments and Module Management
Sagehen HPC Cluster Workshop: Pomona College ITS
Welcome to the Software Environments and Module Management workshop! This course teaches you how to effectively use the module system (Lmod) and Python environments on Sagehen, Pomona College’s high-performance computing cluster.
Who This Course Is For
This workshop is designed for researchers and students who want to:
- Use complex scientific software on Sagehen without conflicts
- Manage multiple versions of the same software
- Create reproducible Python environments for your research
- Share your analysis workflow with collaborators
- Write robust batch scripts for long-running computations
What You’ll Learn
By the end of this workshop, you will be able to: - Use the Lmod module system to load and manage software - Find software and check documentation - Create and restore personal module collections - Build isolated Python environments using conda - Use virtual environments and pip effectively - Follow best practices for reproducible research computing
Workshop Structure
This workshop consists of six episodes covering:
- Lmod Basics: Understanding environment modules and core commands
- Finding Software: Discovering available modules and learning about them
- Managing Modules: Loading multiple modules, swapping versions, saving collections
- Conda Environments: Creating isolated Python/R environments
- Pip and Virtual Environments: Alternative Python package management
- Best Practices: Writing reproducible, shareable workflows
Each episode combines teaching with hands-on exercises. You’ll need SSH access to Sagehen and a text editor.
Cluster Information
Cluster: Sagehen (sagehen.hpc.pomona.edu) Job Scheduler: SLURM Module System: Lmod Default Shell: Bash Contact: its-hpc@pomona.edu Maintained by: Andrew Wilson, Director of Research Computing, ITS
Prerequisites
You should be comfortable with:
- Basic Linux command-line operations (navigating directories, running commands)
- Using SSH to connect to remote systems
- Using a text editor (vi, nano, VS Code, etc.)
Before You Start
You’ll need:
- An active Sagehen account with SSH access
- Basic familiarity with the Linux command line
- A terminal application (Terminal on macOS, PowerShell on Windows, or Linux terminal)
If you need an account, submit the HPC account request form; for password resets or other issues, contact its-hpc@pomona.edu.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Why Software Modules? |
Why do we need environment modules on shared computing systems? What is an environment module and how does it work? How does Lmod modify your shell environment? |
| Duration: 00h 15m | 2. Finding and Loading Modules |
How do I find specific software on Sagehen HPC? How do I load and unload modules? How do I learn what a module does before loading it? What if I need software that isn’t available? |
| Duration: 00h 40m | 3. Module Collections and Defaults |
How do I load multiple modules together? How do I switch between different versions of the same software? How can I save my module configuration and reload it later? How do I use modules in batch job scripts? |
| Duration: 01h 05m | 4. Introduction to Conda |
Why do I need Conda when I already have modules? How do I create an isolated Python environment? How do I activate and deactivate environments? |
| Duration: 01h 30m | 5. Creating Conda Environments |
How do I install packages into a conda environment? How do I use packages from conda-forge? How should I organize my environments? |
| Duration: 01h 55m | 6. Managing Conda Packages |
How do I export my environment for sharing? How do I recreate an environment from a file? How do I manage disk space used by environments? |
| Duration: 02h 15m | 7. pip and Virtual Environments |
When should I use pip instead of conda? What is a virtual environment and how is it different from conda? How do I manage dependencies with requirements.txt? |
| Duration: 02h 30m | 8. Combining Conda and pip |
How do I use pip inside a conda environment? How do I export an environment that uses both conda and pip packages? How do I use these combined environments in job scripts? |
| Duration: 02h 45m | 9. Environment Reproducibility |
How do I ensure my research is reproducible? What should I document about my software environment? How do I pin package versions? |
| Duration: 03h 05m | 10. Best Practices and Troubleshooting |
How do I avoid breaking my analysis when modules are updated? How do I clean up and avoid filling my disk quota? How should I test before submitting large jobs? How should I ask for help from the HPC team? |
| Duration: 03h 20m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Prerequisites
To participate in this workshop, you need:
- An active Sagehen HPC account with SSH access
- SSH client installed on your computer
- A text editor (vi, nano, or VS Code with remote SSH)
- Basic command-line familiarity
Connecting to Sagehen HPC
Windows
Use one of these tools:
PowerShell (Windows 10+): Same command as above
PuTTY: Download from https://www.putty.org/
Windows Subsystem for Linux (WSL): Install and use native SSH
Connect with PowerShell:
Verifying Your Setup
Once connected to Sagehen, verify the module system works:
You should see a long list of available modules organized by category. If you see an error like “module: command not found”, contact its-hpc@pomona.edu.
Creating a Workshop Directory
Create a space for this workshop:
BASH
$ mkdir -p workshop/software-environments
$ cd workshop/software-environments
$ pwd
/rhome/<myusername>/workshop/software-environments
Use this directory to save environment files and test scripts from the workshop.
No Special Installation Needed
Important: You do NOT need to install anything beforehand. All software (R, Python via miniconda3, compilers, etc.) is available as modules on Sagehen. This workshop teaches you how to use the existing software.
Getting Help
If you have connection issues:
- Check your internet connection
- Verify you’re using the correct username
- Confirm you’re within Pomona’s network or using VPN
- Email its-hpc@pomona.edu with your username and “SSH connection issue”
If you need your password reset:
- Use Pomona’s self-service password tool
- Or contact its-hpc@pomona.edu
Ready to Go!
If you can SSH to sagehen.hpc.pomona.edu and run
module avail, you’re ready to start the workshop.