CS 140 Cluster Walkthrough
Part 1: Logging in to Open OnDemand
For your convenience, the cluster can be accessed through a graphical user interface (GUI) called Open OnDemand. This interface will allow you to access all of the features you will need for today's CS 140 activity.
- Navigate to https://ondemand.hpc.uwec.edu (Requires on-campus or VPN connection).
- Enter your UWEC login and authenticate with Okta.
- Complete the first time sign-in process if you have never used the cluster before. * Follow the instructions on screen exactly. Make sure you accept all the terms of service.
Trouble with setup?
If you're struggling with first time sign-in or accepting the terms of service, try following our detailed guide at https://docs.hpc.uwec.edu/ood/first-time/
Part 2: Demo 1 - Linux + Interactive Job
-
Click on the "BOSE Cluster Shell Access" Pinned App.

-
You will be presented with something similar to this prompt. This is the main interface of a terminal/shell environment:

-
On first login, your shell runs on the cluster's head node named
bose. We want to change to a node that is meant to handle our work. We can achieve this through a program called Slurm, our job management software. Change to a new node by typing: -
Confirm you current working directory is correct. It should appear similar to
/data/users/<your-username>. Check by typing: -
Change your current working directory to the
my_cs140project folder by typing: -
Copy all files from the
course_filesdirectory into your current directory by typing:
Look Closely!
If you look closely, you'll see a period at the end. The period refers to "the current location", so we are saying copy everything ("*") under the course_files directory to the current directory.
- Confirm the files copied. The following command shows all files in your current directory. Type:
- Activate the cluster's Python module by typing:
- Assuming your files copied, there should be a file titled
run-script.py. The.pysignifies the file is a Python file. You can run its code with the following command: - Take note of the output. As mentioned, we used a software called Slurm when we typed the
sinteractcommand. Your output should show the specific details of your job.
NAMD Interactive Demo
- Load the module for NAMD (Nanoscale Molecular Dynamics)
- Go to the
demo_1directory - Run VMD using the following command:
- Wait two minutes for it to end.
-
Note the "PERFORMANCE:" block by looking at "XXX ns/days"
-
Finish it off by saying "I'm done" by exiting your job session on our cluster.
It should bring you back to the host named "bose". Keep this tab open for now and go back to the tab with Open OnDemand.
Part 3: Demo 2 - Jupyter
Back To OnDemand
Head back to the dashboard on Open OnDemand with all the tiles. This may be another tab in your browser.
Starting a Jupyter session
To use Jupyter, you must request resources from the cluster. First, click on the "Jupyter Notebook" tile on the OnDemand home screen. Once you click it, request the following resources on the next screen:
- Accounting Group: 2271.cs.140.001 or 2271.cs.140.002 or 2271.cs.140.003
- Slurm Partition: Week (7 days) - Default
- CPU Cores: 4
- Memory: 15G
- #GPU Cards: No GPUs - Default
- Number of Hours: 2 (This is how long Jupyter will run for before automatically stopping)
- Working Directory: (Leave this blank)
- Email Notifications: None - No Email
Double-check that all of your values are right, then click the blue Launch button.
Accessing your session
Once you launch the session, it will need to start. This can take some time, but once your session changes from "Starting" to "Running", click the blue Connect to Jupyter button.
Opening the demo notebook
Once you open Jupyter, you will be in your "Home Directory". You should see a folder called my_cs140. Open this folder, then click on the Demo-2.ipynb file inside. Once opened, you will be on the Jupyter Notebook screen, and you can now begin the demo.
Part 4: Demo 3 - Batch Job
Back to the command line interface on BOSE!

- Earlier we copied over files from
course_files. One of these files is titledrun-demo-3.sh. Look at the contents of this file by typing: Note the following section at the top of the file:This top section of the file is where we specify the resource requirements of our job.#!/bin/bash -l #SBATCH --partition=week #SBATCH --nodes=1 #SBATCH --time=60:00:00 #Time limit for this job #SBATCH --ntasks-per-node=8 #Number of CPU's Per node #SBATCH --job-name=NAMD_Demo_Job #Name of this job in work queue #SBATCH --output=job-%j.out #Output file name #SBATCH --error=job-%j.err #Error file name #SBATCH --mail-type=BEGIN,END #Email notification type (BEGIN, END, FAIL, ALL) # Where are we putting our files for the run of this demo? fileDir="demo_3_${SLURM_JOB_ID}_${SLURM_JOB_NUM_NODES}node_${SLURM_NTASKS}cores" # Copy the files we want to run to a separate folder cp -r demo_3 $fileDir # Go to that folder cd $fileDir # Load the NAMD application and run it. module load namd/3.0.1-mpi charmrun namd3 +p $SLURM_NTASKS +setcpuaffinity demo.namd > demo.out - Run the following command to submit
run-demo-3.shto Slurm using 8 CPU cores: - You can run another version of the job requesting 32 cores across 2 separate nodes (approx 6 1/2 minutes):
- Check your job's status by typing:
Note
myjobs will only show your job so long as it is actively running and hasn't finished or terminated yet.
- Return to the main dashboard of Open OnDemand and open up the Desktop App.
Part 5: Demo 4 - Visualization
- Open up Desktop app in Open OnDemand
- Settings:
- Accounting Group: 2271.cs.140.001 or 2271.cs.140.002 or 2271.cs.140.003
- Number of Hours: 2
- CPU Cores: 16
- Memory: 32G
- Use GPU Card: No - CPU Only
- Working Directory: (Leave this blank)
- Email Notifications: None - No Email
- Hit Launch and wait for the Desktop to initialize.
Starting A Program
- Before you launch the Desktop session you can reduce your compression and increase your image quality. (optional - just makes it look better)
- Launch the Desktop Session
- Start terminal by clicking the black icon in the top navigation ("MATE Terminal") or going to
Accessories --> System Tools --> MATE Terminal - Activate the program called VMD (Visual Molecular Dynamics) by typing:
- Navigate to your class files and list the files:
- Navigate to your generated Slurm job files by looking at the folder that starts with
demo_3_#####. This is where all of your files are that you just created.
Autocomplete The Folder Name
Save time and minimize typos by hitting tab to autocomplete after typing demo_3_. This autocompletes up until it is no longer unique, where you can hit tab twice to see the list of options.
- Look at all of the files that were created with
ls - Launch VMD running:
- Additional steps will be done with the rest of the class.