<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://info.stat.cmu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Areinhar</id>
	<title>Stat DS Computing Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://info.stat.cmu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Areinhar"/>
	<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Special:Contributions/Areinhar"/>
	<updated>2026-11-05T09:05:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=1009</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=1009"/>
		<updated>2026-10-23T14:22:16Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Connecting and setting up your environment */ warn about no backups&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [[wikipedia:Sewall_Wright|Wright]]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
**Statistics &amp;amp; Data Science accounts are limited to 5TB of space. More can be requested if required.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Danger! Files are not backed up ===&lt;br /&gt;
Wright&#039;s storage cluster is &#039;&#039;&#039;not backed up.&#039;&#039;&#039; You may lose data if a disk fails. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Keep your code backed up in another location (such as by pushing it to GitHub regularly)&lt;br /&gt;
* Do not use Wright for long-term storage of important data. Download local copies, push it to HuggingFace, or sync it to your Google Drive&lt;br /&gt;
* Consider using an online backup tool like [https://www.borgbackup.org/ Borg] or [https://www.tarsnap.com/ Tarsnap] to regularly back up your home directory&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three main partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;The main partitions will only accept jobs from users in the corresponding department&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. Partitions correspond to nodes, so this ensures each department&#039;s jobs use their own node.  &lt;br /&gt;
&lt;br /&gt;
If you want to use other nodes, you can submit jobs to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. This requests any available node from any partition, so your job will run on whichever node has resources available. However, your job will have lower priority, as described below; if your all job runs on the philosophy node, a user who submits to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; can preempt your job, causing it to be killed to make room for them, then restarted after their job is done. See Job Etiquette below for when to use &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If you want to use a specific node within &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; you can specify the node within your submit script as shown below.&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --nodelist=n03&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Partitions have different quality-of-service (QOS) values that affect their prioritization, and Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. The fair-sharing system assigns them a lower priority, because you have run so many jobs, and jobs submitted by other users will run first.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Someone else submits Job B to &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition has lower QOS, so Job B will get to use the StatDS node first, and Job A will either wait or use a different node.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. It begins to run on the philosophy node. Someone else submits Job B to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt;, and there are insufficient resources to run both at the same time. Job A is killed, Job B runs, and Job A is placed back into the queue to be run when resources are available.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* For ordinary one-off jobs, use your department&#039;s partition so you get top priority for your node.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
=== Job limits ===&lt;br /&gt;
There is no practical limit to the number of jobs you can have in the queue at a time (there is a maximum size limit for job arrays that can be checked via &amp;lt;code&amp;gt;scontrol show config | grep MaxArraySize&amp;lt;/code&amp;gt;. However, in order to prevent resource monopolization, &#039;&#039;&#039;no user can have more than 6 jobs running at once on the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&#039;&#039;&#039; If a user submits more than 6 jobs to the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition, the excess jobs will sit in the queue until one or more of the first 6 are completed. &#039;&#039;&#039;This limit does not apply to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition&#039;&#039;&#039;, so we encourage users with a large number of jobs to use the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition instead of the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;br /&gt;
&lt;br /&gt;
== Citing Wright ==&lt;br /&gt;
If you use Wright in your research, please make sure to cite it with the text provided below...&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;This research was supported through the computational resources and staff contributions to the Wright HPC GPU cluster at Carnegie Mellon&#039;s Dietrich College of Humanities and Social Sciences provisioned and supported by the Department of Statistics &amp;amp; Data Science, the Department of Philosophy, The Carnegie Mellon Institute for Strategy and Technology, and the Dietrich College Dean&#039;s Office.&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=953</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=953"/>
		<updated>2026-08-21T14:24:45Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: fix category link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:Wright Cluster]]&lt;br /&gt;
&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three main partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;The main partitions will only accept jobs from users in the corresponding department&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. Partitions correspond to nodes, so this ensures each department&#039;s jobs use their own node.  &lt;br /&gt;
&lt;br /&gt;
If you want to use other nodes, you can submit jobs to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. This requests any available node from any partition, so your job will run on whichever node has resources available. However, your job will have lower priority, as described below; if your all job runs on the philosophy node, a user who submits to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; can preempt your job, causing it to be killed to make room for them, then restarted after their job is done. See Job Etiquette below for when to use &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If you want to use a specific node within &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; you can specify the node within your submit script as shown below.&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --nodelist=n03&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Partitions have different quality-of-service (QOS) values that affect their prioritization, and Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. The fair-sharing system assigns them a lower priority, because you have run so many jobs, and jobs submitted by other users will run first.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Someone else submits Job B to &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition has lower QOS, so Job B will get to use the StatDS node first, and Job A will either wait or use a different node.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. It begins to run on the philosophy node. Someone else submits Job B to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt;, and there are insufficient resources to run both at the same time. Job A is killed, Job B runs, and Job A is placed back into the queue to be run when resources are available.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* For ordinary one-off jobs, use your department&#039;s partition so you get top priority for your node.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
=== Job limits ===&lt;br /&gt;
There is no practical limit to the number of jobs you can have in the queue at a time (there is a maximum size limit for job arrays that can be checked via &amp;lt;code&amp;gt;scontrol show config | grep MaxArraySize&amp;lt;/code&amp;gt;. However, in order to prevent resource monopolization, &#039;&#039;&#039;no user can have more than 6 jobs running at once on the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&#039;&#039;&#039; If a user submits more than 6 jobs to the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition, the excess jobs will sit in the queue until one or more of the first 6 are completed. &#039;&#039;&#039;This limit does not apply to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition&#039;&#039;&#039;, so we encourage users with a large number of jobs to use the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition instead of the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=952</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=952"/>
		<updated>2026-08-21T14:23:59Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Job etiquette */ clarify prioritization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[index.php?title=Category:Wright Cluster]]&lt;br /&gt;
&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three main partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;The main partitions will only accept jobs from users in the corresponding department&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. Partitions correspond to nodes, so this ensures each department&#039;s jobs use their own node.  &lt;br /&gt;
&lt;br /&gt;
If you want to use other nodes, you can submit jobs to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. This requests any available node from any partition, so your job will run on whichever node has resources available. However, your job will have lower priority, as described below; if your all job runs on the philosophy node, a user who submits to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; can preempt your job, causing it to be killed to make room for them, then restarted after their job is done. See Job Etiquette below for when to use &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If you want to use a specific node within &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; you can specify the node within your submit script as shown below.&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --nodelist=n03&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Partitions have different quality-of-service (QOS) values that affect their prioritization, and Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. The fair-sharing system assigns them a lower priority, because you have run so many jobs, and jobs submitted by other users will run first.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Someone else submits Job B to &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition has lower QOS, so Job B will get to use the StatDS node first, and Job A will either wait or use a different node.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. It begins to run on the philosophy node. Someone else submits Job B to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt;, and there are insufficient resources to run both at the same time. Job A is killed, Job B runs, and Job A is placed back into the queue to be run when resources are available.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* For ordinary one-off jobs, use your department&#039;s partition so you get top priority for your node.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
=== Job limits ===&lt;br /&gt;
There is no practical limit to the number of jobs you can have in the queue at a time (there is a maximum size limit for job arrays that can be checked via &amp;lt;code&amp;gt;scontrol show config | grep MaxArraySize&amp;lt;/code&amp;gt;. However, in order to prevent resource monopolization, &#039;&#039;&#039;no user can have more than 6 jobs running at once on the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&#039;&#039;&#039; If a user submits more than 6 jobs to the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition, the excess jobs will sit in the queue until one or more of the first 6 are completed. &#039;&#039;&#039;This limit does not apply to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition&#039;&#039;&#039;, so we encourage users with a large number of jobs to use the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition instead of the &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=915</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=915"/>
		<updated>2026-07-07T15:03:39Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Department Servers]]&lt;br /&gt;
[[Category:Wright Cluster]]&lt;br /&gt;
[[Category:PSC]]&lt;br /&gt;
[[Category:Remote Server Access]]&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
== What computing resources do you have access to ==&lt;br /&gt;
&lt;br /&gt;
=== Your personal computer ===&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. &lt;br /&gt;
#Install whatever you want.&lt;br /&gt;
#Nobody else is hogging it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
* capacity:&lt;br /&gt;
**few cores: 4-8 cores common on laptops (hyperthreading means 8-16 “cores”).&lt;br /&gt;
**low RAM: 4-32 GB of common on laptops, used across all cores&lt;br /&gt;
**“no” GPUs: you don’t have GPUs that are optimized for Deep Learning&lt;br /&gt;
*You&#039;re using your laptop for other things, and running a big job will slow everything down when you&#039;re trying to do your homework&lt;br /&gt;
*If your job lasts many hours, you may have to leave your laptop at home or leave it running overnight; or you may have problems when you close your laptop to take the bus.&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|This does not have to be you (though it&#039;s good to take breaks) https://xkcd.com/303/|alt=]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
=== The department servers ===&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The Leviathans and Hydras have more RAM than a typical laptop. The Leviathans also have top-of-the-line CPUs that should be faster than most laptops, though the Hydras have older CPUs that may not be faster than running code on your own laptop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long-running jobs&lt;br /&gt;
#Plenty of RAM per machine (128 GB on Leviathans + hydra7 and 8, 64 GB on other hydras)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started)&lt;br /&gt;
#File management system shares across all servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12 (Hydras) or 16 (Leviathans)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Leviathan Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
== Computing resource flowchart ==&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
[[File:ProblemsOnYourPersonalComputerUpdated.png|center|thumb|1000x1000px]]&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=914</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=914"/>
		<updated>2026-07-07T15:03:28Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Department Servers]]&lt;br /&gt;
[[Category:Wright Cluster]]&lt;br /&gt;
[[Category:PSC]]&lt;br /&gt;
[[Category:Remote Server Access]]&lt;br /&gt;
&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
== What computing resources do you have access to ==&lt;br /&gt;
&lt;br /&gt;
=== Your personal computer ===&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. &lt;br /&gt;
#Install whatever you want.&lt;br /&gt;
#Nobody else is hogging it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
* capacity:&lt;br /&gt;
**few cores: 4-8 cores common on laptops (hyperthreading means 8-16 “cores”).&lt;br /&gt;
**low RAM: 4-32 GB of common on laptops, used across all cores&lt;br /&gt;
**“no” GPUs: you don’t have GPUs that are optimized for Deep Learning&lt;br /&gt;
*You&#039;re using your laptop for other things, and running a big job will slow everything down when you&#039;re trying to do your homework&lt;br /&gt;
*If your job lasts many hours, you may have to leave your laptop at home or leave it running overnight; or you may have problems when you close your laptop to take the bus.&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|This does not have to be you (though it&#039;s good to take breaks) https://xkcd.com/303/|alt=]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
=== The department servers ===&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The Leviathans and Hydras have more RAM than a typical laptop. The Leviathans also have top-of-the-line CPUs that should be faster than most laptops, though the Hydras have older CPUs that may not be faster than running code on your own laptop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long-running jobs&lt;br /&gt;
#Plenty of RAM per machine (128 GB on Leviathans + hydra7 and 8, 64 GB on other hydras)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started)&lt;br /&gt;
#File management system shares across all servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12 (Hydras) or 16 (Leviathans)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Leviathan Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
== Computing resource flowchart ==&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
[[File:ProblemsOnYourPersonalComputerUpdated.png|center|thumb|1000x1000px]]&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=913</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=913"/>
		<updated>2026-07-07T15:02:47Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:Department Servers]]&lt;br /&gt;
[[Category:Wright Cluster]]&lt;br /&gt;
[[Category:PSC]]&lt;br /&gt;
[[Category:Remote Server Access]]&lt;br /&gt;
&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
== What computing resources do you have access to ==&lt;br /&gt;
&lt;br /&gt;
=== Your personal computer ===&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. &lt;br /&gt;
#Install whatever you want.&lt;br /&gt;
#Nobody else is hogging it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
* capacity:&lt;br /&gt;
**few cores: 4-8 cores common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt; (hyperthreading means 8-16 “cores”).&lt;br /&gt;
**low RAM: 4-32 GB of common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt;, used across all cores&lt;br /&gt;
**“no” GPUs: you don’t have GPUs that are optimized for Deep Learning&lt;br /&gt;
*You&#039;re using your laptop for other things, and running a big job will slow everything down when you&#039;re trying to do your homework&lt;br /&gt;
*If your job lasts many hours, you may have to leave your laptop at home or leave it running overnight; or you may have problems when you close your laptop to take the bus.&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|This does not have to be you (though it&#039;s good to take breaks) https://xkcd.com/303/|alt=]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
=== The department servers ===&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The Leviathans and Hydras have more RAM than a typical laptop. The Leviathans also have top-of-the-line CPUs that should be faster than most laptops, though the Hydras have older CPUs that may not be faster than running code on your own laptop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long-running jobs&lt;br /&gt;
#Plenty of RAM per machine (128 GB on Leviathans + hydra7 and 8, 64 GB on other hydras)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started)&lt;br /&gt;
#File management system shares across all servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12 (Hydras) or 16 (Leviathans)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Leviathan Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
== Computing resource flowchart ==&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
[[File:ProblemsOnYourPersonalComputerUpdated.png|center|thumb|1000x1000px]]&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Building_Workflows_on_Remote_Servers&amp;diff=912</id>
		<title>Building Workflows on Remote Servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Building_Workflows_on_Remote_Servers&amp;diff=912"/>
		<updated>2026-07-07T14:25:41Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Beginner&#039;s_Guide_Scaling|01]]&lt;br /&gt;
{{ScalingSidebar}}&lt;br /&gt;
&lt;br /&gt;
Even with perfect parallelization, research experiments can quickly scale beyond the capabilities of any personal computing device. Thus, most workflows with high computing requirements are often performed on High-Performance Computing (HPC) clusters, which are dedicated servers for large computational workloads. These servers often have hardware orders of magnitude faster than personal devices.&lt;br /&gt;
&lt;br /&gt;
Students in the CMU Department of Statistics and Data Science have access to several HPC clusters. Each cluster is configured for various types and sizes of workflows.&lt;br /&gt;
&lt;br /&gt;
Back to [[Beginner&#039;s Guide to Computation in Statistical Research]]&lt;br /&gt;
&lt;br /&gt;
== 1. Department Servers ==&lt;br /&gt;
The department wholly owns and operates a small HPC cluster, composed of several CPU-only nodes known as the Leviathans, and a few GPU nodes known as the Ghidorahs. The department cluster is suitable for modest sized workflows that would be too slow to run on a personal device. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; margin-bottom: 20px; margin-top: 15px; overflow: hidden;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important: Resource Limits&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
If your workflow requires continual, simultaneous use of multiple Leviathans or Ghidorahs, we strongly recommend migrating to the external shared servers in the next section to ensure fair use for all students.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6c757d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Linux and department servers]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces basic Linux commands and instructions for connecting to the department servers. Start here for all server-based workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #75AADB; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[R on the server]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Demonstrates how to run R scripts and RStudio on the department servers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Python on the server]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Demonstrates how to run Python scripts and Jupyter notebooks on the department servers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2. External Shared Servers ==&lt;br /&gt;
Students in the department also have access to other HPC resources that are shared between departments and institutions. These clusters are built for massive parallelization and GPU-intensive workloads.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #dc3545; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Slurm]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces the job scheduling system used on larger HPC clusters (like Wright and PSC). Essential reading for medium to large-scale server workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #28a745; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[GPU Cluster | Wright GPU Cluster]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The manual for accessing and using the Wright cluster. Ideal for large-scale, GPU-heavy server workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6f42c1; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[PSC]] (Incomplete)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Instructions for accessing and using the Pittsburgh Supercomputing Center (PSC) servers for massive-scale computing.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3. Other Useful Tools ==&lt;br /&gt;
Below are some useful tools and tricks for streamlining your work on any remote server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[VS Code Remote]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces the VS Code Remote plugin, which allows you to edit files and run terminals using the full VS Code IDE experience directly on a remote server.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Python_on_the_server&amp;diff=911</id>
		<title>Python on the server</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Python_on_the_server&amp;diff=911"/>
		<updated>2026-07-07T14:25:17Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:IDEs]]&lt;br /&gt;
[[Category:Department Servers]]&lt;br /&gt;
[[Category:Wright Cluster]]&lt;br /&gt;
[[Category:PSC]]&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to run python on the server. To be the most productive coder, it’s important to understand how virtual environments can help product reproducibility and stability of your analysis ([[Python_virtual_environments|Python virtual environments]]) and how to keep running jobs even when you are not connected to the server ([[Terminal_multiplexers|Terminal Multiplexers]]). If you’re less aware than you’d like, we encourage you to visit either of these pages. General Linux commands and getting connected &amp;amp; passing files between you and the server can all be found on our [[Linux_and_department_servers|Linux and the department server page]].&lt;br /&gt;
&lt;br /&gt;
== Submitting jobs via the command line ==&lt;br /&gt;
&lt;br /&gt;
Before saving a code, you can start up python with a &amp;lt;code&amp;gt;ipython&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; call to the command line (possibly after activating a virtual environment). This will give you an interactive terminal to test python code out.&lt;br /&gt;
&lt;br /&gt;
Beyond this iterative coding / explorative approach, you may find that writing up complex analysis that requires running a large number of lines of code (without having to manually run) large jobs that you’d like to run on a server, a common approach is to write a &amp;lt;code&amp;gt;.py&amp;lt;/code&amp;gt; file to be run all at once, which can be done follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ipython filename.py&lt;br /&gt;
python filename.py&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Especially when it comes to code run on the server, it’s possible that you’d like to take in a few non-fixed parameters when you run your file. This can be done through the following approach (and is also documented in a tutorial: [https://www.geeksforgeeks.org/how-to-use-sys-argv-in-python/ geeksforgeeks]).&lt;br /&gt;
&lt;br /&gt;
In your python file (&amp;lt;code&amp;gt;filename.py&amp;lt;/code&amp;gt;) (often at the top) you deal with arguments passed in from the command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import sys&lt;br /&gt;
&lt;br /&gt;
input_arguments = sys.argv&lt;br /&gt;
arg1 = int(sys.argv[1]) # the first argument (sys.argv[0]) is the filename.&lt;br /&gt;
arg2 = sys.argv[2]&lt;br /&gt;
...&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you then ran the following in the command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ipython filename.py 1000 happy&lt;br /&gt;
python filename.py 1000 happy&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You’d then find the lines below &amp;lt;code&amp;gt;arg2 = sys.argv[2]&amp;lt;/code&amp;gt; would have &amp;lt;code&amp;gt;arg1 = 1000&amp;lt;/code&amp;gt; (an integer), and &amp;lt;code&amp;gt;arg2 = &amp;quot;happy&amp;quot;&amp;lt;/code&amp;gt;. Note that all parameters are pasted through as strings.&lt;br /&gt;
&lt;br /&gt;
=== interactive &amp;lt;code&amp;gt;ipython&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Especially since you’ll be doing more of these command line running of files, if you are not 100% sure your code will run as expected or would like to be able to manipulate some of the objects you’ve made after run your file you can run your scripts interactively. If the script fails (or just when it ends), you’ll obtain an interactive ipython / python output. Below are two examples of how to do so (just use the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ipython -i filename.py 1001 sad&lt;br /&gt;
python -i filename.py 1001 sad&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Jupyter notebooks via a server =&lt;br /&gt;
&lt;br /&gt;
You can still run jupyter notebooks from a server, which can be useful with large data sets, need for more computing power, or just the desire to not have your personal computer’s cores being taxed. Starting a jupyter notebook from the server is pretty simple, and we outline how to below ([https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh coderwall] is has a good resource).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first step is to initialize the notebook server just like you would on your own computer. On your remote server do: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;remote_server$ jupyter notebook --no-browser --port=8889&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you should think about be running this code after a &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; call so it lasts even if you close  / lose connection to the the connection that ran this call.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then on your local machine, you can run:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;local$ ssh -N -f -L localhost:8888:localhost:8889 user_id@remote_server&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, you can return to the server terminal you launched the jupyter notebook from and you’ll see something like:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;Copy/paste this URL into your browser when you connect for the first time,&lt;br /&gt;
to login with a token:&lt;br /&gt;
    http://localhost:8889/?token=13cc54b4a3e13877cb07211346a363f9147a8cf2109263f1&amp;amp;token=13cc54b4a3e13877cb07211346a363f9147a8cf2109263f1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Copy this address but substitute &amp;lt;code&amp;gt;8889&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;8888&amp;lt;/code&amp;gt; on your local machine’s web server.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;start coding&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=910</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=910"/>
		<updated>2026-07-07T14:22:28Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: formatting tweaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Department Servers]]&lt;br /&gt;
[[Category:Remote Server Access]]&lt;br /&gt;
&lt;br /&gt;
The department has two sets of servers, the Leviathans and the Hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or [[Wright GPU Cluster]].&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; All users - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 11 leviathan servers (named {&amp;lt;code&amp;gt;leviathan1&amp;lt;/code&amp;gt;, ..., &amp;lt;code&amp;gt;leviathan11&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;).&lt;br /&gt;
# The department provides 3 Ghidorah GPU servers (named {&amp;lt;code&amp;gt;ghidorah1&amp;lt;/code&amp;gt;, ..., &amp;lt;code&amp;gt;ghidorah3&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;).&lt;br /&gt;
# The Ghidorahs and Leviathans all share the same data file system. This allows you to upload a file to any of the servers and then have it on all of them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction to connecting to the server and useful Linux commands==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux and require you to interact with them remotely. While you can use a traditional command line, modern IDEs like VS Code also allow for highly integrated graphical interaction.&lt;br /&gt;
&lt;br /&gt;
===Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;)===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and execute code, you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;. Modern operating systems (including Mac, Linux, and Windows 10/11) have this tool built-in natively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Mac / Linux:&#039;&#039;&#039; Open up a &amp;lt;code&amp;gt;Terminal&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Windows:&#039;&#039;&#039; Open up &amp;lt;code&amp;gt;Windows PowerShell&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Windows Terminal&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your terminal, type: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@leviathan1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to type in your password. (Note: as you type, no characters will appear on the screen for security reasons. Just type it and hit Enter). If you don’t know your password or have never accessed the server before, email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu].&lt;br /&gt;
&lt;br /&gt;
If you’re accessing the servers frequently, we highly recommend setting up passwordless SSH (see below).&lt;br /&gt;
&lt;br /&gt;
=== Passwordless SSH ===&lt;br /&gt;
To connect to the server without typing in your password every time, you need to generate an SSH key pair. This creates a private key that stays securely on your laptop, and a public key that the servers use to recognize you.&lt;br /&gt;
&lt;br /&gt;
* Open up your terminal (Mac/Linux) or PowerShell (Windows).&lt;br /&gt;
* Check whether you already have a key pair by looking in your &amp;lt;code&amp;gt;.ssh&amp;lt;/code&amp;gt; folder (run &amp;lt;code&amp;gt;ls ~/.ssh&amp;lt;/code&amp;gt; on Mac/Linux, or &amp;lt;code&amp;gt;dir ~\.ssh&amp;lt;/code&amp;gt; on Windows). If you have files like &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;id_rsa&amp;lt;/code&amp;gt;, you already have a key pair and can skip to the upload step.&lt;br /&gt;
* To generate a new key pair, we recommend the Ed25519 algorithm. Run:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh-keygen -t ed25519&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Hit Enter to accept the default file location. When prompted for a passphrase, you can enter one for extra security or leave it empty for true passwordless login.&lt;br /&gt;
* Next, upload the public key to the remote server. Because the hydras and ghidorahs share a file system, you only need to do this once.&lt;br /&gt;
** &#039;&#039;&#039;For Mac/Linux:&#039;&#039;&#039; Use the built-in &amp;lt;code&amp;gt;ssh-copy-id&amp;lt;/code&amp;gt; command:&lt;br /&gt;
** &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh-copy-id andrew_id@leviathan1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;For Windows:&#039;&#039;&#039; Windows OpenSSH does not natively include the &amp;lt;code&amp;gt;ssh-copy-id&amp;lt;/code&amp;gt; command. Instead, use this PowerShell one-liner to securely copy your key over:&lt;br /&gt;
** &amp;lt;syntaxhighlight lang=&amp;quot;powershell&amp;quot;&amp;gt;Get-Content &amp;quot;$env:USERPROFILE\.ssh\id_ed25519.pub&amp;quot; | ssh andrew_id@leviathan1.stat.cmu.edu &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory on the server are strictly enforced, log into the server normally and run:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
===File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; + GUIs)===&lt;br /&gt;
&lt;br /&gt;
There are two primary ways to move files between your personal computer and the server: using the command line (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;) or using a graphical interface (like VS Code or Cyberduck).&lt;br /&gt;
&lt;br /&gt;
====Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
Because Windows now includes OpenSSH natively, the &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (secure copy) command works exactly the same across Mac, Linux, and Windows PowerShell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Copy from server to your computer&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp andrew_id@leviathan1.stat.cmu.edu:/path/to/remote/file.txt /local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
  To copy an entire folder, add the &amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; (recursive) flag:&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r andrew_id@leviathan1.stat.cmu.edu:/path/to/remote/folder/ /local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Copy from your computer to the server&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp /local/file.txt andrew_id@leviathan1.stat.cmu.edu:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====GUI “drag-and-drop” file sharing====&lt;br /&gt;
Many students prefer graphical user interfaces (GUIs) to transfer files instead of using the command line. These tools allow you to visually drag and drop files from your computer to the server (and vice-versa).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Visual Studio Code (Recommended for all OS):&#039;&#039;&#039; If you use VS Code with the Remote-SSH extension (see &amp;quot;Text Editors&amp;quot; below), you can simply drag and drop files from your desktop directly into the VS Code file explorer pane. This is the easiest and most integrated method.&lt;br /&gt;
* &#039;&#039;&#039;Mac:&#039;&#039;&#039; [https://cyberduck.io/ Cyberduck] remains a solid dedicated tool.&lt;br /&gt;
* &#039;&#039;&#039;Windows:&#039;&#039;&#039; [https://winscp.net/eng/download.php WinSCP] is a popular dedicated GUI, though legacy SSH clients like PuTTY are no longer necessary for modern Windows file transfers.&lt;br /&gt;
&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to navigate when you are on the server. Below are some basic commands to move around the file system and manipulate files.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!command&lt;br /&gt;
!translation&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
|print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
|remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
&amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
|move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
|copy file&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
|list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources geared toward statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Text editors and IDEs==&lt;br /&gt;
&lt;br /&gt;
Historically, editing code on a server required using terminal-based text editors. While still useful for quick changes, modern tools allow you to use a full graphical IDE on your laptop that computes natively on the server.&lt;br /&gt;
&lt;br /&gt;
=== Visual Studio Code (Highly Recommended) ===&lt;br /&gt;
[https://code.visualstudio.com/ Visual Studio Code] (VS Code) is the industry standard for remote development. By using the Microsoft &#039;&#039;&#039;Remote - SSH&#039;&#039;&#039; extension, you can connect VS Code directly to the department servers. &lt;br /&gt;
&lt;br /&gt;
# Install VS Code on your personal machine.&lt;br /&gt;
# Go to the Extensions tab and install &#039;&#039;&#039;Remote - SSH&#039;&#039;&#039;.&lt;br /&gt;
# Click the remote indicator (the green arrows) in the bottom-left corner of VS Code, select &amp;quot;Connect to Host...&amp;quot;, and type &amp;lt;code&amp;gt;andrew_id@leviathan1.stat.cmu.edu&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Once connected, you can open server folders, edit scripts with full syntax highlighting, run interactive terminal sessions, and drag-and-drop files between your laptop and the server all from within the VS Code window.&lt;br /&gt;
&lt;br /&gt;
=== Terminal Editors ===&lt;br /&gt;
If you only need to make a quick tweak to a file while already logged into the terminal, you can use built-in editors:&lt;br /&gt;
* &amp;lt;code&amp;gt;nano _filename_&amp;lt;/code&amp;gt;: A very simple, beginner-friendly text editor. Use &amp;lt;code&amp;gt;Ctrl+O&amp;lt;/code&amp;gt; to save and &amp;lt;code&amp;gt;Ctrl+X&amp;lt;/code&amp;gt; to exit.&lt;br /&gt;
* &amp;lt;code&amp;gt;vim _filename_&amp;lt;/code&amp;gt;: A highly powerful but steep-learning-curve text editor. &lt;br /&gt;
&lt;br /&gt;
==Using the servers respectfully==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
#Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
#If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
#Use &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; for jobs that require intense disk I/O operations&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Grafana dashboard for the hydras] and [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 for the Leviathans]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all.&lt;br /&gt;
&lt;br /&gt;
===Limiting the cores you use===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt;===&lt;br /&gt;
On department servers, your home directory (the default location you start in when you ssh) is not actually located on the physical server itself. Instead, every department server uses network attached storage (NAS), where everybody&#039;s home directly lives on a central storage server and the individual Leviathans and Ghidorahs connect to that storage server. This is the functionality that lets your files follow you no matter what node you log into.&lt;br /&gt;
&lt;br /&gt;
While computing processes on one server do not affect processes on other servers, every server shares the same NAS. Therefore, &#039;&#039;&#039;if a user is reading and writing a ton of data to their home directory, it will slow down reading and writing for everyone, even if you aren&#039;t on the same server as this user.&#039;&#039;&#039; Even if your job does not read or write much data, disk I/O slowdowns will affect common operations, such as ssh, importing packages, and uploading/downloading files.&lt;br /&gt;
&lt;br /&gt;
If you need to run a job that requires a ton of reading and writing data to disk, &#039;&#039;&#039;do not read/write using your home directory&#039;&#039;&#039;. Instead, use the &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; folder located on every server. This folder points to an SSD that is specific to that server. Not only will read and writes to &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; not affect users on other servers, but it will also be generally faster than using your home directory even if nobody else is online. &#039;&#039;&#039;If you plan to use&#039;&#039;&#039; &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt;&#039;&#039;&#039;, you should make a new folder inside of&#039;&#039;&#039; &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; &#039;&#039;&#039;first and put your data inside that folder. For example:&#039;&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /scratch&lt;br /&gt;
mkdir my_data # Default permission allows only you to modify contents&lt;br /&gt;
cd my_data&lt;br /&gt;
# Do stuff in my_data&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;It is also very important to remember that &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; &#039;&#039;&#039;is specific to each Leviathan and Ghidorah and will not follow you between servers&#039;&#039;&#039;. Thus, you should not use &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; for long-term storage or for important data. In addition, space on &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; is limited, so be sure to clean up your data once you don&#039;t need it anymore.&lt;br /&gt;
==Running jobs==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
# The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[terminal multiplexers]].&amp;amp;nbsp;&lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
==Server specs==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Building_Workflows_on_Remote_Servers&amp;diff=908</id>
		<title>Building Workflows on Remote Servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Building_Workflows_on_Remote_Servers&amp;diff=908"/>
		<updated>2026-07-07T14:19:51Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: use a grid of boxes instead of a sequence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Beginner&#039;s_Guide_Scaling|01]]&lt;br /&gt;
&lt;br /&gt;
{{ScalingSidebar}}&lt;br /&gt;
&lt;br /&gt;
Even with perfect parallelization, research experiments can quickly scale beyond the capabilities of any personal computing device. Thus, most workflows with high computing requirements are often performed on High-Performance Computing (HPC) clusters, which are dedicated servers for large computational workloads. These servers often have hardware orders of magnitude faster than personal devices.&lt;br /&gt;
&lt;br /&gt;
Students in the CMU Department of Statistics and Data Science have access to several HPC clusters. Each cluster is configured for various types and sizes of workflows.&lt;br /&gt;
&lt;br /&gt;
Back to [[Beginner&#039;s Guide to Computation in Statistical Research]]&lt;br /&gt;
&lt;br /&gt;
== 1. Department Servers ==&lt;br /&gt;
The department wholly owns and operates a small HPC cluster, composed of several CPU-only nodes known as the Leviathans, and a few GPU nodes known as the Ghidorahs. The department cluster is suitable for modest sized workflows that would be too slow to run on a personal device. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; margin-bottom: 20px; margin-top: 15px; overflow: hidden;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important: Resource Limits&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
If your workflow requires continual, simultaneous use of multiple Leviathans or Ghidorahs, we strongly recommend migrating to the external shared servers in the next section to ensure fair use for all students.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6c757d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Linux and department servers]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces basic Linux commands and instructions for connecting to the department servers. Start here for all server-based workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #75AADB; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[R on the server]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Demonstrates how to run R scripts and RStudio on the department servers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Python on the server]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Demonstrates how to run Python scripts and Jupyter notebooks on the department servers.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2. External Shared Servers ==&lt;br /&gt;
Students in the department also have access to other HPC resources that are shared between departments and institutions. These clusters are built for massive parallelization and GPU-intensive workloads.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #dc3545; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Slurm]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces the job scheduling system used on larger HPC clusters (like Wright and PSC). Essential reading for medium to large-scale server workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #28a745; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[GPU Cluster | Wright GPU Cluster]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The manual for accessing and using the Wright cluster. Ideal for large-scale, GPU-heavy server workflows.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6f42c1; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[PSC]] (Incomplete)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Instructions for accessing and using the Pittsburgh Supercomputing Center (PSC) servers for massive-scale computing.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3. Other Useful Tools ==&lt;br /&gt;
Below are some useful tools and tricks for streamlining your work on any remote server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[VS Code Remote]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Introduces the VS Code Remote plugin, which allows you to edit files and run terminals using the full VS Code IDE experience directly on a remote server.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Beginner%27s_Guide_to_Computation_in_Statistical_Research&amp;diff=906</id>
		<title>Beginner&#039;s Guide to Computation in Statistical Research</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Beginner%27s_Guide_to_Computation_in_Statistical_Research&amp;diff=906"/>
		<updated>2026-07-07T14:18:01Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: use a grid of boxes instead of a sequence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At some point, you will need to demonstrate that your statistical methods actually work in practice. Whether you are running a toy simulation, analyzing real-world data, or optimizing a complex neural network, you will need to write code. If you are new to computing, the wiki can be overwhelming. &#039;&#039;&#039;Read every section top to bottom up through the Reproducibility and Collaboration section. (You do not need to read every page in every section, but note their existence)&#039;&#039;&#039; It is designed to take you from installing your first language to running massive workflows on department servers.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Your first goal is to translate mathematical algorithms into functional code. &#039;&#039;&#039;It is important to familiarize yourself with these concepts early on.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Choosing and Installing a Programming Language]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Help deciding between R, Python, Julia, or other languages and how to get them running on your personal machine.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Installing and Configuring an Integrated Development Environment]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Your IDE (Integrated Development Environment) is your workshop. Learn how to set up VS Code or RStudio.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Beyond Print Statements: Breakpoint Debugging]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Your IDE (Integrated Development Environment) is your workshop. Learn how to set up VS Code or RStudio.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Command Line Basics]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Essential survival skills for navigating your computer without graphical windows&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
== Scale and Efficiency ==&lt;br /&gt;
Once you have gotten the hang of implementing statistical algorithms in code, the next major hurdle will be making your workflows &#039;&#039;&#039;scalable and efficient&#039;&#039;&#039;. For code running on your own machine, you want to make sure you are using every CPU core and every bit of RAM as efficiently as possible. Even then, your personal computer alone can only get you so far. Thankfully, the department also provides several options for remote high-performance computing for even the largest of research workflows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Building Workflows on Remote Servers]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Using the department servers and other computing clusters&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Parallelization: Making the most of your Machine]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
How to run multiple experiments simultaneously without babysitting your machine&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Big Data Management]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
How to handle datasets that are measured in terabytes&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reproducibility and Collaboration ==&lt;br /&gt;
While it is important that you are able to obtain results efficiently, it is also equally important for other members of the academic community to arrive at your same results independently. Specifically, others should be able to run your workflow and obtain the exact same output as you did with minimal tinkering and friction. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Version Control]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Keeping track of code/experiment history&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Dependency Management]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Making sure anyone else in the world can run your workflow&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software Development (Optional) ==&lt;br /&gt;
If you envision yourself making your methods and associated algorithms available for mass adoption, there are other considerations for publishing your code that go beyond simple reproduciblity. Other should not only be able to reproduce your results, but also modify your code for new experiments with minimal hassle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Creating Libraries and Packages]]&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
How to structure your code to for easy consumption by other researchers&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #C41230; padding: 10px 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Working with package repositories]] (TBW)&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
How to upload your packages to public repositories for easy widespread distribution.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=905</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=905"/>
		<updated>2026-07-07T14:16:14Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: use a grid of boxes instead of a sequence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the CMU Department of Statistics and Data Science Computing Wiki! To get the most out of this resource, please note the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #e2e3e5; border: 5px solid #6c757d; padding: 15px; margin-bottom: 20px; margin-top: 15px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Purpose &amp;amp; Contribution&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The main purpose of this wiki is to familiarize readers with the computing resources provided by the department.&lt;br /&gt;
* &#039;&#039;&#039;Newcomers:&#039;&#039;&#039; Please read the [[Beginner&#039;s Guide to Computation in Statistical Research]] to familiarize yourself with statistical computing tools and best practices as you begin you research.&lt;br /&gt;
* &#039;&#039;&#039;Computational Researchers:&#039;&#039;&#039; See the [[Article Catalog]] for a full selection of topics and pages and the [[Directory of Computing Resources for Statistical Research]] for available computational resources. You can also use the search bar at the top of this page.&lt;br /&gt;
* &#039;&#039;&#039;Contributors and Maintainers:&#039;&#039;&#039; Feel free to leave a comment on any page, or create your own pages. Please see [[Generic Wiki Information]] for more information.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Important Announcements ==&lt;br /&gt;
Before using any department computing resources, please see [[Research Computing Dos and Don&#039;ts]]&amp;lt;div style=&amp;quot;background-color: #fff8e6; border-left: 4px solid #ffc107; padding: 15px; margin-bottom: 20px;&amp;quot;&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-10] New Article:&#039;&#039;&#039; Introducing [[Globus]], a tool for sharing large files within and between institutions.&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-01] PSA:&#039;&#039;&#039; If you use VS Code, look for &amp;quot;[https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs Python Environments]&amp;quot; in your extensions and &#039;&#039;&#039;uninstall it immediately&#039;&#039;&#039; due to environment conflicts.&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-01] Updated Article:&#039;&#039;&#039; The [[Linux and department servers]] page has been updated with instructions on how to use &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; to avoid disk I/O slowdowns. See [[Linux and department servers#Using /scratch]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quick Start ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Beginner&#039;s Guide to Computation in Statistical Research]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The essential starting point for understanding how to scale your statistical workflows and choose the right tools for your research.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #28a745; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Directory of Computing Resources for Statistical Research]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A comprehensive index of all available clusters, servers, and computing environments accessible to department members.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6f42c1; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Department Tools and Services]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Additional department tools, printing, web hosting, software licenses, and specialized computing services.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #eff07d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Article Catalog]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A comprehensive list of articles organized by topic&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support Resources ==&lt;br /&gt;
For assistance with issues not covered in this wiki, please reach out to the following contacts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr))&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6c757d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;General Tech Support&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
For general issues with department computing resources:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Email:&#039;&#039;&#039; [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Research Project Assistance (Graduate Students Only)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Live assistance from Alex Shen, PhD Computing TA, for project-specific computing questions:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Office Hours:&#039;&#039;&#039; Mondays 2:00 PM - 3:00 PM @ FMS Interview Room 320&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Contact:&#039;&#039;&#039; [mailto:ajshen@andrew.cmu.edu ajshen@andrew.cmu.edu] or reach out directly via Slack.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Onboarding &amp;amp; Troubleshooting (Graduate Students Only)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Live assistance for setting up and troubleshooting computing resources:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Carl Skipper:&#039;&#039;&#039; Office hours by appointment. Request via [mailto:skipper@andrew.cmu.edu skipper@andrew.cmu.edu]&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Jake Gordon:&#039;&#039;&#039; Office hours by appointment. Request via [mailto:jacobg2@andrew.cmu.edu jacobg2@andrew.cmu.edu]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Suggestions Box and Todos ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #aff0ff; border: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Scaling -&amp;gt; Version Control -&amp;gt; Experiment Management&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Scaling -&amp;gt; Big Data Management -&amp;gt; Articles about file formats and compression&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Software Development -&amp;gt; Package Creation -&amp;gt; Writing Documentation&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Software Development -&amp;gt; Package Repositories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section contains work in progress and future suggestions for the wiki. If you would like to leave a suggestions, you may:&lt;br /&gt;
* Directly contact the Computing TA&lt;br /&gt;
* Leave a comment on a specific wiki article with your suggestions&lt;br /&gt;
* Leave a comment on this page with your suggestions&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page_new&amp;diff=877</id>
		<title>Main Page new</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page_new&amp;diff=877"/>
		<updated>2026-06-29T14:55:37Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the CMU Department of Statistics and Data Science Computing Wiki! To get the most out of this resource, please note the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #e2e3e5; border: 5px solid #6c757d; padding: 15px; margin-bottom: 20px; margin-top: 15px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Purpose &amp;amp; Contribution&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* The main purpose of this wiki is to familiarize readers with the computing resources &#039;&#039;&#039;provided by the department&#039;&#039;&#039;. We encourage everyone, especially newcomers, to at least skim all of the articles in the &#039;&#039;&#039;Quick Start&#039;&#039;&#039; section below.&lt;br /&gt;
* This wiki is editable by any current member of the CMU Statistics department. If you find any small errors, feel free to correct them directly. If you have a question or suggestions, please leave a comment on any page in the wiki.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Important Announcements ==&lt;br /&gt;
Before using any department computing resources, please see [[Research Computing Dos and Don&#039;ts]]&amp;lt;div style=&amp;quot;background-color: #fff8e6; border-left: 4px solid #ffc107; padding: 15px; margin-bottom: 20px;&amp;quot;&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-10] New Article:&#039;&#039;&#039; Introducing [[Globus]], a tool for sharing large files within and between institutions.&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-01] PSA:&#039;&#039;&#039; If you use VS Code, look for &amp;quot;[https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs Python Environments]&amp;quot; in your extensions and &#039;&#039;&#039;uninstall it immediately&#039;&#039;&#039; due to environment conflicts.&lt;br /&gt;
* &#039;&#039;&#039;[2026-04-01] Updated Article:&#039;&#039;&#039; The [[Linux and department servers]] page has been updated with instructions on how to use &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; to avoid disk I/O slowdowns. See [[Linux and department servers#Using /scratch]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quick Start ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #005A9C; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Beginner&#039;s Guide to Computation in Statistical Research]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The essential starting point for understanding how to scale your statistical workflows and choose the right tools for your research.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #28a745; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Directory of Computing Resources for Statistical Research]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A comprehensive index of all available clusters, servers, and computing environments accessible to department members.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6f42c1; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Miscellaneous Services]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Additional department tools, printing, web hosting, software licenses, and specialized computing services.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #eff07d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[Article Catalog]]&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A comprehensive list of articles organized by topic&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Support Resources ==&lt;br /&gt;
For assistance with issues not covered in this wiki, please reach out to the following contacts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #6c757d; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;General Tech Support&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
For general issues with department computing resources:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Email:&#039;&#039;&#039; [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Research Project Assistance (Graduate Students Only)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Live assistance from Alex Shen, PhD Computing TA, for project-specific computing questions:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Office Hours:&#039;&#039;&#039; Mondays 2:00 PM - 3:00 PM @ FMS Interview Room 320&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Contact:&#039;&#039;&#039; [mailto:ajshen@andrew.cmu.edu ajshen@andrew.cmu.edu] or reach out directly via Slack.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f8f9fa; border-left: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Onboarding &amp;amp; Troubleshooting (Graduate Students Only)&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Live assistance for setting up and troubleshooting computing resources:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Carl Skipper:&#039;&#039;&#039; Office hours by appointment. Request via [mailto:skipper@andrew.cmu.edu skipper@andrew.cmu.edu]&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Jake Gordon:&#039;&#039;&#039; Office hours by appointment. Request via [mailto:jacobg2@andrew.cmu.edu jacobg2@andrew.cmu.edu]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Suggestions Box and Todos ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #aff0ff; border: 4px solid #17a2b8; padding: 15px; margin-bottom: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Scaling -&amp;gt; Version Control -&amp;gt; Experiment Management&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Scaling -&amp;gt; Big Data Management -&amp;gt; Articles about file formats and compression&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Software Development -&amp;gt; Package Creation -&amp;gt; Writing Documentation&lt;br /&gt;
* &#039;&#039;&#039;[New Article]&#039;&#039;&#039; Beginner&#039;s Guide -&amp;gt; Software Development -&amp;gt; Package Repositories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section contains work in progress and future suggestions for the wiki. If you would like to leave a suggestions, you may:&lt;br /&gt;
* Directly contact the Computing TA&lt;br /&gt;
* Leave a comment on a specific wiki article with your suggestions&lt;br /&gt;
* Leave a comment on this page with your suggestions&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=R_on_the_server&amp;diff=876</id>
		<title>R on the server</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=R_on_the_server&amp;diff=876"/>
		<updated>2026-06-29T14:49:44Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The department&#039;s Leviathan cluster has R installed on each machine. It also has RStudio Server running on each machine, so there are two ways to run R code.&lt;br /&gt;
&lt;br /&gt;
== Running R on the server ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
On the Leviathans, or on other servers that do not support RStudio, log into the server via SSH first. After getting onto the server (see [[Linux_and_department_servers|Linux and the department server]]), you can start using &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; but opening an interactive session on the console with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;R&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You’ll be able to run code (except for visualization as the server can’t display graphics), from the console.&lt;br /&gt;
&lt;br /&gt;
=== RStudio Server ===&lt;br /&gt;
RStudio Server is running on each Leviathan. Choose a Leviathan with low usage. For example, suppose you choose &amp;lt;code&amp;gt;leviathan3&amp;lt;/code&amp;gt;. Then type the following URL into your web browser:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://leviathan3.stat.cmu.edu:8787/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
This will open RStudio Server. Use your statistics account (the same one you use to log in via SSH) to log in.&lt;br /&gt;
&lt;br /&gt;
You will be able to use the RStudio files pane to view all your files on the Leviathans. It looks just like RStudio on your own computer. Files are shared across machines, but your RStudio session is specific to the Leviathan you started it on. Return to the same Leviathan to view your running code or output.&lt;br /&gt;
&lt;br /&gt;
== Library Management ==&lt;br /&gt;
&lt;br /&gt;
Compared to your personal computer (and your personal computer using RStudio), installing packages has a few nuances.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first time installing a package, e.g. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;server$ R&lt;br /&gt;
&lt;br /&gt;
R &amp;gt; install.packages(&amp;quot;tidyverse&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you’ll be asked to set up a local folder to store your files. &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server’s version of &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; may different than you personal computer. It will also occasionally update. This will require you to re-install packages (see[[Renv|&amp;lt;code&amp;gt;Renv&amp;lt;/code&amp;gt;’s wiki (R package environments)]]&amp;amp;nbsp;for a way to make this less painful).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compared to RStudio, you may need to debug package installation and dependence structure. Good luck!&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Packages that use C, C++, or Fortran code will try to compile it from scratch, instead of downloading a pre-compiled version (like on Windows or macOS). This may require certain libraries to be installed on the servers; if package installation fails and tells you to use &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; to install a library, you&#039;ll need to ask for help to install these, as you don&#039;t have the power to.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Jobs ==&lt;br /&gt;
&lt;br /&gt;
Beyond just opening up an interactive &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; session with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;R&amp;lt;/code&amp;gt;, you can run files in 2 ways (as described below). &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; is a more commonly used tool to run &amp;lt;code&amp;gt;.R&amp;lt;/code&amp;gt; files, as it allows you to pass additional arguments to the file. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;Rscript file.R arg1 arg2&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to use &amp;lt;code&amp;gt;arg1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arg2&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; code, you’ll access them (as strings) using &amp;lt;code&amp;gt;commandArgs()&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;args &amp;amp;lt;- commandArgs(trailingOnly = TRUE)&lt;br /&gt;
if (length(args) &amp;gt; 0) {&lt;br /&gt;
  first_parameter &amp;lt;- args[1]&lt;br /&gt;
  second_parameter &amp;lt;- as.numeric(args[2])&lt;br /&gt;
  ...&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; also allows for standard output (printed to the terminal while running). &lt;br /&gt;
&lt;br /&gt;
==== Example uses of arguments ====&lt;br /&gt;
&lt;br /&gt;
Examples of argument values abound in statistical analysis. If you&#039;re using [[Slurm]] you may use arguments to parallelize a task. These types of tasks could be running through complicated data observations, examining outcomes across a grid of hyperparameters, etc. It could also be useful to pass in the name of a file to process or folder to pull from.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;R CMD BATCH&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;R CMD BATCH&amp;lt;/code&amp;gt; is an older approach (compared to &amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; you cannot pass in additional arguments nor see printouts to the standard output, but a &amp;lt;code&amp;gt;file_name.Rout&amp;lt;/code&amp;gt; file will be generated with all print outs of the code. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;R CMD BATCH file.R&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have any input arguments to access and want to save errors and messages that came from running your &amp;lt;code&amp;gt;.R&amp;lt;/code&amp;gt; file, this might be a better approach.&lt;br /&gt;
&lt;br /&gt;
== Additional useful tools ==&lt;br /&gt;
&lt;br /&gt;
When approaching running code on different servers (and even on your own computer), it may be useful to understand the amount of time an analysis (or a part of an analysis) will run and how much memory it uses. This can help you decide what computing resources you need / what would make your analysis feasible. Knowing this information can also help you decide if you need to make your code more efficient (which can be done with the help of [http://adv-r.had.co.nz/Profiling.html profiles] and potentially C++ functions - link to come soon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Estimating time usage&#039;&#039;&#039;: To measure the amount of time code takes to run, one approach is to put &amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;start &amp;lt;- Sys.time()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
at the start and at the end&lt;br /&gt;
&amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;used_time &amp;lt;- Sys.time() - start&lt;br /&gt;
print(used_time)&amp;lt;/pre&amp;gt;If you&#039;re running a script, you can also use the &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; command, as in:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
time Rscript some_script.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Understanding memory usage:&#039;&#039;&#039; When you are running code in &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; or RStudio, you can get some understanding of how large an object is (and therefore get a lower bound on your potential RAM usage) using the package &amp;lt;code&amp;gt;pryr&amp;lt;/code&amp;gt;. Calling &amp;lt;code&amp;gt;pryr::object_size(object_name)&amp;lt;/code&amp;gt; will tell you what the approximate size of the object is. See [http://adv-r.had.co.nz/memory.html adv-r] on the package usage. &lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
R&amp;gt; library(pryr)&lt;br /&gt;
R&amp;gt; dm_small &amp;lt;- as.matrix(dist(1:10))&lt;br /&gt;
R&amp;gt; object_size(dm_small)&lt;br /&gt;
2.1 kB&lt;br /&gt;
R&amp;gt; dm_medium &amp;lt;- as.matrix(dist(1:10-))&lt;br /&gt;
R&amp;gt; object_size(dm_medium)&lt;br /&gt;
87.7 kB&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:1000))&lt;br /&gt;
R&amp;gt; object_size(dm_large)&lt;br /&gt;
8.07 MB&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:10000))&lt;br /&gt;
R&amp;gt; object_size(dm_large)&lt;br /&gt;
801 MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we did &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:1000000))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
we&#039;d expect &amp;lt;code&amp;gt;object_size(dm_large)&amp;lt;/code&amp;gt; to be around 80 GB, which should crash your personal computer&#039;s &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt;/Rstudio since you probably don&#039;t have that much RAM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to also check your amount of RAM usage with OS-centric tools (e.g. Mac&#039;s: [https://support.apple.com/guide/activity-monitor/view-memory-usage-actmntr1004/mac Activity Monitor] or Window&#039;s: [https://www.crucial.com/articles/about-memory/how-to-check-ram-windows-10 Dask Management]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:IDEs]]&lt;br /&gt;
[[Category:Department Servers]]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=R_on_the_server&amp;diff=875</id>
		<title>R on the server</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=R_on_the_server&amp;diff=875"/>
		<updated>2026-06-29T14:49:23Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: hydra -&amp;gt; leviathans&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:IDEs]]&lt;br /&gt;
[[Category:Department Servers]]&lt;br /&gt;
&lt;br /&gt;
The department&#039;s Leviathan cluster has R installed on each machine. It also has RStudio Server running on each machine, so there are two ways to run R code.&lt;br /&gt;
&lt;br /&gt;
== Running R on the server ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
On the Leviathans, or on other servers that do not support RStudio, log into the server via SSH first. After getting onto the server (see [[Linux_and_department_servers|Linux and the department server]]), you can start using &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; but opening an interactive session on the console with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;R&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You’ll be able to run code (except for visualization as the server can’t display graphics), from the console.&lt;br /&gt;
&lt;br /&gt;
=== RStudio Server ===&lt;br /&gt;
RStudio Server is running on each Leviathan. Choose a Leviathan with low usage. For example, suppose you choose &amp;lt;code&amp;gt;leviathan3&amp;lt;/code&amp;gt;. Then type the following URL into your web browser:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://leviathan3.stat.cmu.edu:8787/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
This will open RStudio Server. Use your statistics account (the same one you use to log in via SSH) to log in.&lt;br /&gt;
&lt;br /&gt;
You will be able to use the RStudio files pane to view all your files on the Leviathans. It looks just like RStudio on your own computer. Files are shared across machines, but your RStudio session is specific to the Leviathan you started it on. Return to the same Leviathan to view your running code or output.&lt;br /&gt;
&lt;br /&gt;
== Library Management ==&lt;br /&gt;
&lt;br /&gt;
Compared to your personal computer (and your personal computer using RStudio), installing packages has a few nuances.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first time installing a package, e.g. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;server$ R&lt;br /&gt;
&lt;br /&gt;
R &amp;gt; install.packages(&amp;quot;tidyverse&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
you’ll be asked to set up a local folder to store your files. &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server’s version of &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; may different than you personal computer. It will also occasionally update. This will require you to re-install packages (see[[Renv|&amp;lt;code&amp;gt;Renv&amp;lt;/code&amp;gt;’s wiki (R package environments)]]&amp;amp;nbsp;for a way to make this less painful).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compared to RStudio, you may need to debug package installation and dependence structure. Good luck!&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Packages that use C, C++, or Fortran code will try to compile it from scratch, instead of downloading a pre-compiled version (like on Windows or macOS). This may require certain libraries to be installed on the servers; if package installation fails and tells you to use &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; to install a library, you&#039;ll need to ask for help to install these, as you don&#039;t have the power to.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Jobs ==&lt;br /&gt;
&lt;br /&gt;
Beyond just opening up an interactive &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; session with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;R&amp;lt;/code&amp;gt;, you can run files in 2 ways (as described below). &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; is a more commonly used tool to run &amp;lt;code&amp;gt;.R&amp;lt;/code&amp;gt; files, as it allows you to pass additional arguments to the file. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;Rscript file.R arg1 arg2&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to use &amp;lt;code&amp;gt;arg1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arg2&amp;lt;/code&amp;gt; in your &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; code, you’ll access them (as strings) using &amp;lt;code&amp;gt;commandArgs()&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;args &amp;amp;lt;- commandArgs(trailingOnly = TRUE)&lt;br /&gt;
if (length(args) &amp;gt; 0) {&lt;br /&gt;
  first_parameter &amp;lt;- args[1]&lt;br /&gt;
  second_parameter &amp;lt;- as.numeric(args[2])&lt;br /&gt;
  ...&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; also allows for standard output (printed to the terminal while running). &lt;br /&gt;
&lt;br /&gt;
==== Example uses of arguments ====&lt;br /&gt;
&lt;br /&gt;
Examples of argument values abound in statistical analysis. If you&#039;re using [[Slurm]] you may use arguments to parallelize a task. These types of tasks could be running through complicated data observations, examining outcomes across a grid of hyperparameters, etc. It could also be useful to pass in the name of a file to process or folder to pull from.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;R CMD BATCH&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;R CMD BATCH&amp;lt;/code&amp;gt; is an older approach (compared to &amp;lt;code&amp;gt;Rscript&amp;lt;/code&amp;gt; you cannot pass in additional arguments nor see printouts to the standard output, but a &amp;lt;code&amp;gt;file_name.Rout&amp;lt;/code&amp;gt; file will be generated with all print outs of the code. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;R CMD BATCH file.R&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have any input arguments to access and want to save errors and messages that came from running your &amp;lt;code&amp;gt;.R&amp;lt;/code&amp;gt; file, this might be a better approach.&lt;br /&gt;
&lt;br /&gt;
== Additional useful tools ==&lt;br /&gt;
&lt;br /&gt;
When approaching running code on different servers (and even on your own computer), it may be useful to understand the amount of time an analysis (or a part of an analysis) will run and how much memory it uses. This can help you decide what computing resources you need / what would make your analysis feasible. Knowing this information can also help you decide if you need to make your code more efficient (which can be done with the help of [http://adv-r.had.co.nz/Profiling.html profiles] and potentially C++ functions - link to come soon).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Estimating time usage&#039;&#039;&#039;: To measure the amount of time code takes to run, one approach is to put &amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;start &amp;lt;- Sys.time()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
at the start and at the end&lt;br /&gt;
&amp;lt;pre class=&amp;quot;{r}&amp;quot;&amp;gt;used_time &amp;lt;- Sys.time() - start&lt;br /&gt;
print(used_time)&amp;lt;/pre&amp;gt;If you&#039;re running a script, you can also use the &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; command, as in:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
time Rscript some_script.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Understanding memory usage:&#039;&#039;&#039; When you are running code in &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; or RStudio, you can get some understanding of how large an object is (and therefore get a lower bound on your potential RAM usage) using the package &amp;lt;code&amp;gt;pryr&amp;lt;/code&amp;gt;. Calling &amp;lt;code&amp;gt;pryr::object_size(object_name)&amp;lt;/code&amp;gt; will tell you what the approximate size of the object is. See [http://adv-r.had.co.nz/memory.html adv-r] on the package usage. &lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
R&amp;gt; library(pryr)&lt;br /&gt;
R&amp;gt; dm_small &amp;lt;- as.matrix(dist(1:10))&lt;br /&gt;
R&amp;gt; object_size(dm_small)&lt;br /&gt;
2.1 kB&lt;br /&gt;
R&amp;gt; dm_medium &amp;lt;- as.matrix(dist(1:10-))&lt;br /&gt;
R&amp;gt; object_size(dm_medium)&lt;br /&gt;
87.7 kB&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:1000))&lt;br /&gt;
R&amp;gt; object_size(dm_large)&lt;br /&gt;
8.07 MB&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:10000))&lt;br /&gt;
R&amp;gt; object_size(dm_large)&lt;br /&gt;
801 MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we did &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
R&amp;gt; dm_large &amp;lt;- as.matrix(dist(1:1000000))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
we&#039;d expect &amp;lt;code&amp;gt;object_size(dm_large)&amp;lt;/code&amp;gt; to be around 80 GB, which should crash your personal computer&#039;s &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt;/Rstudio since you probably don&#039;t have that much RAM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to also check your amount of RAM usage with OS-centric tools (e.g. Mac&#039;s: [https://support.apple.com/guide/activity-monitor/view-memory-usage-actmntr1004/mac Activity Monitor] or Window&#039;s: [https://www.crucial.com/articles/about-memory/how-to-check-ram-windows-10 Dask Management]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=563</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=563"/>
		<updated>2026-04-07T14:35:17Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Job prioritization */ further remove condo mentions, explain prioritization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three main partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. Partitions correspond to nodes, so this ensures each department&#039;s jobs use their own node.  &lt;br /&gt;
&lt;br /&gt;
If you want to use other nodes, you can submit jobs to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. This requests any available node from any partition, so your job will run on whichever node has resources available. However, your job will have lower priority, as described below; if your all job runs on the philosophy node, a user who submits to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; can preempt your job, causing it to be killed to make room for them, then restarted after their job is done. &lt;br /&gt;
&lt;br /&gt;
If you want to use a specific node within &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; you can specify the node within your submit script as shown below.&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --nodelist=n03&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Partitions have different quality-of-service (QOS) values that affect their prioritization, and Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Someone else submits Job B to &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition has lower QOS, so Job B will get to use the StatDS node first, and Job A will either wait or use a different node.&lt;br /&gt;
* You submit Job A to the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. It begins to run on the philosophy node. Someone else submits Job B to &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt;, and there are insufficient resources to run both at the same time. Job A is killed, Job B runs, and Job A is placed back into the queue to be run when resources are available.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. The fair-sharing system assigns them a lower priority, because you have run so many jobs, and jobs submitted by other users will run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Scratch_Storage&amp;diff=560</id>
		<title>Scratch Storage</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Scratch_Storage&amp;diff=560"/>
		<updated>2026-04-02T14:40:07Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: expand with use cases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scratch storage is a location where you can store data directly on the machine. These locations use faster flash based storage, which is better suited for the heavy reading and writing of data.&lt;br /&gt;
&lt;br /&gt;
Every time you read/write from your &amp;lt;code&amp;gt;/home/yourusername&amp;lt;/code&amp;gt; directory, you are accessing a remote storage location over the network. This is slower to begin with, especially if other users are running read/write heavy jobs.&lt;br /&gt;
&lt;br /&gt;
== Storage Terminology ==&lt;br /&gt;
NVME SSD - Fast flash based storage. Smaller available storage size.&lt;br /&gt;
&lt;br /&gt;
Spinning Disk Storage - Slow mechanical hard drive with spinning disks. Larger available storage size&lt;br /&gt;
&lt;br /&gt;
Each Leviathan is equipped with a 4TB NVME SSD (faster than the NAS which uses spinning disks.). This allows for heavy reading and writing at high speeds. Utilizing this space can speed up your jobs and help with congestion on the NAS.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
Scratch storage is useful for temporarily storing large files you will be reading and writing from heavily. Because the scratch storage is separate between each machine, not shared, and because it is limited in size, it is less useful for long-term storage.&lt;br /&gt;
&lt;br /&gt;
Good uses include:&lt;br /&gt;
&lt;br /&gt;
* Saving checkpoints or output from long-running jobs or simulations, to be analyzed and moved to long-term storage once the job is done&lt;br /&gt;
* Saving output from one script that will immediately be used by another script&lt;br /&gt;
* Writing huge outputs from scripts when you&#039;re still debugging them and won&#039;t need to keep the output for long&lt;br /&gt;
&lt;br /&gt;
Of course, anything saved to &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; can be moved (with &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt;) to your home directory if you decide to keep it permanently.&lt;br /&gt;
&lt;br /&gt;
== Scratch Storage Location on Each Leviathan ==&lt;br /&gt;
Scratch storage is available in &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can view the amount of space used at &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; for each leviathan [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 here].&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt; location on each leviathan is it&#039;s own storage location. Meaning if you create data on Leviathan1 on &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt;, it will not be accessible on Leviathan7 at &amp;lt;code&amp;gt;/scratch&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Steps to use Scratch Storage ======&lt;br /&gt;
&lt;br /&gt;
# Make a folder in /scratch location.&lt;br /&gt;
#* &amp;lt;code&amp;gt;mkdir /scratch/yourusername&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change ownership of the folder to you.&lt;br /&gt;
#* &amp;lt;code&amp;gt;chown yourusername:yourusername /scratch/yourusername&amp;lt;/code&amp;gt;&lt;br /&gt;
# Update permissions on folder so only you can read it (modify as needed.)&lt;br /&gt;
#* &amp;lt;code&amp;gt;chmod 750 /scratch/yourusername&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ScratchSpace.png|center|frame]]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=554</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=554"/>
		<updated>2026-03-30T18:59:06Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Job scheduling and prioritization */ fix link to Slurm&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but &#039;&#039;&#039;with a lower priority&#039;&#039;&#039; than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Department_GPU_Servers&amp;diff=449</id>
		<title>Department GPU Servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Department_GPU_Servers&amp;diff=449"/>
		<updated>2026-03-05T19:19:23Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has purchased and installed 3&amp;amp;nbsp;new GPU servers that are physically located in Baker Hall. They have 64GB of RAM, 32 core processors and NVIDIA RTX 4090 GPU cards. You can log into them just as you would with the [[Linux_and_department_servers|hydras]], with your stats ID and password. They are named:&lt;br /&gt;
&lt;br /&gt;
ghidorah1.stat.cmu.edu&lt;br /&gt;
&lt;br /&gt;
ghidorah2.stat.cmu.edu&lt;br /&gt;
&lt;br /&gt;
ghidorah3.stat.cmu.edu&lt;br /&gt;
&lt;br /&gt;
* ghidorah3 is reserved for MSCF student capstone projects in the fall.&lt;br /&gt;
&lt;br /&gt;
All of them share the same file system with the hydras and leviathans, which means that whatever you install, save and configure on one of the machines above will also be available in one of the hydras, and viceversa.&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
A simple terminal command to check GPU&amp;amp;nbsp;usage is&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt;, which shows several pieces of information about the GPU and the corresponding CUDA drivers installed. This command also supports checks at regular time intervals (in seconds). For example, to check usage every 2 seconds use&amp;amp;nbsp;&amp;lt;code&amp;gt;&amp;amp;nbsp;nvidia-smi -l 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Department_Servers&amp;diff=448</id>
		<title>Department Servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Department_Servers&amp;diff=448"/>
		<updated>2026-03-03T13:17:38Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Using the Servers */ fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hydras ==&lt;br /&gt;
The Hydras are virtual based serves hosted in the Campus Cloud. They offer slightly higher stability and are better for smaller computing jobs.&lt;br /&gt;
&lt;br /&gt;
Hardware Specifications&lt;br /&gt;
&lt;br /&gt;
* Intel Xeon CPU&lt;br /&gt;
** 12 cores @2.6Ghz &lt;br /&gt;
* 64GB of RAM (128GB on hydra7 and hydra8)&lt;br /&gt;
* NAS used for /home storage&lt;br /&gt;
Servers = Hydra1-8&lt;br /&gt;
&lt;br /&gt;
ssh yourusername@hydra1.stat.cmu.edu&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Grafana Monitoring]&lt;br /&gt;
== Ghidorahs ==&lt;br /&gt;
The Ghidorahs are physical servers located throughout Baker Hall. They are designed for lighter GPU jobs. &lt;br /&gt;
&lt;br /&gt;
Hardware Specifications &lt;br /&gt;
&lt;br /&gt;
* Core i9-13900KF CPU &lt;br /&gt;
** 8 performance cores @5.4Ghz &lt;br /&gt;
** 16 Efficiency cores @4.3Ghz &lt;br /&gt;
* 64GB of RAM&lt;br /&gt;
* RTX 4090 24GB of video memory&lt;br /&gt;
* NAS used for /home storage&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Grafana Monitoring]&lt;br /&gt;
== Leviathans ==&lt;br /&gt;
The Leviathans are physical servers located throughout Baker Hall and the Cyert Data Center. They are designed for heavy CPU and RAM jobs.&lt;br /&gt;
&lt;br /&gt;
Hardware Specifications&lt;br /&gt;
&lt;br /&gt;
* AMD Ryzen 9 9950x&lt;br /&gt;
** 16 cores @5.7Ghz&lt;br /&gt;
* 128GB of RAM (Leviathan1-6)&lt;br /&gt;
* 196GB of RAM (Leviathan7-11)&lt;br /&gt;
* 4TB of local NVME storage&lt;br /&gt;
** Mounted at /scratch&lt;br /&gt;
** Data stored in this location will only be accessible on the original server.&lt;br /&gt;
* NAS used for /home storage&lt;br /&gt;
Servers = Leviathan1-11&lt;br /&gt;
&lt;br /&gt;
ssh yourusername@leviathan1.stat.cmu.edu&lt;br /&gt;
&lt;br /&gt;
* You can use &amp;quot;levi&amp;quot; in place of &amp;quot;leviathan&amp;quot;&lt;br /&gt;
** &#039;&#039;ssh yourusername@levi1.stat.cmu.edu&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Grafana Monitor]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
Each server&#039;s &amp;quot;/home&amp;quot; directory located on the department&#039;s NAS. This means your files will be accessible on every server.&lt;br /&gt;
&lt;br /&gt;
The NAS is a total of 100TB. This space is shared and monitored for fair usage. If you store large amounts of data, you may be asked if it is all necessary.&lt;br /&gt;
To see available space on the NAS, run the command below in a terminal on the server.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
df -h | grep &amp;quot;/home&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To see your total usage run the command below. &#039;&#039;It may take a few minutes to finish&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 du -sh ~&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using the Servers ==&lt;br /&gt;
&lt;br /&gt;
Accessing the servers requires using an SSH compatible terminal. Applications such as &amp;quot;Command Prompt&amp;quot; on Windows or &amp;quot;Terminal&amp;quot; on MacOS can achieve this.&lt;br /&gt;
To SSH to a server, open either app listed previously and enter the SSH command shown below. Be sure to use your StatDS computing account.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh statdsusername@leviathan11.stat.cmu.edu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the line above, replace &amp;quot;hydra1&amp;quot; with the server you want to connect to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
Servers&lt;br /&gt;
!Hydras&lt;br /&gt;
!Ghidorahs&lt;br /&gt;
!Leviathans&lt;br /&gt;
|-&lt;br /&gt;
|hydra1&lt;br /&gt;
|ghidorah1&lt;br /&gt;
|leviathan1&lt;br /&gt;
|-&lt;br /&gt;
|hydra2&lt;br /&gt;
|ghidorah2&lt;br /&gt;
|leviathan2&lt;br /&gt;
|-&lt;br /&gt;
|hydra3&lt;br /&gt;
|ghidorah3&lt;br /&gt;
|leviathan3&lt;br /&gt;
|-&lt;br /&gt;
|hydra4&lt;br /&gt;
|&lt;br /&gt;
|leviathan4&lt;br /&gt;
|-&lt;br /&gt;
|hydra5&lt;br /&gt;
|&lt;br /&gt;
|leviathan5&lt;br /&gt;
|-&lt;br /&gt;
|hydra6&lt;br /&gt;
|&lt;br /&gt;
|leviathan6&lt;br /&gt;
|-&lt;br /&gt;
|hydra7&lt;br /&gt;
|&lt;br /&gt;
|leviathan7&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|leviathan8&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|leviathan9&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|leviathan10&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|leviathan11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
The servers within Statistics &amp;amp; Data Science offer a variety of software. Sudo access, also referred to as the ability to install software, on department servers is not allowed. If a software package you would like to use is not listed below, please contact remarks@stat.cmu.edu.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Hydras&lt;br /&gt;
!Ghidorahs&lt;br /&gt;
!Leviathans&lt;br /&gt;
|-&lt;br /&gt;
|Python&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Apptainer&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Quarto&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Gurobi &lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Rstudio-Server&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Matlab&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Julia&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=431</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=431"/>
		<updated>2026-01-29T20:19:59Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* SSH to Compute Nodes */ fix typo in arg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but &#039;&#039;&#039;with a lower priority&#039;&#039;&#039; than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=430</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=430"/>
		<updated>2026-01-27T18:32:20Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Partitions and condos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but &#039;&#039;&#039;with a lower priority&#039;&#039;&#039; than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=429</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=429"/>
		<updated>2026-01-27T16:07:43Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: Describe scratch space&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but with a lower priority than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
== Using scratch storage ==&lt;br /&gt;
Each compute node (but not the head node) has several terabytes of scratch space. This is fast SSD storage that is directly attached to the node, rather than being accessed over the network (like all files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; are). This is useful if your jobs need to write large temporary files: reading and writing the scratch space is faster than reading and writing files in &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Your home directory contains a symlink to the scratch space at &amp;lt;code&amp;gt;~/scratch&amp;lt;/code&amp;gt;. To use it, create a directory inside named after your username:&lt;br /&gt;
 mkdir ~/scratch/yourusername&lt;br /&gt;
Then you can read and write files in that directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warnings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The scratch space is meant for &#039;&#039;&#039;temporary&#039;&#039;&#039; storage during a job. It may be cleared out during cluster maintenance or if the disk is full.&lt;br /&gt;
* The scratch drives are much smaller than the huge networked disk used for &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;, so be careful what you store in it, and regularly delete files you don&#039;t need.&lt;br /&gt;
* Each node has separate scratch disks, so data you write on one node is &#039;&#039;&#039;not&#039;&#039;&#039; available from any other node, or from the head node.&lt;br /&gt;
&lt;br /&gt;
The scratch space is thus not for final model outputs or results. It is ideal for things like saving checkpoints while your job is running, dumping data to debug a job, saving output from one script to be immediately used by another script, etc.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=428</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=428"/>
		<updated>2026-01-27T15:38:16Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Queue status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. The following options list more helpful information than the default (though you need a wide terminal to read it all):&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue -O &amp;quot;JobID:7,UserName:10,Partition:12,TimeUsed:12,ReasonList,MinCPUS:9,MinMemory:12,tres-per-node,StartTime,EndTime&amp;quot;&lt;br /&gt;
JOBID  USER      PARTITION   TIME        NODELIST(REASON)    MIN_CPUS MIN_MEMORY  TRES_PER_NODE       START_TIME          END_TIME            &lt;br /&gt;
36229  ebensen   all         0:00        (DependencyNeverSati16       128G        N/A                 N/A                 N/A                 &lt;br /&gt;
36237  ajshen    all         12:35:57    n02                 2        64G         gres:gpu:1          2026-01-26T21:55:23 2026-01-28T21:55:23 &lt;br /&gt;
36152  msezgin   all         1-02:32:04  n03                 1        64G         gres:gpu:1          2026-01-26T07:59:16 2026-01-28T07:59:16 &lt;br /&gt;
36132  tsukiant  cmist_condo 1-11:00:02  n03                 16       8G          gres:gpu:1          2026-01-25T23:31:18 2026-01-27T23:31:18 &lt;br /&gt;
36100  tsukiant  cmist_condo 1-17:32:39  n03                 16       8G          gres:gpu:1          2026-01-25T16:58:41 2026-01-27T16:58:41 &lt;br /&gt;
36090  tsukiant  cmist_condo 1-18:22:51  n03                 16       8G          gres:gpu:1          2026-01-25T16:08:29 2026-01-27T16:08:29 &lt;br /&gt;
36247  jwalches  statds      42:38       n01                 40       15G         gres:gpu:3          2026-01-27T09:48:42 2026-01-29T09:48:42 &lt;br /&gt;
36051  xiangchs  statds_condo7:05:24     n01                 64       128G        gres:gpu:4          2026-01-27T03:25:56 2026-01-29T03:25:56 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are two jobs running on node 1, one on node 2, four on node 3, and one job that is not running because it was submitted with requirements that will not be met. The listed end times are based on the time limit specified when the job was submitted, so the jobs may end sooner. If you submit a job that is waiting for resources, the reason will be listed as &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt;, and after a few minutes Slurm will list a start time for your job based on when other jobs will finish and free up resources.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but with a lower priority than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring cluster usage ==&lt;br /&gt;
The [https://util.stat.cmu.edu/grafana/d/Oxed_c6Wz/nvidia-wright-gpu-metrics NVIDIA Wright GPU Metrics Dashboard] shows graphs of GPU usage across the cluster. At the top left, you can select which node to graph, so viewing your department&#039;s node will let you see how GPUs are being used.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re developing a long-running job, we recommend checking this dashboard while your job is running. It is easy to accidentally write PyTorch or Tensorflow code that &#039;&#039;&#039;doesn&#039;t actually use the GPU&#039;&#039;&#039;, so check the graphs to see if the expected number of GPUs are in used based on your job&#039;s requirements and the other jobs listed in &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt;. If they are not, get a terminal on the compute node as described above and run &amp;lt;code&amp;gt;nvidia-smi&amp;lt;/code&amp;gt; to get GPU usage information, including which scripts are accessing the GPU. If your script doesn&#039;t show up, you can debug it to figure out why no GPUs are being used.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=426</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=426"/>
		<updated>2026-01-20T17:57:47Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: job etiquette, clarify condos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
The file server has quotas enabled so that each department gets 1/3rd of the available storage. If a department user tries to add files beyond the quota, the writes will be rejected, and nobody in that department will be able to add files until space is freed. To check the quotas and your own usage, [https://util.stat.cmu.edu/quotareport/ view the quota report].&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use squeue:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1326      phil     bash shaoanxi  R   22:41:00      1 n02&lt;br /&gt;
              1327      phil     bash shaoanxi  R   22:39:42      1 n02&lt;br /&gt;
              1486    statds run_coun  soheuny  R    1:12:53      1 n01&lt;br /&gt;
              1488    statds run_coun  soheuny  R    1:06:00      1 n01&lt;br /&gt;
              1489    statds run_coun  soheuny  R    1:00:53      1 n01&lt;br /&gt;
              1490    statds run_coun  soheuny  R    1:00:07      1 n01&lt;br /&gt;
              1491    statds run_coun  soheuny  R      24:02      1 n01&lt;br /&gt;
              1492    statds run_coun  soheuny  R       6:15      1 n01&lt;br /&gt;
              1493    statds run_coun  soheuny  R       3:16      1 n01&lt;br /&gt;
              1494    statds run_coun  soheuny  R       0:52      1 n01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are eight jobs running on node 1 and 2 jobs running on node 2.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions and condos ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected. &lt;br /&gt;
&lt;br /&gt;
There are several other special partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; requests any available node from any partition. Thus a Philosophy user can run a job on the CMIST node, or vice versa.&lt;br /&gt;
* &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;phil_condo&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;cmist_condo&amp;lt;/code&amp;gt; are &amp;quot;condo&amp;quot; partitions. Any user can submit to any of these partitions.&lt;br /&gt;
&lt;br /&gt;
These special partitions are like holiday condos: any user can access them, but with a lower priority than the owner (the host department). Jobs running on them are also preemptible. For example, if a Philosophy user submits to &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt;, their job will run only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available. The &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; partition is similar, but for whichever node happens to be free.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
* You submit a job to a condo partition. The partition is currently full, so your job is queued. Other users from that department submit new jobs. As they are higher priority than you, their jobs run first.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Job etiquette ===&lt;br /&gt;
The cluster is shared between users and departments. Therefore:&lt;br /&gt;
&lt;br /&gt;
* Request the minimum resources required for your job, so other users can access other resources.&lt;br /&gt;
* If you need to submit a large number of jobs and aren&#039;t in a hurry, consider using your department&#039;s condo partition or &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;. Using &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; lets you get all available resources, but at lower priority, so other users can run jobs as well and you don&#039;t hog the cluster.&lt;br /&gt;
* Watch your disk space usage. With large deep models it is easy to use many terabytes of storage, and each department has a quota. [https://util.stat.cmu.edu/quotareport/ You can check the quota and your own usage here.]&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=425</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=425"/>
		<updated>2026-01-20T16:59:13Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Submitting batch jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use squeue:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1326      phil     bash shaoanxi  R   22:41:00      1 n02&lt;br /&gt;
              1327      phil     bash shaoanxi  R   22:39:42      1 n02&lt;br /&gt;
              1486    statds run_coun  soheuny  R    1:12:53      1 n01&lt;br /&gt;
              1488    statds run_coun  soheuny  R    1:06:00      1 n01&lt;br /&gt;
              1489    statds run_coun  soheuny  R    1:00:53      1 n01&lt;br /&gt;
              1490    statds run_coun  soheuny  R    1:00:07      1 n01&lt;br /&gt;
              1491    statds run_coun  soheuny  R      24:02      1 n01&lt;br /&gt;
              1492    statds run_coun  soheuny  R       6:15      1 n01&lt;br /&gt;
              1493    statds run_coun  soheuny  R       3:16      1 n01&lt;br /&gt;
              1494    statds run_coun  soheuny  R       0:52      1 n01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are eight jobs running on node 1 and 2 jobs running on node 2.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected.&lt;br /&gt;
&lt;br /&gt;
Each partition has its own physical server resources, so this ensures each department gets priority access to its own hardware.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Submitting &amp;quot;condo&amp;quot; jobs ===&lt;br /&gt;
If your department&#039;s partition is busy, you may submit jobs to &amp;quot;condo&amp;quot; partitions to run on other nodes. The condo partitions are special:&lt;br /&gt;
&lt;br /&gt;
* Your job will run at a lower priority than that department&#039;s users. (Slurm calls this &amp;quot;QOS&amp;quot;, so the jobs will have &amp;quot;normal&amp;quot; as their priority, vs. a &amp;quot;priority&amp;quot; value for the department&#039;s users.)&lt;br /&gt;
* Your job will be preemptible: if the host department&#039;s users submit a job after yours that requires your resources, your job will be terminated and put back in the queue.&lt;br /&gt;
&lt;br /&gt;
The condo partitions are named the same as the usual partitions, but ending with &amp;lt;code&amp;gt;_condo&amp;lt;/code&amp;gt;. You must submit to the condo partition -- if you submit to another department&#039;s partition otherwise, your job will be rejected.&lt;br /&gt;
&lt;br /&gt;
For example, if you are a Philosophy user, submitting a job to the &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt; partition will run it on the Statistics node, but only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available.&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script in your favorite programming language that does whatever computation you want&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for job, HH:MM:SS (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Selecting the right resources ===&lt;br /&gt;
In the Slurm script above, you can choose the number of tasks, the number of GPUs, the memory per CPU, the number of GPUs, and the time limit. Choose these values wisely:&lt;br /&gt;
&lt;br /&gt;
* You generally want &#039;&#039;&#039;1 task&#039;&#039;&#039; (&amp;lt;code&amp;gt;--ntasks 1&amp;lt;/code&amp;gt;). Asking for multiple tasks will cause srun to run multiple copies of your script simultaneously. If you need to run the same script with 10 different parameter values, this can be useful: request 10 tasks, and read the &amp;lt;code&amp;gt;SLURM_PROCID&amp;lt;/code&amp;gt; environment variable in your script. It will be numbered 0-9 (for 10 tasks), so you can use this to set the parameter values for each parallel run.&lt;br /&gt;
* Set the number of CPUs based on your script. If your script is entirely single-threaded, ask for 1. If you use parallel processing (such as with multiprocessing in Python or the parallel package in R), use a multithreaded package, or spawn many parallel programs in your job, request more.&lt;br /&gt;
* Request the minimum amount of memory (RAM) needed for your script. This is per-CPU, so requesting a lot of CPUs and RAM can easily mean you request more RAM than exists on the node.&lt;br /&gt;
* Start with 1 GPU, adding more if your job requires more GPU memory (VRAM) than is on one GPU, or if you explicitly write your script to use more. If you do not use GPUs, request 0 so you aren&#039;t allocated a GPU that nobody else can use while your job runs.&lt;br /&gt;
* Set the time limit a little longer than you expect your script to run. Slurm uses the time limit when scheduling, so always choosing the maximum (48 hours) will backfire: Slurm will assume your job will take a long time and will run other things first. If you know your job can only take an hour, setting, say, a 01:30:00 time limit will let Slurm fit your job in before other long jobs in the queue. But of course if you choose too low and your job exceeds the limit, it will be killed, so leave yourself some extra time.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=424</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=424"/>
		<updated>2026-01-20T16:49:52Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: improve organization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science, Philosophy, and CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
=== Open OnDemand ===&lt;br /&gt;
&lt;br /&gt;
Open OnDemand is a graphical interface where you can run jobs, interactive applications, and manage files. More information can be found [[Open OnDemand Wright|here]].&lt;br /&gt;
&lt;br /&gt;
== Job scheduling and prioritization ==&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
=== Queue status ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use squeue:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1326      phil     bash shaoanxi  R   22:41:00      1 n02&lt;br /&gt;
              1327      phil     bash shaoanxi  R   22:39:42      1 n02&lt;br /&gt;
              1486    statds run_coun  soheuny  R    1:12:53      1 n01&lt;br /&gt;
              1488    statds run_coun  soheuny  R    1:06:00      1 n01&lt;br /&gt;
              1489    statds run_coun  soheuny  R    1:00:53      1 n01&lt;br /&gt;
              1490    statds run_coun  soheuny  R    1:00:07      1 n01&lt;br /&gt;
              1491    statds run_coun  soheuny  R      24:02      1 n01&lt;br /&gt;
              1492    statds run_coun  soheuny  R       6:15      1 n01&lt;br /&gt;
              1493    statds run_coun  soheuny  R       3:16      1 n01&lt;br /&gt;
              1494    statds run_coun  soheuny  R       0:52      1 n01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are eight jobs running on node 1 and 2 jobs running on node 2.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
The cluster is divided into three partitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;statds&amp;lt;/code&amp;gt; (Statistics &amp;amp; Data Science)&lt;br /&gt;
* &amp;lt;code&amp;gt;phil&amp;lt;/code&amp;gt; (Philosophy)&lt;br /&gt;
* &amp;lt;code&amp;gt;cmist&amp;lt;/code&amp;gt; (CMIST)&lt;br /&gt;
&lt;br /&gt;
Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected.&lt;br /&gt;
&lt;br /&gt;
Each partition has its own physical server resources, so this ensures each department gets priority access to its own hardware.&lt;br /&gt;
&lt;br /&gt;
=== Job prioritization ===&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order. Slurm also adjusts each user&#039;s priority based on how many jobs they submit, so that one user can&#039;t hog the cluster by submitting dozens of jobs; if one user has many jobs waiting, theirs will be reduced in priority so other users can run jobs as well.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run. Other jobs may be put off until after yours runs, so yours can get the 8 GPUs it needs.&lt;br /&gt;
* You submit 50 jobs that each require 1 GPU. The node has only 8 GPUs, but several are in use. Several of your jobs run, but the others are queued for later. Other users can submit jobs while yours are in the queue, and some of their jobs may run before some of yours, for fairness.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Submitting &amp;quot;condo&amp;quot; jobs ===&lt;br /&gt;
If your department&#039;s partition is busy, you may submit jobs to &amp;quot;condo&amp;quot; partitions to run on other nodes. The condo partitions are special:&lt;br /&gt;
&lt;br /&gt;
* Your job will run at a lower priority than that department&#039;s users. (Slurm calls this &amp;quot;QOS&amp;quot;, so the jobs will have &amp;quot;normal&amp;quot; as their priority, vs. a &amp;quot;priority&amp;quot; value for the department&#039;s users.)&lt;br /&gt;
* Your job will be preemptible: if the host department&#039;s users submit a job after yours that requires your resources, your job will be terminated and put back in the queue.&lt;br /&gt;
&lt;br /&gt;
The condo partitions are named the same as the usual partitions, but ending with &amp;lt;code&amp;gt;_condo&amp;lt;/code&amp;gt;. You must submit to the condo partition -- if you submit to another department&#039;s partition otherwise, your job will be rejected.&lt;br /&gt;
&lt;br /&gt;
For example, if you are a Philosophy user, submitting a job to the &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt; partition will run it on the Statistics node, but only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will automatically run again when resources become available.&lt;br /&gt;
&lt;br /&gt;
== Setting up jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script that implements things in your favorite programming language&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
#SBATCH --job-name=nameofyourjob&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for task (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== SSH to Compute Nodes ===&lt;br /&gt;
The ability to SSH directly to compute nodes is disabled. You can run the command below to start a bash terminal on a compute node when running a batch job. This allows for the same functionality as SSH.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun —jobid=yourjobidhere --pty /bin/bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Terminal_multiplexers&amp;diff=386</id>
		<title>Terminal multiplexers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Terminal_multiplexers&amp;diff=386"/>
		<updated>2025-10-24T15:13:58Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: Formatting improvements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;“Terminal Multiplexers”, like &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;, are extremely useful tools for running jobs on the department servers. The primary reason to use them is so you can run a job on the server and not need to keep your connection with the server open (e.g.&amp;amp;nbsp;you can close your computer, go to sleep, etc. while your job runs). It’s often the case that your connection to the server might disconnect even if your computer just goes to sleep or disconnects from the internet for a minute.&lt;br /&gt;
&lt;br /&gt;
There are two major terminal multiplexer options: &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;. The Internet recommends &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; (but some people in the department use &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
In terms of usage, the most important commands 1. creating a new session 2. detaching but not closing as session 3. reattaching a session and 4. closing a session.&lt;br /&gt;
&lt;br /&gt;
With these four options you can start up a session (1), step away from a session / the server without killing a job you’re running (2), come back to the session you left (3) and close a session once you’re done with it (4). The rest of the commands are icing on the cake.&lt;br /&gt;
&lt;br /&gt;
In the following sections below, we’ll present pros of both, then present sections on standard commands for both approaches. This article is currently more a place to remind yourself of what commands to use than a new introduction to the ideas. We recommend reading either of the introductions (at the end of either tool’s subsection) for get exposure to the power of these tools.&lt;br /&gt;
&lt;br /&gt;
== Comparisons ==&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;: &lt;br /&gt;
#*more consistent syntax (but &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; is still pretty good) &lt;br /&gt;
#*preserves panels / windows even when you detach the session &lt;br /&gt;
#*maybe a little safer in closing sessions (confirms request) &lt;br /&gt;
&lt;br /&gt;
#&amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;: &lt;br /&gt;
#*a stable tool (&amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; is a little more in flux) &lt;br /&gt;
== &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== Basic commands ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;37%&amp;quot; | Action&lt;br /&gt;
! width=&amp;quot;33%&amp;quot; | Command&lt;br /&gt;
! width=&amp;quot;29%&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Start new session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Starting a named session&lt;br /&gt;
| &amp;lt;code&amp;gt;screen -S _session_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| List current sessions&lt;br /&gt;
| &amp;lt;code&amp;gt;screen -list&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Detach session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+a)+d&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Attach/ reopen session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;screen -r _session_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| If only one session is open you can just use &amp;lt;code&amp;gt;screen -r&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Close session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Ctrl+d&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Kill a session you are not currently in&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;screen -XS _session_name_ quit&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| enter scrollback/copy mode&lt;br /&gt;
| &amp;lt;code&amp;gt;Ctrl+a+[&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| end scrollback/paste buff&lt;br /&gt;
| &amp;lt;code&amp;gt;Ctrl+a+]&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Window/panel based commands ===&lt;br /&gt;
&lt;br /&gt;
Having multiple panels / windows going in a single session at the same time.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;37%&amp;quot; | Action&lt;br /&gt;
! width=&amp;quot;33%&amp;quot; | Command&lt;br /&gt;
! width=&amp;quot;29%&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Create new window&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+a)+c&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| split terminal horizontally, and create a new window&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+a)+S&amp;lt;/code&amp;gt;&amp;amp;nbsp; +&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;code&amp;gt;(Ctrl+a)+c&amp;lt;/code&amp;gt;&lt;br /&gt;
| Note the capital S.&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| split terminal vertically, and create a new window&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+a)+&amp;amp;#124;&amp;amp;nbsp;&amp;lt;/code&amp;gt;+&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;code&amp;gt;(Ctrl+a)+c&amp;lt;/code&amp;gt;&lt;br /&gt;
| This only works if the screen is a high enough version.&lt;br /&gt;
|-&lt;br /&gt;
| move between windows&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+a)+&amp;lt;/code&amp;gt; …&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - next window&lt;br /&gt;
| &amp;lt;code&amp;gt;+n&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - previous window&lt;br /&gt;
| &amp;lt;code&amp;gt;+p&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - pick from list&lt;br /&gt;
| &amp;lt;code&amp;gt;+&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Move between splits&lt;br /&gt;
| &amp;lt;font face=&amp;quot;monospace&amp;quot;&amp;gt;(Ctrl+a)+ Tab&amp;lt;/font&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
&lt;br /&gt;
*Introduction: [https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command/ howtogeek.com], [https://linuxize.com/post/how-to-use-linux-screen/ linuxize.com] &lt;br /&gt;
*Cheat sheets: [http://www.pixelbeat.org/lkdb/screen.html pixelbeat.org]. &lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== Basic commands ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;37%&amp;quot; | Action&lt;br /&gt;
! width=&amp;quot;33%&amp;quot; | Command&lt;br /&gt;
! width=&amp;quot;29%&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Start session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Start named session&lt;br /&gt;
| &amp;lt;code&amp;gt;tmux new -s _session_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| Rename session&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+:&amp;lt;/code&amp;gt; -&amp;gt; then &amp;lt;code&amp;gt;rename-session -t _current_name_ _new_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| You don’t have to include &amp;lt;code&amp;gt;-t _current_name_&amp;lt;/code&amp;gt; if you want to rename a session you are in.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Detach session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+d&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Attach/ reopen session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;tmux attach-session -t _session_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Close session [important]&#039;&#039;&#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;tmux kill-session -t _session_name_&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| List current sessions&lt;br /&gt;
| &amp;lt;code&amp;gt;tmux ls&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Window/panel based commands ===&lt;br /&gt;
&lt;br /&gt;
Having multiple panels / windows going in a single session at the same time.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Action&lt;br /&gt;
! Command&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| new window&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+c&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| see window numbering&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+q&amp;lt;/code&amp;gt;&lt;br /&gt;
| flashes number of each panel open&lt;br /&gt;
|-&lt;br /&gt;
| close current window&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+&amp;amp;&amp;lt;/code&amp;gt;&amp;amp;nbsp;-&amp;gt; then &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; close current window&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| create panel splitting&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+&amp;lt;/code&amp;gt; …&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - horizontal splitting&lt;br /&gt;
| &amp;lt;code&amp;gt;+”&amp;lt;/code&amp;gt;&lt;br /&gt;
| this is capital&amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| - vertical splitting&lt;br /&gt;
| &amp;lt;code&amp;gt;+%&amp;lt;/code&amp;gt;&lt;br /&gt;
| this is also a capital&amp;amp;nbsp;&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| - move between panels&lt;br /&gt;
| &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; arrow keys&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| move between windows&lt;br /&gt;
| &amp;lt;code&amp;gt;(Ctrl+b)+&amp;lt;/code&amp;gt; …&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - next window&lt;br /&gt;
| &amp;lt;code&amp;gt;+n&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| - previous window&lt;br /&gt;
| &amp;lt;code&amp;gt;+p&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
&lt;br /&gt;
*Introduction: [https://www.howtogeek.com/671422/how-to-use-tmux-on-linux-and-why-its-better-than-screen/ howtogeek.org] &lt;br /&gt;
*Cheat sheets: [https://www.howtogeek.com/671422/how-to-use-tmux-on-linux-and-why-its-better-than-screen/ howtogeek.org] (see the bottom of the article).&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=385</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=385"/>
		<updated>2025-10-24T15:13:08Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Servers */ Mention Leviathans&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anyone can read this wiki. &amp;amp;nbsp;If you want to write/edit stuff in the wiki, you will need to log in with your account provided by the Statistics &amp;amp; Data Science Department computing group. This Wiki is intended to be a repository for instruction, information and ideas related to the many computing environments available to members and affiliates of the Statistics &amp;amp; Data Science Department.&lt;br /&gt;
&lt;br /&gt;
== Getting to know the computing resources &amp;amp; getting support ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in knowing about what resources you have access to (and/or) what resources you have access to that might solve a problem you&#039;re having, please visit our [[What_resources_when|&amp;quot;what resources when&amp;quot; article]].&lt;br /&gt;
&lt;br /&gt;
To get support that is beyond this website please attend office hours below and/or email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] for support (for more details about how the support ticketing works through [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] + ServiceNow please see the [[Service_now|ServiceNow]] article).&lt;br /&gt;
&lt;br /&gt;
Reset your StatDS password here - https://util.stat.cmu.edu/passwordreset/&lt;br /&gt;
&lt;br /&gt;
== Department Contacts ==&lt;br /&gt;
&lt;br /&gt;
• [mailto:events@stat.cmu.edu events@stat.cmu.edu]: seminars, conferences &amp;amp; workshops, and calendar updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:news@stat.cmu.edu news@stat.cmu.edu]: dept/dept member-related public news &amp;amp; announcements&lt;br /&gt;
&lt;br /&gt;
• [mailto:lists@stat.cmu.edu lists@stat.cmu.edu]: department email lists&lt;br /&gt;
&lt;br /&gt;
• [mailto:webmaster@stat.cmu.edu webmaster@stat.cmu.edu]: website updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]: computer/tech requests&lt;br /&gt;
&lt;br /&gt;
• [mailto:rooms@stat.cmu.edu rooms@stat.cmu.edu]: request space for meetings and TA office hours&lt;br /&gt;
&lt;br /&gt;
• [mailto:reimbursements@stat.cmu.edu reimbursements@stat.cmu.edu]: travel and reimbursement requests&lt;br /&gt;
&lt;br /&gt;
== Computing Office Hours ==&lt;br /&gt;
&lt;br /&gt;
These office hour opportunities provide a dedicated time for you to come ask questions about research computing.&amp;amp;nbsp; These include code advice, how to access certain resources, what the best resources are for your project, or to learn about new connections to help you progress in your education and research. Staff Office hour times will be sent out each week on Monday as a calendar invite; accept any of the invitations to add it to your personal calendar. PhD TA Office Hours are below, unless a different time is&amp;amp;nbsp;communicated.&lt;br /&gt;
&lt;br /&gt;
#PhD TA Office Hours for the first half of summer 2025 are held by Elizabeth Cucuzzella in FMS Room 320 on Mondays from 2:30 pm to 4:30 pm. PhD students can also message on the #computing channel on slack.&lt;br /&gt;
#Staff Office Hours are held by appointment by Carl Skipper in BH 129G.  Schedule via [mailto:lists@stat.cmu.edu email].&lt;br /&gt;
&lt;br /&gt;
See [[Computing_office_hour_usage|computing office hour usage]] for what office hours can be used for.&lt;br /&gt;
&lt;br /&gt;
== Computing Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
=== Managing servers and environments ===&lt;br /&gt;
&lt;br /&gt;
==== Introductory Tutorials ====&lt;br /&gt;
[[Basic Linux Commands|Introduction to Basic Linux Commands]] &lt;br /&gt;
&lt;br /&gt;
==== Virtual environments ====&lt;br /&gt;
*[[Virtual Environment Introduction|Why use virtual environments?]]&lt;br /&gt;
*[https://info.stat.cmu.edu/index.php?title=Mamba Mamba (Conda) environments].&lt;br /&gt;
*R&#039;s [[Renv]]&lt;br /&gt;
*Python&#039;s [[Python_virtual_environments|virtual environments (2 options)]]&lt;br /&gt;
*Old instructions for [[Conda with Python (Reference Only)|conda with Python]]&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
*[[Introduction to containers]]&lt;br /&gt;
*[[Docker, and why-you-should-use-it-for-your-research]]&lt;br /&gt;
*[[Tutorials|Basic tutorial]]&lt;br /&gt;
*[[Running Docker locally and on Hydras]]&lt;br /&gt;
&lt;br /&gt;
=== Department computing resources ===&lt;br /&gt;
&lt;br /&gt;
==== Printing ====&lt;br /&gt;
*[[Department_Printers|Department Printers]] &lt;br /&gt;
&lt;br /&gt;
==== Web Hosting ====&lt;br /&gt;
#[[How to host your webpage under stat.cmu.edu]]&lt;br /&gt;
#[[Bulding your website with Hugo]]&lt;br /&gt;
&lt;br /&gt;
==== Servers ====&lt;br /&gt;
*[[Department Servers]].  &lt;br /&gt;
*#[[Linux and department servers|Using the Servers Overview]] -This wiki introduces you to the Leviathan and Hydra servers, basic Linux commands, and more.&lt;br /&gt;
*#[[Terminal_multiplexers|Terminal multiplexers (screen and tmux)]]. This wiki presents tools for use on the servers that can allow you to run jobs even when your not on the server, and much much more!&lt;br /&gt;
*#[[Python on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; on a virtual machine, and how to use jupyter notebooks through the server as well.&lt;br /&gt;
*#[[R on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; on a virtual machine&lt;br /&gt;
*#[https://info.stat.cmu.edu/index.php?title=Department_Servers#Software Software] - overview of the software installed and ready for use.&lt;br /&gt;
*#[https://info.stat.cmu.edu/index.php?title=Monitoring_with_Grafana Monitor Server Usage]&lt;br /&gt;
&lt;br /&gt;
*[[Department GPU Servers]], for small jobs needing 1 GPU.&lt;br /&gt;
*[[GPU Cluster]], for larger jobs that may need multiple GPUs and many CPUs.&lt;br /&gt;
*[[PSC]], the Pittsburgh Supercomputing Center. Free accounts and usage credits are available &lt;br /&gt;
*#[[ACCESS]]&lt;br /&gt;
*#[[Slurm]]. This wiki introduces the job management system uses at PSC.&lt;br /&gt;
*#[[Parallelization_on_PSC/Bridges-2]]&lt;br /&gt;
*#[[Access PSC compute nodes directly from VSCode]]&lt;br /&gt;
*[[Open OnDemand]]&lt;br /&gt;
&lt;br /&gt;
=== Development guides ===&lt;br /&gt;
&lt;br /&gt;
====[[Parallel_computing|Parallelization]]====&lt;br /&gt;
*[[Parallelization_in_r|R-specific parallelization]]&lt;br /&gt;
*[[Parallelization_in_python|Python-specific parallelization]]&lt;br /&gt;
&lt;br /&gt;
==== Package development ====&lt;br /&gt;
*[[Developing_R_packages|R package development]]&lt;br /&gt;
*[[Developing_python_packages|Python package development]]&lt;br /&gt;
[[Terminal automation]]. This wiki introduces approaches to automate Linux/OS command line calls.&lt;br /&gt;
*[[Bash files]]. This wiki presents potential uses of Bash files including automated file/folder creation, parallelization and much more!&lt;br /&gt;
*[[Make]]. This wiki presents potential uses of &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and Makefiles including automated workflow and dependency tracking&lt;br /&gt;
*[[Jumping to frequently used folders and automating environment setups]]&lt;br /&gt;
&lt;br /&gt;
==== Version Control ====&lt;br /&gt;
See the guide provided in the site of [https://36-750.github.io/tools/version-control/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== Reference management ====&lt;br /&gt;
#Zotero &lt;br /&gt;
#Mendeley &lt;br /&gt;
&lt;br /&gt;
==== Integrated Development Environments (IDEs) ====&lt;br /&gt;
#[[VSCode|VSCode]] &lt;br /&gt;
#PyCharm &lt;br /&gt;
#RStudio &lt;br /&gt;
#Eclipse &lt;br /&gt;
&lt;br /&gt;
==== Text Editors ====&lt;br /&gt;
#Vim &lt;br /&gt;
#Nano &lt;br /&gt;
#Emacs &lt;br /&gt;
#Atom &lt;br /&gt;
#Sublime &lt;br /&gt;
&lt;br /&gt;
See also the guide provided in the site of [https://36-750.github.io/tools/editors/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== AI Tools ====&lt;br /&gt;
* [[ChatGPT and other LLMs]]&lt;br /&gt;
&lt;br /&gt;
*[[github_copilot|GitHub Copilot]]&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous====&lt;br /&gt;
#[[Windows_Subsystem_for_Linux_(WSL)_and_Python|Windows&amp;amp;nbsp;Subsystem for Linux (WSL) and Python]]&lt;br /&gt;
#[[Amphetamine|Amphetamine: How to keep your computer awake]]&lt;br /&gt;
&lt;br /&gt;
===General Department Computing Resources===&lt;br /&gt;
&lt;br /&gt;
*Fall 2021 [[Computing_seminar_resources|Computing Seminar Resources]] (video and slides)&lt;br /&gt;
&lt;br /&gt;
==Ideas for the Wiki==&lt;br /&gt;
&lt;br /&gt;
Please see the [[TODO|TODO page]] to post suggestions and errata.&lt;br /&gt;
&lt;br /&gt;
==Using the Wiki==&lt;br /&gt;
&lt;br /&gt;
*Here is some&amp;amp;nbsp;[[Generic_Wiki_Information|Generic Wiki Information]]&amp;amp;nbsp;that you may be interested in, such as a users&#039; guide and other resources for Wiki users.&lt;br /&gt;
&lt;br /&gt;
== Archived Pages ==&lt;br /&gt;
These area pages that are potentially useful for some users, but no longer reflect the computing resources of the department writ large.&lt;br /&gt;
&lt;br /&gt;
Azure&lt;br /&gt;
#[[Azure_getting_started|Azure: getting started]]. This wiki walks you through the steps to create a virtual machine through Azure&lt;br /&gt;
#[[How to obtain a virtual machine with a GPU]]&lt;br /&gt;
#[[Attach a disk to a virtual machine]]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=384</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=384"/>
		<updated>2025-10-24T15:12:25Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
== What computing resources do you have access to ==&lt;br /&gt;
&lt;br /&gt;
=== Your personal computer ===&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. Best for short jobs that require only a few cores. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
capacity:&lt;br /&gt;
*few cores: 4-8 cores common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt; (hyperthreading means 8-16 “cores”).&lt;br /&gt;
*low RAM: 4-32 GB of common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt;, used across all cores&lt;br /&gt;
*“no” GPUs: you don’t have GPUs that are optimized for Deep Learning&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
other usage: You often want to use your computer for other things (and it’s built for that exact thing). It’s possible you or someone you know has has had to leave their laptop at home for the day/ run code overnight. When they need to run something intensive -OR- long. But you need that laptop for other work / homework…&lt;br /&gt;
&lt;br /&gt;
The below XKCD comic doesn’t have to be you… (though breaks are good):&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|none|https://xkcd.com/303/]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
=== The department servers ===&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The Leviathans and Hydras have more RAM than a typical laptop. The Leviathans also have top-of-the-line CPUs that should be faster than most laptops, though the Hydras have older CPUs that may not be faster than running code on your own laptop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long&lt;br /&gt;
#Plenty of RAM per machine (128 GB on Leviathans + hydra7 and 8, 64 GB on other hydras)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started)&lt;br /&gt;
#File management system shares across all servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12 (Hydras) or 16 (Leviathans)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Leviathan Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
== Computing resource flowchart ==&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
[[File:ProblemsOnYourPersonalComputerUpdated.png|center|thumb|1000x1000px]]&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=383</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=383"/>
		<updated>2025-10-24T15:11:54Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: Mention Leviathans&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
== What computing resources do you have access to ==&lt;br /&gt;
&lt;br /&gt;
=== Your personal computer ===&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. Best for short jobs that require only a few cores. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
capacity:&lt;br /&gt;
*few cores: 4-8 cores common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt; (hyperthreading means 8-16 “cores”).&lt;br /&gt;
*low RAM: 4-32 GB of common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt;, used across all cores&lt;br /&gt;
*“no” GPUs: you don’t have GPUs that are optimized for Deep Learning&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
other usage: You often want to use your computer for other things (and it’s built for that exact thing). It’s possible you or someone you know has has had to leave their laptop at home for the day/ run code overnight. When they need to run something intensive -OR- long. But you need that laptop for other work / homework…&lt;br /&gt;
&lt;br /&gt;
The below XKCD comic doesn’t have to be you… (though breaks are good):&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|none|https://xkcd.com/303/]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
=== The department servers ===&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The Leviathans and Hydras have more RAM than a typical laptop. The Leviathans also have top-of-the-line CPUs that should be faster than most laptops, though the Hydras have older CPUs that may not be faster than running code on your own laptop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long&lt;br /&gt;
#Plenty of RAM per machine (128 GB on Leviathans + hydra7 and 8, 64 GB on other hydras)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started)&lt;br /&gt;
#File management system shares across all servers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12 (Hydras) or 16 (Leviathans)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Leviathan Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
= Computing resource flowchart =&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
[[File:ProblemsOnYourPersonalComputerUpdated.png|center|thumb|1000x1000px]]&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=382</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=382"/>
		<updated>2025-10-24T15:07:42Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: Mention Leviathans&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has two sets of servers, the Leviathans and the Hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 hydra servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt; and 6 leviathan servers (named {&amp;lt;code&amp;gt;leviathan1&amp;lt;/code&amp;gt;, ..., &amp;lt;code&amp;gt;leviathan6&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Each Hydra has 12 CPU cores and 64 GB of RAM.&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# Each Leviathan has 16 CPU cores and 128 GB of RAM. The Leviathan CPUs are much faster than the Hydra CPUs.&lt;br /&gt;
# The Hydras and Leviathans all share the same data file system. This allows you to upload a file to any of the servers and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed&lt;br /&gt;
#* This allows MPI based parallelization to be used&lt;br /&gt;
#* Note that the hydras ARE NOT network connected, so MPI can only be used within a single hydra. It cannot communicate across multiple hydras.&lt;br /&gt;
#* If you need to run something in parallel across multiple nodes, you should use [[PSC]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Grafana dashboard for the hydras] and [https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 for the Leviathans]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== Passwordless ssh ===&lt;br /&gt;
To get on the server without typing in the password, you need to first generate a SSH key pair. This creates a private key that identifies your laptop, and a public key that the servers can use to recognize your private key.&lt;br /&gt;
&lt;br /&gt;
* For Linux or Mac, open up a terminal and check whether you already have a key pair: run &amp;lt;code&amp;gt;ls ~/.ssh&amp;lt;/code&amp;gt; and see if you have any files with names starting &amp;lt;code&amp;gt;id_&amp;lt;/code&amp;gt;. If you do, you already have a key pair, and you can skip to the &amp;lt;code&amp;gt;ssh-copy-id&amp;lt;/code&amp;gt; step below.&lt;br /&gt;
* Next, generate a key pair (both public and private key). There are different types of keys (RSA, ECDSA, and Ed25519). The &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; option specifies the type of key pair.&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
* A prompt for what to name the key pair and what folder to place it in should appear. The username should be the username for your local computer and &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt; is the key pair name. You can change it. The local key should be stored in the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on your local computer.&lt;br /&gt;
 Generating public/private ed25519 key pair.&lt;br /&gt;
 Enter file in which to save the key (/home/username/.ssh/id_ed25519):&lt;br /&gt;
* Hit Enter to accept the default name and location, or enter the folder and name manually.&lt;br /&gt;
* A prompt for a passphrase should appear. This is for securing the local key (on local computer) and is optional. &amp;lt;code&amp;gt;Enter Passphrase (empty for no passphrase):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure there is a &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on the server. If not, make a .ssh folder.&lt;br /&gt;
* Next, upload the public key to remote server. This command will upload the public key to all the hydras and ghidorahs since they share a file system. &lt;br /&gt;
 ssh-copy-id andrew_id@hydra1.stat.cmu.edu&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory are updated, log into the hydras and run:&lt;br /&gt;
 chmod 700 ~/.ssh&lt;br /&gt;
 chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Department_Servers&amp;diff=381</id>
		<title>Department Servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Department_Servers&amp;diff=381"/>
		<updated>2025-10-24T14:46:50Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Hydras */ mention which hydras have more RAM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hydras ==&lt;br /&gt;
The Hydras are virtual based serves hosted in the Campus Cloud. They offer slightly higher stability and are better for smaller computing jobs.&lt;br /&gt;
&lt;br /&gt;
Hardware Specifications&lt;br /&gt;
&lt;br /&gt;
* Intel Xeon CPU&lt;br /&gt;
** 12 cores @2.6Ghz &lt;br /&gt;
* 64GB of RAM (128GB on hydra7 and hydra8)&lt;br /&gt;
* NAS used for /home storage&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/beuw1q6y3dgjkc/hydra-cluster?orgId=1 Grafana Monitoring]&lt;br /&gt;
== Ghidorahs ==&lt;br /&gt;
The Ghidorahs are physical servers located throughout Baker Hall. They are designed for lighter GPU jobs. &lt;br /&gt;
&lt;br /&gt;
Hardware Specifications &lt;br /&gt;
&lt;br /&gt;
* Core i9-13900KF CPU &lt;br /&gt;
** 8 performance cores @5.4Ghz &lt;br /&gt;
** 16 Efficiency cores @4.3Ghz &lt;br /&gt;
* 64GB of RAM&lt;br /&gt;
* RTX 4090 24GB of video memory&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Grafana Monitoring]&lt;br /&gt;
== Leviathans ==&lt;br /&gt;
The Leviathans are physical servers located throughout Baker Hall. They are designed for heavy CPU and RAM jobs.&lt;br /&gt;
&lt;br /&gt;
Hardware Specifications&lt;br /&gt;
&lt;br /&gt;
* AMD Ryzen 9 9950x&lt;br /&gt;
** 16 cores @5.7Ghz&lt;br /&gt;
* 128GB of RAM&lt;br /&gt;
* 4TB of local NVME storage&lt;br /&gt;
** Mounted at /scratch&lt;br /&gt;
** Data stored in this location will only be accessible on the original server.&lt;br /&gt;
&lt;br /&gt;
[https://info.stat.cmu.edu/grafana/d/asjkldfbnvajdsfh213/leviathan-cluster?orgId=1 Grafana Monitor]&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
Each server&#039;s &amp;quot;/home&amp;quot; directory located on the department&#039;s NAS. This means your files will be accessible on every server.&lt;br /&gt;
&lt;br /&gt;
The NAS is a total of 100TB. This space is shared and monitored for fair usage. If you store large amounts of data, you may be asked if it is all necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see available space on the NAS, run the command below in a terminal on the server.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
df -h | grep &amp;quot;/home&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;To see your total usage run the command below. &#039;&#039;It may take a few minutes to finish&#039;&#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 du -sh ~&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using the Servers ==&lt;br /&gt;
&lt;br /&gt;
Accessing the servers requires using an SSH compatible terminal. Applications such as &amp;quot;Command Prompt&amp;quot; on Windows or &amp;quot;Terminal&amp;quot; on MacOS can achieve this.&lt;br /&gt;
To SSH to a server, open either app listed previously and enter the SSH command shown below. Be sure to use your StatDS computing account.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh statdsusername@hydra1.stat.cmu.edu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the line above, replace &amp;quot;hydra1&amp;quot; with the server you want to connect to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Hydras&lt;br /&gt;
!Ghidorahs&lt;br /&gt;
!Leviathans&lt;br /&gt;
|-&lt;br /&gt;
|hydra1&lt;br /&gt;
|ghidroah1&lt;br /&gt;
|leviathan1&lt;br /&gt;
|-&lt;br /&gt;
|hydra2&lt;br /&gt;
|ghidorah2&lt;br /&gt;
|leviathan2&lt;br /&gt;
|-&lt;br /&gt;
|hydra3&lt;br /&gt;
|ghidorah3&lt;br /&gt;
|leviathan3&lt;br /&gt;
|-&lt;br /&gt;
|hydra4&lt;br /&gt;
|&lt;br /&gt;
|leviathan4&lt;br /&gt;
|-&lt;br /&gt;
|hydra5&lt;br /&gt;
|&lt;br /&gt;
|leviathan5&lt;br /&gt;
|-&lt;br /&gt;
|hydra6&lt;br /&gt;
|&lt;br /&gt;
|leviathan6&lt;br /&gt;
|-&lt;br /&gt;
|hydra7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra9&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra11&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra12&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|hydra12&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
The servers within Statistics &amp;amp; Data Science offer a variety of software. Sudo access, also referred to as the ability to install software, on department servers is not allowed. If a software package you would like to use is not listed below, please contact remarks@stat.cmu.edu.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Hydras&lt;br /&gt;
!Ghidorahs&lt;br /&gt;
!Leviathans&lt;br /&gt;
|-&lt;br /&gt;
|Python&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Apptainer&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Quarto&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gurobi &lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Rstudio-Server&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Matlab&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|-&lt;br /&gt;
|Julia&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=356</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=356"/>
		<updated>2025-09-18T17:24:35Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Managing servers and environments */ fix internal link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anyone can read this wiki. &amp;amp;nbsp;If you want to write/edit stuff in the wiki, you will need to log in with your account provided by the Statistics &amp;amp; Data Science Department computing group. This Wiki is intended to be a repository for instruction, information and ideas related to the many computing environments available to members and affiliates of the Statistics &amp;amp; Data Science Department.&lt;br /&gt;
&lt;br /&gt;
== Getting to know the computing resources &amp;amp; getting support ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in knowing about what resources you have access to (and/or) what resources you have access to that might solve a problem you&#039;re having, please visit our [[What_resources_when|&amp;quot;what resources when&amp;quot; article]].&lt;br /&gt;
&lt;br /&gt;
To get support that is beyond this website please attend office hours below and/or email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] for support (for more details about how the support ticketing works through [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] + ServiceNow please see the [[Service_now|ServiceNow]] article).&lt;br /&gt;
&lt;br /&gt;
Reset your StatDS password here - https://util.stat.cmu.edu/passwordreset/&lt;br /&gt;
&lt;br /&gt;
== Department Contacts ==&lt;br /&gt;
&lt;br /&gt;
• [mailto:events@stat.cmu.edu events@stat.cmu.edu]: seminars, conferences &amp;amp; workshops, and calendar updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:news@stat.cmu.edu news@stat.cmu.edu]: dept/dept member-related public news &amp;amp; announcements&lt;br /&gt;
&lt;br /&gt;
• [mailto:lists@stat.cmu.edu lists@stat.cmu.edu]: department email lists&lt;br /&gt;
&lt;br /&gt;
• [mailto:webmaster@stat.cmu.edu webmaster@stat.cmu.edu]: website updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]: computer/tech requests&lt;br /&gt;
&lt;br /&gt;
• [mailto:rooms@stat.cmu.edu rooms@stat.cmu.edu]: request space for meetings and TA office hours&lt;br /&gt;
&lt;br /&gt;
• [mailto:reimbursements@stat.cmu.edu reimbursements@stat.cmu.edu]: travel and reimbursement requests&lt;br /&gt;
&lt;br /&gt;
== Computing Office Hours ==&lt;br /&gt;
&lt;br /&gt;
These office hour opportunities provide a dedicated time for you to come ask questions about research computing.&amp;amp;nbsp; These include code advice, how to access certain resources, what the best resources are for your project, or to learn about new connections to help you progress in your education and research. Staff Office hour times will be sent out each week on Monday as a calendar invite; accept any of the invitations to add it to your personal calendar. PhD TA Office Hours are below, unless a different time is&amp;amp;nbsp;communicated.&lt;br /&gt;
&lt;br /&gt;
#PhD TA Office Hours for the first half of summer 2025 are held by Elizabeth Cucuzzella in FMS Room 320 on Mondays from 2:30 pm to 4:30 pm. PhD students can also message on the #computing channel on slack.&lt;br /&gt;
#Staff Office Hours are held by appointment by Carl Skipper in BH 129G.  Schedule via [mailto:lists@stat.cmu.edu email].&lt;br /&gt;
&lt;br /&gt;
See [[Computing_office_hour_usage|computing office hour usage]] for what office hours can be used for.&lt;br /&gt;
&lt;br /&gt;
== Computing Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
=== Managing servers and environments ===&lt;br /&gt;
&lt;br /&gt;
==== Introductory Tutorials ====&lt;br /&gt;
[[Basic Linux Commands|Introduction to Basic Linux Commands]] &lt;br /&gt;
&lt;br /&gt;
==== Virtual environments ====&lt;br /&gt;
*[[Virtual Environment Introduction|Why use virtual environments?]]&lt;br /&gt;
*R&#039;s [[Renv]]&lt;br /&gt;
*Python&#039;s [[Python_virtual_environments|virtual environments (2 options)]]&lt;br /&gt;
*Old instructions for [[Conda with Python (Reference Only)|conda with Python]]&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
*[[Introduction to containers]]&lt;br /&gt;
*[[Docker, and why-you-should-use-it-for-your-research]]&lt;br /&gt;
*[[Tutorials|Basic tutorial]]&lt;br /&gt;
*[[Running Docker locally and on Hydras]]&lt;br /&gt;
&lt;br /&gt;
=== Department computing resources ===&lt;br /&gt;
&lt;br /&gt;
==== Printing ====&lt;br /&gt;
*[[Department_Printers|Department Printers]] &lt;br /&gt;
&lt;br /&gt;
==== Web Hosting ====&lt;br /&gt;
#[[How to host your webpage under stat.cmu.edu]]&lt;br /&gt;
#[[Bulding your website with Hugo]]&lt;br /&gt;
&lt;br /&gt;
==== Servers ====&lt;br /&gt;
*[[Department Servers]].  &lt;br /&gt;
*#[[Linux and department servers|Using the Servers Overview]] -This wiki introduces you to the &#039;&#039;&#039;hydra&#039;&#039;&#039; servers, basic Linux commands, and more.&lt;br /&gt;
*#[[Terminal_multiplexers|Terminal multiplexers (screen and tmux)]]. This wiki presents tools for use on the &#039;&#039;hydra&#039;&#039; that can allow you to run jobs even when your not on the server, and much much more!&lt;br /&gt;
*#[[Python on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; on a virtual machine, and how to use jupyter notebooks through the server as well.&lt;br /&gt;
*#[[R on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; on a virtual machine&lt;br /&gt;
*#[https://info.stat.cmu.edu/index.php?title=Department_Servers#Software Software] - overview of the software installed and ready for use.&lt;br /&gt;
*#[https://info.stat.cmu.edu/index.php?title=Monitoring_with_Grafana Monitor Server Usage]&lt;br /&gt;
&lt;br /&gt;
*[[Department GPU Servers]], for small jobs needing 1 GPU.&lt;br /&gt;
*[[GPU Cluster]], for larger jobs that may need multiple GPUs and many CPUs.&lt;br /&gt;
*[[PSC]], the Pittsburgh Supercomputing Center. Free accounts and usage credits are available &lt;br /&gt;
*#[[ACCESS]]&lt;br /&gt;
*#[[Slurm]]. This wiki introduces the job management system uses at PSC.&lt;br /&gt;
*#[[Parallelization_on_PSC/Bridges-2]]&lt;br /&gt;
*#[[Access PSC compute nodes directly from VSCode]]&lt;br /&gt;
*[[Open OnDemand]]&lt;br /&gt;
&lt;br /&gt;
=== Development guides ===&lt;br /&gt;
&lt;br /&gt;
====[[Parallel_computing|Parallelization]]====&lt;br /&gt;
*[[Parallelization_in_r|R-specific parallelization]]&lt;br /&gt;
*[[Parallelization_in_python|Python-specific parallelization]]&lt;br /&gt;
&lt;br /&gt;
==== Package development ====&lt;br /&gt;
*[[Developing_R_packages|R package development]]&lt;br /&gt;
*[[Developing_python_packages|Python package development]]&lt;br /&gt;
[[Terminal automation]]. This wiki introduces approaches to automate Linux/OS command line calls.&lt;br /&gt;
*[[Bash files]]. This wiki presents potential uses of Bash files including automated file/folder creation, parallelization and much more!&lt;br /&gt;
*[[Make]]. This wiki presents potential uses of &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and Makefiles including automated workflow and dependency tracking&lt;br /&gt;
*[[Jumping to frequently used folders and automating environment setups]]&lt;br /&gt;
&lt;br /&gt;
==== Version Control ====&lt;br /&gt;
See the guide provided in the site of [https://36-750.github.io/tools/version-control/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== Reference management ====&lt;br /&gt;
#Zotero &lt;br /&gt;
#Mendeley &lt;br /&gt;
&lt;br /&gt;
==== Integrated Development Environments (IDEs) ====&lt;br /&gt;
#[[VSCode|VSCode]] &lt;br /&gt;
#PyCharm &lt;br /&gt;
#RStudio &lt;br /&gt;
#Eclipse &lt;br /&gt;
&lt;br /&gt;
==== Text Editors ====&lt;br /&gt;
#Vim &lt;br /&gt;
#Nano &lt;br /&gt;
#Emacs &lt;br /&gt;
#Atom &lt;br /&gt;
#Sublime &lt;br /&gt;
&lt;br /&gt;
See also the guide provided in the site of [https://36-750.github.io/tools/editors/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== AI Tools ====&lt;br /&gt;
* [[ChatGPT and other LLMs]]&lt;br /&gt;
&lt;br /&gt;
*[[github_copilot|GitHub Copilot]]&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous====&lt;br /&gt;
#[[Windows_Subsystem_for_Linux_(WSL)_and_Python|Windows&amp;amp;nbsp;Subsystem for Linux (WSL) and Python]]&lt;br /&gt;
#[[Amphetamine|Amphetamine: How to keep your computer awake]]&lt;br /&gt;
&lt;br /&gt;
===General Department Computing Resources===&lt;br /&gt;
&lt;br /&gt;
*Fall 2021 [[Computing_seminar_resources|Computing Seminar Resources]] (video and slides)&lt;br /&gt;
&lt;br /&gt;
==Ideas for the Wiki==&lt;br /&gt;
&lt;br /&gt;
Please see the [[TODO|TODO page]] to post suggestions and errata.&lt;br /&gt;
&lt;br /&gt;
==Using the Wiki==&lt;br /&gt;
&lt;br /&gt;
*Here is some&amp;amp;nbsp;[[Generic_Wiki_Information|Generic Wiki Information]]&amp;amp;nbsp;that you may be interested in, such as a users&#039; guide and other resources for Wiki users.&lt;br /&gt;
&lt;br /&gt;
== Archived Pages ==&lt;br /&gt;
These area pages that are potentially useful for some users, but no longer reflect the computing resources of the department writ large.&lt;br /&gt;
&lt;br /&gt;
Azure&lt;br /&gt;
#[[Azure_getting_started|Azure: getting started]]. This wiki walks you through the steps to create a virtual machine through Azure&lt;br /&gt;
#[[How to obtain a virtual machine with a GPU]]&lt;br /&gt;
#[[Attach a disk to a virtual machine]]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=334</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=334"/>
		<updated>2025-08-30T14:49:57Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Submitting batch jobs */ adjust default email config to email on error too&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science and Philosophy, and in CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Slurm ===&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use squeue:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1326      phil     bash shaoanxi  R   22:41:00      1 n02&lt;br /&gt;
              1327      phil     bash shaoanxi  R   22:39:42      1 n02&lt;br /&gt;
              1486    statds run_coun  soheuny  R    1:12:53      1 n01&lt;br /&gt;
              1488    statds run_coun  soheuny  R    1:06:00      1 n01&lt;br /&gt;
              1489    statds run_coun  soheuny  R    1:00:53      1 n01&lt;br /&gt;
              1490    statds run_coun  soheuny  R    1:00:07      1 n01&lt;br /&gt;
              1491    statds run_coun  soheuny  R      24:02      1 n01&lt;br /&gt;
              1492    statds run_coun  soheuny  R       6:15      1 n01&lt;br /&gt;
              1493    statds run_coun  soheuny  R       3:16      1 n01&lt;br /&gt;
              1494    statds run_coun  soheuny  R       0:52      1 n01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are eight jobs running on node 1 and 2 jobs running on node 2.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Job queuing and scheduling ===&lt;br /&gt;
The cluster is divided into three partitions: statds (Statistics &amp;amp; Data Science), phil (Philosophy), and cmist (CMIST). Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected.&lt;br /&gt;
&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script that implements things in your favorite programming language&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for task (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished or errors out:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END,FAIL&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== Submitting &amp;quot;condo&amp;quot; jobs ===&lt;br /&gt;
If your department&#039;s partition is busy, you may submit jobs to &amp;quot;condo&amp;quot; partitions to run on other nodes. The condo partitions are special:&lt;br /&gt;
&lt;br /&gt;
* Your job will run at a lower priority than that department&#039;s users. (Slurm calls this &amp;quot;QOS&amp;quot;, so the jobs will have &amp;quot;normal&amp;quot; as their priority, vs. a &amp;quot;priority&amp;quot; value for the department&#039;s users.)&lt;br /&gt;
* Your job will be preemptible: if the host department&#039;s users submit a job after yours that requires your resources, your job will be terminated and put back in the queue.&lt;br /&gt;
&lt;br /&gt;
The condo partitions are named the same as the usual partitions, but ending with &amp;lt;code&amp;gt;_condo&amp;lt;/code&amp;gt;. You must submit to the condo partition -- if you submit to another department&#039;s partition otherwise, your job will be rejected.&lt;br /&gt;
&lt;br /&gt;
For example, if you are a Philosophy user, submitting a job to the &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt; partition will run it on the Statistics node, but only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will run again when resources become available.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=210</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=210"/>
		<updated>2025-06-12T16:15:13Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Passwordless ssh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has a set of servers, the hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed&lt;br /&gt;
#* This allows MPI based parallelization to be used&lt;br /&gt;
#* Note that the hydras ARE NOT network connected, so MPI can only be used within a single hydra. It cannot communicate across multiple hydras.&lt;br /&gt;
#* If you need to run something in parallel across multiple nodes, you should use [[PSC]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== Passwordless ssh ===&lt;br /&gt;
To get on the server without typing in the password, you need to first generate a SSH key pair. This creates a private key that identifies your laptop, and a public key that the servers can use to recognize your private key.&lt;br /&gt;
&lt;br /&gt;
* For Linux or Mac, open up a terminal and check whether you already have a key pair: run &amp;lt;code&amp;gt;ls ~/.ssh&amp;lt;/code&amp;gt; and see if you have any files with names starting &amp;lt;code&amp;gt;id_&amp;lt;/code&amp;gt;. If you do, you already have a key pair, and you can skip to the &amp;lt;code&amp;gt;ssh-copy-id&amp;lt;/code&amp;gt; step below.&lt;br /&gt;
* Next, generate a key pair (both public and private key). There are different types of keys (RSA, ECDSA, and Ed25519). The &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; option specifies the type of key pair.&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
* A prompt for what to name the key pair and what folder to place it in should appear. The username should be the username for your local computer and &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt; is the key pair name. You can change it. The local key should be stored in the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on your local computer.&lt;br /&gt;
 Generating public/private ed25519 key pair.&lt;br /&gt;
 Enter file in which to save the key (/home/username/.ssh/id_ed25519):&lt;br /&gt;
* Hit Enter to accept the default name and location, or enter the folder and name manually.&lt;br /&gt;
* A prompt for a passphrase should appear. This is for securing the local key (on local computer) and is optional. &amp;lt;code&amp;gt;Enter Passphrase (empty for no passphrase):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure there is a &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on the server. If not, make a .ssh folder.&lt;br /&gt;
* Next, upload the public key to remote server. This command will upload the public key to all the hydras and ghidorahs since they share a file system. &lt;br /&gt;
 ssh-copy-id andrew_id@hydra1.stat.cmu.edu&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory are updated, log into the hydras and run:&lt;br /&gt;
 chmod 700 ~/.ssh&lt;br /&gt;
 chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=209</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=209"/>
		<updated>2025-06-12T15:37:04Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Passwordless ssh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has a set of servers, the hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed&lt;br /&gt;
#* This allows MPI based parallelization to be used&lt;br /&gt;
#* Note that the hydras ARE NOT network connected, so MPI can only be used within a single hydra. It cannot communicate across multiple hydras.&lt;br /&gt;
#* If you need to run something in parallel across multiple nodes, you should use [[PSC]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== Passwordless ssh ===&lt;br /&gt;
To get on the server without typing in the password, you need to first generate a SSH key pair.&lt;br /&gt;
&lt;br /&gt;
* For Linux, open up a terminal and check first that the specific ssh key pair does not exist in the given folder.&lt;br /&gt;
* Next, generate a key pair (both public and private key). There are different types of keys (RSA, DSA, ECDSA, and ED25519). The &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; option specifies the type of key pair.&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
* A prompt for what to name the key pair and what folder to place it in should appear. The username should be the username for your local computer and id_rsa is the key pair name. You can change it. The local key should be stored in the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on your local computer.&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/home/username/.ssh/id_rsa):&lt;br /&gt;
* Hit Enter to accept the default name and location, or enter the folder and name manually.&lt;br /&gt;
* A prompt for a passphrase should appear. This is for securing the local key (on local computer) and is optional. &amp;lt;code&amp;gt;Enter Passphrase (empty for no passphrase):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure there is a &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on the server. If not, make a .ssh folder.&lt;br /&gt;
* Next, upload the public key to remote server. This command will upload the public key to all the hydras and ghidorahs since they share a file system. &lt;br /&gt;
 ssh-copy-id andrew_id@hydra1.stat.cmu.edu&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory are updated:&lt;br /&gt;
 chmod 700 ~/.ssh&lt;br /&gt;
 chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=208</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=208"/>
		<updated>2025-06-12T15:35:57Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Passwordless ssh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has a set of servers, the hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed&lt;br /&gt;
#* This allows MPI based parallelization to be used&lt;br /&gt;
#* Note that the hydras ARE NOT network connected, so MPI can only be used within a single hydra. It cannot communicate across multiple hydras.&lt;br /&gt;
#* If you need to run something in parallel across multiple nodes, you should use [[PSC]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== Passwordless ssh ===&lt;br /&gt;
To get on the server without typing in the password, you need to first generate a SSH key pair.&lt;br /&gt;
&lt;br /&gt;
* For Linux, open up a terminal and check first that the specific ssh key pair does not exist in the given folder.&lt;br /&gt;
* Next, generate a key pair (both public and private key). There are different types of keys (RSA, DSA, ECDSA, and ED25519). The &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; option specifies the type of key pair. &amp;lt;code&amp;gt;ssh-keygen -t rsa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A prompt for what to name the key pair and what folder to place it in should appear. The username should be the username for your local computer and id_rsa is the key pair name. You can change it. The local key should be stored in the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on your local computer. &amp;lt;code&amp;gt;Generating public/private rsa key pair.&amp;lt;/code&amp;gt;   &amp;lt;code&amp;gt;Enter file in which to save the key (/home/username/.ssh/id_rsa):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Hit Enter to accept the default name and location, or enter the folder and name manually.&lt;br /&gt;
* A prompt for a passphrase should appear. This is for securing the local key (on local computer) and is optional. &amp;lt;code&amp;gt;Enter Passphrase (empty for no passphrase):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure there is a &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on the server. If not, make a .ssh folder.&lt;br /&gt;
* Next, upload the public key to remote server. This command will upload the public key to all the hydras and ghidorahs since they share a file system. &amp;lt;code&amp;gt;ssh-copy-id andrew_id@hydra1.stat.cmu.edu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory are updated: &amp;lt;code&amp;gt;chmod 700 ~/.ssh&amp;lt;/code&amp;gt;  &amp;lt;code&amp;gt;chmod 600 ~/.ssh/authorized_keys&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=207</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=207"/>
		<updated>2025-06-12T15:33:36Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Passwordless ssh */ improve formatting and clarity&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has a set of servers, the hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed&lt;br /&gt;
#* This allows MPI based parallelization to be used&lt;br /&gt;
#* Note that the hydras ARE NOT network connected, so MPI can only be used within a single hydra. It cannot communicate across multiple hydras.&lt;br /&gt;
#* If you need to run something in parallel across multiple nodes, you should use [[PSC]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== Passwordless ssh ===&lt;br /&gt;
To get on the server without typing in the password, you need to first generate a SSH key pair.&lt;br /&gt;
&lt;br /&gt;
* For Linux, open up a terminal and check first that the specific ssh key pair does not exist in the given folder.&lt;br /&gt;
* Next, generate a key pair (both public and private key). There are different types of keys (RSA, DSA, ECDSA, and ED25519). The &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; option specifies the type of key pair. &amp;lt;code&amp;gt;ssh-keygen -t rsa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A prompt for what to name the key pair and what folder to place it in should appear. The username should be the username for your local computer and id_rsa is the key pair name. You can change it. The local key should be stored in the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on your local computer. &amp;lt;code&amp;gt;Generating public/private rsa key pair.&amp;lt;/code&amp;gt;  &amp;lt;code&amp;gt;Enter file in which to save the key (/home/username/.ssh/id_rsa):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Hit Enter to accept the default name and location, or enter the folder and name manually.&lt;br /&gt;
* A prompt for a passphrase should appear. This is for securing the local key (on local computer) and is optional. &amp;lt;code&amp;gt;Enter Passphrase (empty for no passphrase):&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Make sure there is a &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; folder on the server. If not, make a .ssh folder.&lt;br /&gt;
* Next, upload the public key to remote server. This command will upload the public key to all the hydras and ghidorahs since they share a file system. &amp;lt;code&amp;gt;ssh-copy-id andrew_id@hydra1.stat.cmu.edu&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To ensure the permissions of the &amp;lt;code&amp;gt;~/.ssh&amp;lt;/code&amp;gt; directory are updated: &amp;lt;code&amp;gt;chmod 700 ~/.ssh&amp;lt;/code&amp;gt;  &amp;lt;code&amp;gt;chmod 600 ~/.ssh/authorized_keys&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to SSH into the server without being prompted for a password.&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=203</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=203"/>
		<updated>2025-05-22T15:49:12Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: unbold&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anyone can read this wiki. &amp;amp;nbsp;If you want to write/edit stuff in the wiki, you will need to log in with your account provided by the Statistics &amp;amp; Data Science Department computing group. This Wiki is intended to be a repository for instruction, information and ideas related to the many computing environments available to members and affiliates of the Statistics &amp;amp; Data Science Department.&lt;br /&gt;
&lt;br /&gt;
== Getting to know the computing resources &amp;amp; getting support ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in knowing about what resources you have access to (and/or) what resources you have access to that might solve a problem you&#039;re having, please visit our [[What_resources_when|&amp;quot;what resources when&amp;quot; article]].&lt;br /&gt;
&lt;br /&gt;
To get support that is beyond this website please attend office hours below and/or email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] for support (for more details about how the support ticketing works through [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] + ServiceNow please see the [[Service_now|ServiceNow]] article).&lt;br /&gt;
&lt;br /&gt;
Reset your StatDS password here - https://util.stat.cmu.edu/passwordreset/&lt;br /&gt;
&lt;br /&gt;
== Department Contacts ==&lt;br /&gt;
&lt;br /&gt;
• [mailto:events@stat.cmu.edu events@stat.cmu.edu]: seminars, conferences &amp;amp; workshops, and calendar updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:news@stat.cmu.edu news@stat.cmu.edu]: dept/dept member-related public news &amp;amp; announcements&lt;br /&gt;
&lt;br /&gt;
• [mailto:lists@stat.cmu.edu lists@stat.cmu.edu]: department email lists&lt;br /&gt;
&lt;br /&gt;
• [mailto:webmaster@stat.cmu.edu webmaster@stat.cmu.edu]: website updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]: computer/tech requests&lt;br /&gt;
&lt;br /&gt;
• [mailto:rooms@stat.cmu.edu rooms@stat.cmu.edu]: request space for meetings and TA office hours&lt;br /&gt;
&lt;br /&gt;
• [mailto:reimbursements@stat.cmu.edu reimbursements@stat.cmu.edu]: travel and reimbursement requests&lt;br /&gt;
&lt;br /&gt;
== Computing Office Hours ==&lt;br /&gt;
&lt;br /&gt;
These office hour opportunities provide a dedicated time for you to come ask questions about research computing.&amp;amp;nbsp; These include code advice, how to access certain resources, what the best resources are for your project, or to learn about new connections to help you progress in your education and research. Staff Office hour times will be sent out each week on Monday as a calendar invite; accept any of the invitations to add it to your personal calendar. PhD TA Office Hours are below, unless a different time is&amp;amp;nbsp;communicated.&lt;br /&gt;
&lt;br /&gt;
#PhD TA Office Hours are held by Alex Shen in Baker 136E on Tuesdays from 3 pm to 5 pm&lt;br /&gt;
#Staff Office Hours are held by appointment  by Carl Skipper in BH 129G.  Schedule via [mailto:lists@stat.cmu.edu email].&lt;br /&gt;
&lt;br /&gt;
See [[Computing_office_hour_usage|computing office hour usage]] for what office hours can be used for.&lt;br /&gt;
&lt;br /&gt;
== Computing Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
=== Managing servers and environments ===&lt;br /&gt;
&lt;br /&gt;
==== Virtual environments ====&lt;br /&gt;
*[[Virtual Environment Introduction|Why use virtual environments?]]&lt;br /&gt;
*R&#039;s [[Renv]]&lt;br /&gt;
*Python&#039;s [[Python_virtual_environments|virtual environments (2 options)]]&lt;br /&gt;
*Old instructions for [[Conda with Python (Reference Only)|conda with Python]]&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
*[[Introduction to containers]]&lt;br /&gt;
*[[Docker, and why-you-should-use-it-for-your-research]]&lt;br /&gt;
*[[Tutorials|Basic tutorial]]&lt;br /&gt;
*[[Running Docker locally and on Hydras]]&lt;br /&gt;
&lt;br /&gt;
=== Department computing resources ===&lt;br /&gt;
&lt;br /&gt;
==== Printing ====&lt;br /&gt;
*[[Department_Printers|Department Printers]] &lt;br /&gt;
&lt;br /&gt;
==== Web Hosting ====&lt;br /&gt;
#[[How to host your webpage under stat.cmu.edu]]&lt;br /&gt;
#[[Bulding your website with Hugo]]&lt;br /&gt;
&lt;br /&gt;
==== Servers ====&lt;br /&gt;
*[[Linux_and_department_servers|Department Servers]]. This wiki introduces you to the &#039;&#039;&#039;hydra&#039;&#039;&#039; servers, basic Linux commands, and more. &lt;br /&gt;
*#[[Terminal_multiplexers|Terminal multiplexers (screen and tmux)]]. This wiki presents tools for use on the &#039;&#039;hydra&#039;&#039; that can allow you to run jobs even when your not on the server, and much much more!&lt;br /&gt;
*#[[Python on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; on a virtual machine, and how to use jupyter notebooks through the server as well.&lt;br /&gt;
*#[[R on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; on a virtual machine&lt;br /&gt;
&lt;br /&gt;
*[[Department GPU Servers]], for small jobs needing 1 GPU.&lt;br /&gt;
*[[GPU Cluster]], for larger jobs that may need multiple GPUs and many CPUs.&lt;br /&gt;
*[[PSC]], the Pittsburgh Supercomputing Center. Free accounts and usage credits are available &lt;br /&gt;
*#[[ACCESS]]&lt;br /&gt;
*#[[Slurm]]. This wiki introduces the job management system uses at PSC.&lt;br /&gt;
*#[[Parallelization_on_PSC/Bridges-2]]&lt;br /&gt;
*#[[Access PSC compute nodes directly from VSCode]]&lt;br /&gt;
*Azure&lt;br /&gt;
*#[[Azure_getting_started|Azure: getting started]]. This wiki walks you through the steps to create a virtual machine through Azure&lt;br /&gt;
*#[[How to obtain a virtual machine with a GPU]]&lt;br /&gt;
*#[[Attach a disk to a virtual machine]]&lt;br /&gt;
&lt;br /&gt;
=== Development guides ===&lt;br /&gt;
&lt;br /&gt;
====[[Parallel_computing|Parallelization]]====&lt;br /&gt;
*[[Parallelization_in_r|R-specific parallelization]]&lt;br /&gt;
*[[Parallelization_in_python|Python-specific parallelization]]&lt;br /&gt;
&lt;br /&gt;
==== Package development ====&lt;br /&gt;
*[[Developing_R_packages|R package development]]&lt;br /&gt;
*[[Developing_python_packages|Python package development]]&lt;br /&gt;
[[Terminal automation]]. This wiki introduces approaches to automate Linux/OS command line calls.&lt;br /&gt;
*[[Bash files]]. This wiki presents potential uses of Bash files including automated file/folder creation, parallelization and much more!&lt;br /&gt;
*[[Make]]. This wiki presents potential uses of &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and Makefiles including automated workflow and dependency tracking&lt;br /&gt;
*[[Jumping to frequently used folders and automating environment setups]]&lt;br /&gt;
&lt;br /&gt;
==== Version Control ====&lt;br /&gt;
See the guide provided in the site of [https://36-750.github.io/tools/version-control/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== Reference management ====&lt;br /&gt;
#Zotero &lt;br /&gt;
#Mendeley &lt;br /&gt;
&lt;br /&gt;
==== Integrated Development Environments (IDEs) ====&lt;br /&gt;
#[[VSCode|VSCode]] &lt;br /&gt;
#PyCharm &lt;br /&gt;
#RStudio &lt;br /&gt;
#Eclipse &lt;br /&gt;
&lt;br /&gt;
==== Text Editors ====&lt;br /&gt;
#Vim &lt;br /&gt;
#Nano &lt;br /&gt;
#Emacs &lt;br /&gt;
#Atom &lt;br /&gt;
#Sublime &lt;br /&gt;
&lt;br /&gt;
See also the guide provided in the site of [https://36-750.github.io/tools/editors/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== AI Tools ====&lt;br /&gt;
* [[ChatGPT and other LLMs]]&lt;br /&gt;
&lt;br /&gt;
*[[github_copilot|GitHub Copilot]]&lt;br /&gt;
&lt;br /&gt;
==== Miscellanea ====&lt;br /&gt;
#[[Windows_Subsystem_for_Linux_(WSL)_and_Python|Windows&amp;amp;nbsp;Subsystem for Linux (WSL) and Python]] &lt;br /&gt;
#[[Amphetamine|Amphetamine: How to keep your computer awake]] &lt;br /&gt;
&lt;br /&gt;
=== General Department Computing Resources ===&lt;br /&gt;
&lt;br /&gt;
*Fall 2021 [[Computing_seminar_resources|Computing Seminar Resources]] (video and slides) &lt;br /&gt;
&lt;br /&gt;
== Ideas for the Wiki ==&lt;br /&gt;
&lt;br /&gt;
Please see the [[TODO|TODO page]] to post suggestions and errata.&lt;br /&gt;
&lt;br /&gt;
== Using the Wiki ==&lt;br /&gt;
&lt;br /&gt;
*Here is some&amp;amp;nbsp;[[Generic_Wiki_Information|Generic Wiki Information]]&amp;amp;nbsp;that you may be interested in, such as a users&#039; guide and other resources for Wiki users.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=201</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=201"/>
		<updated>2025-05-05T18:23:25Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Computing Wiki Pages */ add some context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anyone can read this wiki. &amp;amp;nbsp;If you want to write/edit stuff in the wiki, you will need to log in with your account provided by the Statistics &amp;amp; Data Science Department computing group. This Wiki is intended to be a repository for instruction, information and ideas related to the many computing environments available to members and affiliates of the Statistics &amp;amp; Data Science Department.&lt;br /&gt;
&lt;br /&gt;
== Getting to know the computing resources &amp;amp; getting support ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in knowing about what resources you have access to (and/or) what resources you have access to that might solve a problem you&#039;re having, please visit our [[What_resources_when|&amp;quot;what resources when&amp;quot; article]].&lt;br /&gt;
&lt;br /&gt;
To get support that is beyond this website please attend office hours below and/or email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] for support (for more details about how the support ticketing works through [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] + ServiceNow please see the [[Service_now|ServiceNow]] article).&lt;br /&gt;
&lt;br /&gt;
Reset your StatDS password here - https://util.stat.cmu.edu/passwordreset/&lt;br /&gt;
&lt;br /&gt;
== Department Contacts ==&lt;br /&gt;
&lt;br /&gt;
• [mailto:events@stat.cmu.edu events@stat.cmu.edu]: seminars, conferences &amp;amp; workshops, and calendar updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:news@stat.cmu.edu news@stat.cmu.edu]: dept/dept member-related public news &amp;amp; announcements&lt;br /&gt;
&lt;br /&gt;
• [mailto:lists@stat.cmu.edu lists@stat.cmu.edu]: department email lists&lt;br /&gt;
&lt;br /&gt;
• [mailto:webmaster@stat.cmu.edu webmaster@stat.cmu.edu]: website updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]: computer/tech requests&lt;br /&gt;
&lt;br /&gt;
• [mailto:rooms@stat.cmu.edu rooms@stat.cmu.edu]: request space for meetings and TA office hours&lt;br /&gt;
&lt;br /&gt;
• [mailto:reimbursements@stat.cmu.edu reimbursements@stat.cmu.edu]: travel and reimbursement requests&lt;br /&gt;
&lt;br /&gt;
== Computing Office Hours ==&lt;br /&gt;
&lt;br /&gt;
These office hour opportunities provide a dedicated time for you to come ask questions about research computing.&amp;amp;nbsp; These include code advice, how to access certain resources, what the best resources are for your project, or to learn about new connections to help you progress in your education and research. Staff Office hour times will be sent out each week on Monday as a calendar invite; accept any of the invitations to add it to your personal calendar. PhD TA Office Hours are below, unless a different time is&amp;amp;nbsp;communicated.&lt;br /&gt;
&lt;br /&gt;
#PhD TA Office Hours are held by Alex Shen in Baker 136E on Tuesdays from 3 pm to 5 pm&lt;br /&gt;
#Staff Office Hours are held by appointment  by Carl Skipper in BH 129G.  Schedule via [mailto:lists@stat.cmu.edu email].&lt;br /&gt;
&lt;br /&gt;
See [[Computing_office_hour_usage|computing office hour usage]] for what office hours can be used for.&lt;br /&gt;
&lt;br /&gt;
== Computing Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
=== Managing servers and environments ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Virtual environments&#039;&#039;&#039; ====&lt;br /&gt;
*[[Virtual Environment Introduction|Why use virtual environments?]]&lt;br /&gt;
*R&#039;s [[Renv]]&lt;br /&gt;
*Python&#039;s [[Python_virtual_environments|virtual environments (2 options)]]&lt;br /&gt;
*Old instructions for [[Conda with Python (Reference Only)|conda with Python]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Containers&#039;&#039;&#039; ====&lt;br /&gt;
*[[Introduction to containers]]&lt;br /&gt;
*[[Docker, and why-you-should-use-it-for-your-research]]&lt;br /&gt;
*[[Tutorials|Basic tutorial]]&lt;br /&gt;
*[[Running Docker locally and on Hydras]]&lt;br /&gt;
&lt;br /&gt;
=== Department computing resources ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Printing&#039;&#039;&#039; ====&lt;br /&gt;
*[[Department_Printers|Department Printers]] &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Web Hosting&#039;&#039;&#039; ====&lt;br /&gt;
#[[How to host your webpage under stat.cmu.edu]]&lt;br /&gt;
#[[Bulding your website with Hugo]]&lt;br /&gt;
&lt;br /&gt;
==== Servers ====&lt;br /&gt;
*[[Linux_and_department_servers|Department Servers]]. This wiki introduces you to the &#039;&#039;&#039;hydra&#039;&#039;&#039; servers, basic Linux commands, and more. &lt;br /&gt;
*#[[Terminal_multiplexers|Terminal multiplexers (screen and tmux)]]. This wiki presents tools for use on the &#039;&#039;hydra&#039;&#039; that can allow you to run jobs even when your not on the server, and much much more!&lt;br /&gt;
*#[[Python on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; on a virtual machine, and how to use jupyter notebooks through the server as well.&lt;br /&gt;
*#[[R on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; on a virtual machine&lt;br /&gt;
&lt;br /&gt;
*[[Department GPU Servers]], for small jobs needing 1 GPU.&lt;br /&gt;
*[[GPU Cluster]], for larger jobs that may need multiple GPUs and many CPUs.&lt;br /&gt;
*[[PSC]], the Pittsburgh Supercomputing Center. Free accounts and usage credits are available &lt;br /&gt;
*#[[ACCESS]]&lt;br /&gt;
*#[[Slurm]]. This wiki introduces the job management system uses at PSC.&lt;br /&gt;
*#[[Parallelization_on_PSC/Bridges-2]]&lt;br /&gt;
*#[[Access PSC compute nodes directly from VSCode]]&lt;br /&gt;
*Azure&lt;br /&gt;
*#[[Azure_getting_started|Azure: getting started]]. This wiki walks you through the steps to create a virtual machine through Azure&lt;br /&gt;
*#[[How to obtain a virtual machine with a GPU]]&lt;br /&gt;
*#[[Attach a disk to a virtual machine]]&lt;br /&gt;
&lt;br /&gt;
=== Development guides ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;[[Parallel_computing|Parallelization]]&#039;&#039;&#039; ====&lt;br /&gt;
*[[Parallelization_in_r|R-specific parallelization]]&lt;br /&gt;
*[[Parallelization_in_python|Python-specific parallelization]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Package development&#039;&#039;&#039; ====&lt;br /&gt;
*[[Developing_R_packages|R package development]]&lt;br /&gt;
*[[Developing_python_packages|Python package development]]&lt;br /&gt;
[[Terminal automation]]. This wiki introduces approaches to automate Linux/OS command line calls.&lt;br /&gt;
*[[Bash files]]. This wiki presents potential uses of Bash files including automated file/folder creation, parallelization and much more!&lt;br /&gt;
*[[Make]]. This wiki presents potential uses of &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and Makefiles including automated workflow and dependency tracking&lt;br /&gt;
*[[Jumping to frequently used folders and automating environment setups]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Version Control&#039;&#039;&#039; ====&lt;br /&gt;
See the guide provided in the site of [https://36-750.github.io/tools/version-control/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Reference management&#039;&#039;&#039; ====&lt;br /&gt;
#Zotero &lt;br /&gt;
#Mendeley &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Integrated Development Environments (IDEs)&#039;&#039;&#039; ====&lt;br /&gt;
#[[VSCode|VSCode]] &lt;br /&gt;
#PyCharm &lt;br /&gt;
#RStudio &lt;br /&gt;
#Eclipse &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Text Editors&#039;&#039;&#039; ====&lt;br /&gt;
#Vim &lt;br /&gt;
#Nano &lt;br /&gt;
#Emacs &lt;br /&gt;
#Atom &lt;br /&gt;
#Sublime &lt;br /&gt;
&lt;br /&gt;
See also the guide provided in the site of [https://36-750.github.io/tools/editors/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;AI Tools&#039;&#039;&#039; ====&lt;br /&gt;
* [[ChatGPT and other LLMs]]&lt;br /&gt;
&lt;br /&gt;
*[[github_copilot|GitHub Copilot]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Miscellanea&#039;&#039;&#039; ====&lt;br /&gt;
#[[Windows_Subsystem_for_Linux_(WSL)_and_Python|Windows&amp;amp;nbsp;Subsystem for Linux (WSL) and Python]] &lt;br /&gt;
#[[Amphetamine|Amphetamine: How to keep your computer awake]] &lt;br /&gt;
&lt;br /&gt;
=== General Department Computing Resources ===&lt;br /&gt;
&lt;br /&gt;
*Fall 2021 [[Computing_seminar_resources|Computing Seminar Resources]] (video and slides) &lt;br /&gt;
&lt;br /&gt;
== Ideas for the Wiki ==&lt;br /&gt;
&lt;br /&gt;
Please see the [[TODO|TODO page]] to post suggestions and errata.&lt;br /&gt;
&lt;br /&gt;
== Using the Wiki ==&lt;br /&gt;
&lt;br /&gt;
*Here is some&amp;amp;nbsp;[[Generic_Wiki_Information|Generic Wiki Information]]&amp;amp;nbsp;that you may be interested in, such as a users&#039; guide and other resources for Wiki users.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=200</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Main_Page&amp;diff=200"/>
		<updated>2025-05-05T18:22:45Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Computing Wiki Pages */ An attempt at reorganizing the list of wiki pages in a sensible way&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anyone can read this wiki. &amp;amp;nbsp;If you want to write/edit stuff in the wiki, you will need to log in with your account provided by the Statistics &amp;amp; Data Science Department computing group. This Wiki is intended to be a repository for instruction, information and ideas related to the many computing environments available to members and affiliates of the Statistics &amp;amp; Data Science Department.&lt;br /&gt;
&lt;br /&gt;
== Getting to know the computing resources &amp;amp; getting support ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re interested in knowing about what resources you have access to (and/or) what resources you have access to that might solve a problem you&#039;re having, please visit our [[What_resources_when|&amp;quot;what resources when&amp;quot; article]].&lt;br /&gt;
&lt;br /&gt;
To get support that is beyond this website please attend office hours below and/or email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] for support (for more details about how the support ticketing works through [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] + ServiceNow please see the [[Service_now|ServiceNow]] article).&lt;br /&gt;
&lt;br /&gt;
Reset your StatDS password here - https://util.stat.cmu.edu/passwordreset/&lt;br /&gt;
&lt;br /&gt;
== Department Contacts ==&lt;br /&gt;
&lt;br /&gt;
• [mailto:events@stat.cmu.edu events@stat.cmu.edu]: seminars, conferences &amp;amp; workshops, and calendar updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:news@stat.cmu.edu news@stat.cmu.edu]: dept/dept member-related public news &amp;amp; announcements&lt;br /&gt;
&lt;br /&gt;
• [mailto:lists@stat.cmu.edu lists@stat.cmu.edu]: department email lists&lt;br /&gt;
&lt;br /&gt;
• [mailto:webmaster@stat.cmu.edu webmaster@stat.cmu.edu]: website updates&lt;br /&gt;
&lt;br /&gt;
• [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]: computer/tech requests&lt;br /&gt;
&lt;br /&gt;
• [mailto:rooms@stat.cmu.edu rooms@stat.cmu.edu]: request space for meetings and TA office hours&lt;br /&gt;
&lt;br /&gt;
• [mailto:reimbursements@stat.cmu.edu reimbursements@stat.cmu.edu]: travel and reimbursement requests&lt;br /&gt;
&lt;br /&gt;
== Computing Office Hours ==&lt;br /&gt;
&lt;br /&gt;
These office hour opportunities provide a dedicated time for you to come ask questions about research computing.&amp;amp;nbsp; These include code advice, how to access certain resources, what the best resources are for your project, or to learn about new connections to help you progress in your education and research. Staff Office hour times will be sent out each week on Monday as a calendar invite; accept any of the invitations to add it to your personal calendar. PhD TA Office Hours are below, unless a different time is&amp;amp;nbsp;communicated.&lt;br /&gt;
&lt;br /&gt;
#PhD TA Office Hours are held by Alex Shen in Baker 136E on Tuesdays from 3 pm to 5 pm&lt;br /&gt;
#Staff Office Hours are held by appointment  by Carl Skipper in BH 129G.  Schedule via [mailto:lists@stat.cmu.edu email].&lt;br /&gt;
&lt;br /&gt;
See [[Computing_office_hour_usage|computing office hour usage]] for what office hours can be used for.&lt;br /&gt;
&lt;br /&gt;
== Computing Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
=== Managing servers and environments ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Virtual environments&#039;&#039;&#039; ====&lt;br /&gt;
*[[Virtual Environment Introduction|Why use virtual environments?]]&lt;br /&gt;
*R&#039;s [[Renv]]&lt;br /&gt;
*Python&#039;s [[Python_virtual_environments|virtual environments (2 options)]]&lt;br /&gt;
*Old instructions for [[Conda with Python (Reference Only)|conda with Python]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Containers&#039;&#039;&#039; ====&lt;br /&gt;
*[[Introduction to containers]]&lt;br /&gt;
*[[Docker, and why-you-should-use-it-for-your-research]]&lt;br /&gt;
*[[Tutorials|Basic tutorial]]&lt;br /&gt;
*[[Running Docker locally and on Hydras]]&lt;br /&gt;
&lt;br /&gt;
=== Department computing resources ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Printing&#039;&#039;&#039; ====&lt;br /&gt;
*[[Department_Printers|Department Printers]] &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Web Hosting&#039;&#039;&#039; ====&lt;br /&gt;
#[[How to host your webpage under stat.cmu.edu]]&lt;br /&gt;
#[[Bulding your website with Hugo]]&lt;br /&gt;
&lt;br /&gt;
==== Servers ====&lt;br /&gt;
*[[Linux_and_department_servers|Department Servers]]. This wiki introduces you to the &#039;&#039;&#039;hydra&#039;&#039;&#039; servers, basic Linux commands, and more. &lt;br /&gt;
*#[[Terminal_multiplexers|Terminal multiplexers (screen and tmux)]]. This wiki presents tools for use on the &#039;&#039;hydra&#039;&#039; that can allow you to run jobs even when your not on the server, and much much more!&lt;br /&gt;
*#[[Python on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;python&amp;lt;/code&amp;gt; on a virtual machine, and how to use jupyter notebooks through the server as well.&lt;br /&gt;
*#[[R on the server]]. This wiki introduces uses command line approaches to running &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; on a virtual machine&lt;br /&gt;
&lt;br /&gt;
*[[Department GPU Servers]]&lt;br /&gt;
*[[GPU Cluster]]&lt;br /&gt;
*[[PSC]], the Pittsburgh Supercomputing Center. Free accounts and usage credits are available &lt;br /&gt;
*#[[ACCESS]]&lt;br /&gt;
*#[[Slurm]]. This wiki introduces the job management system uses at PSC.&lt;br /&gt;
*#[[Parallelization_on_PSC/Bridges-2]]&lt;br /&gt;
*#[[Access PSC compute nodes directly from VSCode]]&lt;br /&gt;
*Azure&lt;br /&gt;
*#[[Azure_getting_started|Azure: getting started]]. This wiki walks you through the steps to create a virtual machine through Azure&lt;br /&gt;
*#[[How to obtain a virtual machine with a GPU]]&lt;br /&gt;
*#[[Attach a disk to a virtual machine]]&lt;br /&gt;
&lt;br /&gt;
=== Development guides ===&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;[[Parallel_computing|Parallelization]]&#039;&#039;&#039; ====&lt;br /&gt;
*[[Parallelization_in_r|R-specific parallelization]]&lt;br /&gt;
*[[Parallelization_in_python|Python-specific parallelization]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Package development&#039;&#039;&#039; ====&lt;br /&gt;
*[[Developing_R_packages|R package development]]&lt;br /&gt;
*[[Developing_python_packages|Python package development]]&lt;br /&gt;
[[Terminal automation]]. This wiki introduces approaches to automate Linux/OS command line calls.&lt;br /&gt;
*[[Bash files]]. This wiki presents potential uses of Bash files including automated file/folder creation, parallelization and much more!&lt;br /&gt;
*[[Make]]. This wiki presents potential uses of &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; and Makefiles including automated workflow and dependency tracking&lt;br /&gt;
*[[Jumping to frequently used folders and automating environment setups]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Version Control&#039;&#039;&#039; ====&lt;br /&gt;
See the guide provided in the site of [https://36-750.github.io/tools/version-control/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Reference management&#039;&#039;&#039; ====&lt;br /&gt;
#Zotero &lt;br /&gt;
#Mendeley &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Integrated Development Environments (IDEs)&#039;&#039;&#039; ====&lt;br /&gt;
#[[VSCode|VSCode]] &lt;br /&gt;
#PyCharm &lt;br /&gt;
#RStudio &lt;br /&gt;
#Eclipse &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Text Editors&#039;&#039;&#039; ====&lt;br /&gt;
#Vim &lt;br /&gt;
#Nano &lt;br /&gt;
#Emacs &lt;br /&gt;
#Atom &lt;br /&gt;
#Sublime &lt;br /&gt;
&lt;br /&gt;
See also the guide provided in the site of [https://36-750.github.io/tools/editors/ 36750 - Statistical Computing]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;AI Tools&#039;&#039;&#039; ====&lt;br /&gt;
* [[ChatGPT and other LLMs]]&lt;br /&gt;
&lt;br /&gt;
*[[github_copilot|GitHub Copilot]]&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Miscellanea&#039;&#039;&#039; ====&lt;br /&gt;
#[[Windows_Subsystem_for_Linux_(WSL)_and_Python|Windows&amp;amp;nbsp;Subsystem for Linux (WSL) and Python]] &lt;br /&gt;
#[[Amphetamine|Amphetamine: How to keep your computer awake]] &lt;br /&gt;
&lt;br /&gt;
=== General Department Computing Resources ===&lt;br /&gt;
&lt;br /&gt;
*Fall 2021 [[Computing_seminar_resources|Computing Seminar Resources]] (video and slides) &lt;br /&gt;
&lt;br /&gt;
== Ideas for the Wiki ==&lt;br /&gt;
&lt;br /&gt;
Please see the [[TODO|TODO page]] to post suggestions and errata.&lt;br /&gt;
&lt;br /&gt;
== Using the Wiki ==&lt;br /&gt;
&lt;br /&gt;
*Here is some&amp;amp;nbsp;[[Generic_Wiki_Information|Generic Wiki Information]]&amp;amp;nbsp;that you may be interested in, such as a users&#039; guide and other resources for Wiki users.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=ACCESS&amp;diff=199</id>
		<title>ACCESS</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=ACCESS&amp;diff=199"/>
		<updated>2025-04-25T14:51:58Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: mention template letter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The&amp;amp;nbsp;NSF’s&amp;amp;nbsp;ACCESS&amp;amp;nbsp;(Advanced Cyberinfrastructure Coordination Ecosystem: Services &amp;amp; Support) program builds upon the successes of the 11-year&amp;amp;nbsp;XSEDE&amp;amp;nbsp;project.&lt;br /&gt;
&lt;br /&gt;
NSF funded supercomputers, like PSC are available via the ACCESS federated system. &amp;amp;nbsp;Besides parallel or memory-intensive computing options, there are many GPU resources available to ACCESS users via the Credit Marketplace.&lt;br /&gt;
&lt;br /&gt;
#If you are a Graduate Student, all you need is&amp;amp;nbsp;&#039;&#039;&#039;an account&#039;&#039;&#039;,&#039;&#039;&#039;&amp;amp;nbsp;&#039;&#039;&#039;your&#039;&#039;&#039;&amp;amp;nbsp;CV&#039;&#039;&#039;, a&amp;amp;nbsp;&#039;&#039;&#039;1-paragraph abstract&#039;&#039;&#039;&amp;amp;nbsp;and&amp;amp;nbsp;&#039;&#039;&#039;a letter from your advisor&#039;&#039;&#039;. &amp;amp;nbsp;(Carl has a template letter your advisor can sign.) With these 4 items, you can complete a simple form and get up to 400,000 CPU-hours to exchange for access to most of the nation&#039;s supercomputing cyberinfrastructure. Check out the following [https://allocations.access-ci.org/preparing-your-explore-access-request link].&lt;br /&gt;
#If you previously held an XSEDE account, you can login here:&amp;amp;nbsp;[https://identity.access-ci.org/new-user-federated https://identity.access-ci.org/new-user-federated]&amp;amp;nbsp;and complete your account transition from XSEDE to ACCESS by selecting “ACCESS CI (XSEDE)” and subsequently login using Andrew Web Login. &amp;amp;nbsp;You will then be guided through a short verification process similar to any other website.&amp;amp;nbsp;&lt;br /&gt;
#If you are&amp;amp;nbsp;&#039;&#039;&#039;new&#039;&#039;&#039;&amp;amp;nbsp;to the department or supercomputing in general,&amp;amp;nbsp;I set up a new account so you will be able to access (no pun intended) these resources easily now or in the future. &amp;amp;nbsp;Visit&amp;amp;nbsp;[https://identity.access-ci.org/new-user-federated https://identity.access-ci.org/new-user-federated]&amp;amp;nbsp;to set up a new account - &amp;amp;nbsp;make sure to choose “&#039;&#039;&#039;Carnegie Mellon University&#039;&#039;&#039;”!&amp;amp;nbsp;&lt;br /&gt;
#The interface to the Supercomputing Credit Market is still being improved, but we are working on documentation to address that.&lt;br /&gt;
&lt;br /&gt;
This will shortly be updated to add easy access to ACCESS On-Ramps: &amp;lt;div id=&amp;quot;resource-catalog-react&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=198</id>
		<title>Wright GPU Cluster</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Wright_GPU_Cluster&amp;diff=198"/>
		<updated>2025-04-04T15:03:41Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: Mention new node and condo model&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has access to a powerful GPU-based cluster named [https://en.wikipedia.org/wiki/Sewall_Wright Wright]&amp;amp;nbsp;which is hosted here at CMU.&amp;amp;nbsp;This is a 4-node and growing cluster that is a shared resource for Statistics &amp;amp; Data Science, Philosophy, and other departments in Dietrich College. Each department has priority access to its own compute node, but will be able to share the resources from other departments when not in use.&lt;br /&gt;
&lt;br /&gt;
== Access requests ==&lt;br /&gt;
This resource&amp;amp;nbsp;is free to use to users in the Departments of Statistics &amp;amp; Data Science and Philosophy, and in CMIST. These departments set policies determining which of their users are eligible.&amp;amp;nbsp;Users outside these departments must be sponsored by someone in the eligible departments, as part of a project or collaboration.&lt;br /&gt;
&lt;br /&gt;
To request access, complete the [https://docs.google.com/forms/d/e/1FAIpQLSftCsplE06whGocn62DhwC6NpDSgZ-DMmUacrQID_slIfg6sA/viewform access request form] and our team will be in touch to discuss your request and onboard you.&lt;br /&gt;
&lt;br /&gt;
== Cluster setup ==&lt;br /&gt;
The cluster currently consists of 4 servers:&lt;br /&gt;
*The head node: You log in to this to write code and run jobs. It has 128 GB of RAM, 16 cores, and &#039;&#039;&#039;no GPU&#039;&#039;&#039;.&lt;br /&gt;
*The compute nodes: Jobs run on these. Each has 256 CPU cores, 8 NVIDIA L40 GPU cards with 48 GB of video RAM each, approximately 1 TB of RAM, and a total of approximately 3 TB of local data/scratch space.&lt;br /&gt;
*The file server: Holds 50TB of storage. The head node and compute nodes connect via fiberoptic networking. Your home directory is hosted on the file server, so the same files are accessible on the head node and all compute nodes.&lt;br /&gt;
The cluster is currently partitioned. One compute node is reserved for each department involved.&lt;br /&gt;
&lt;br /&gt;
== Connecting and setting up your environment ==&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
From your terminal, type&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh &amp;lt;YourStatID&amp;gt;@wright.hss.cmu.edu&amp;lt;/code&amp;gt;&amp;amp;nbsp;. You can also avoid remembering this by adding the following snippet to your local&amp;amp;nbsp;&amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&lt;br /&gt;
&amp;lt;pre&amp;gt;Host wright&lt;br /&gt;
    Hostname wright.hss.cmu.edu&lt;br /&gt;
    User YourStatID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect by simply typing&amp;amp;nbsp;&amp;lt;code&amp;gt;ssh wright&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This connects you to the &#039;&#039;&#039;head node.&#039;&#039;&#039; Here you can upload your data files, set up your scripts, and test things.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not run resource-intensive tasks directly on the head node&#039;&#039;&#039;. It doesn&#039;t have any GPUs, and it has fewer resources than the compute nodes. You can do quick tests to make sure your scripts are set up correctly, but submit all other jobs through Slurm.&lt;br /&gt;
&lt;br /&gt;
=== Uploading files ===&lt;br /&gt;
To upload scripts or data files, you can use &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; from your local computer (Mac or Linux); on Windows, you can get the Tectia SSH graphical client [https://www.cmu.edu/computing/services/endpoint/software/access.html free through CMU].&lt;br /&gt;
&lt;br /&gt;
You can&amp;amp;nbsp;also connect through the [https://code.visualstudio.com/docs/remote/ssh Remote SSH feature of VS Code] if you like. This is useful to&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
*navigate the file system from a proper GUI and&amp;amp;nbsp; &lt;br /&gt;
*modify code/files/folder in place if you are not familiar with the command line &lt;br /&gt;
Files uploaded to your home directory will be accessible on the head node and all compute nodes, so they can be freely used in compute jobs.&lt;br /&gt;
&lt;br /&gt;
=== Using Conda ===&lt;br /&gt;
The head node has Anaconda installed for managing Python packages and system libraries; see [[Python virtual environments]] for information on how to use it (but note it&#039;s &#039;&#039;&#039;already installed&#039;&#039;&#039;, so you don&#039;t need to install it from scratch!).&lt;br /&gt;
&lt;br /&gt;
However, the compute nodes &#039;&#039;&#039;do not&#039;&#039;&#039; have conda, so your slurm jobs can&#039;t use &amp;lt;code&amp;gt;conda activate&amp;lt;/code&amp;gt; or other familiar commands. Instead, set up your environment on the head node, activate it, install the packages you need, and so on. Then run &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; to get the path to the Python executable in your environment. For instance:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python&lt;br /&gt;
/home/export/areinhar/.conda/envs/llm/bin/python&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This is the path you&#039;ll use in your scripts (see below).&lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
=== Slurm ===&lt;br /&gt;
&lt;br /&gt;
The GPU cluster manages jobs via [[Main_Page/slurm|Slurm]].&amp;amp;nbsp;Slurm is a job management system that deals with job prioritization and the allocation of resources. On high-performance computers (e.g., PSC and our GPU cluster) Slurm helps allocate resources so multiple jobs can be run quickly.&amp;amp;nbsp;Users run programs by submitting scripts to the Slurm job scheduler, and the scheduler runs them when resources are available.&lt;br /&gt;
&lt;br /&gt;
To check what jobs are running, use squeue:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1326      phil     bash shaoanxi  R   22:41:00      1 n02&lt;br /&gt;
              1327      phil     bash shaoanxi  R   22:39:42      1 n02&lt;br /&gt;
              1486    statds run_coun  soheuny  R    1:12:53      1 n01&lt;br /&gt;
              1488    statds run_coun  soheuny  R    1:06:00      1 n01&lt;br /&gt;
              1489    statds run_coun  soheuny  R    1:00:53      1 n01&lt;br /&gt;
              1490    statds run_coun  soheuny  R    1:00:07      1 n01&lt;br /&gt;
              1491    statds run_coun  soheuny  R      24:02      1 n01&lt;br /&gt;
              1492    statds run_coun  soheuny  R       6:15      1 n01&lt;br /&gt;
              1493    statds run_coun  soheuny  R       3:16      1 n01&lt;br /&gt;
              1494    statds run_coun  soheuny  R       0:52      1 n01&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we see there are eight jobs running on node 1 and 2 jobs running on node 2.&lt;br /&gt;
&lt;br /&gt;
To check what resources are currently in use, use &amp;lt;code&amp;gt;sinfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinfo -O &amp;quot;NodeList:10,CPUsState:16,Memory:9,FreeMem:10,Gres:20,GresUsed:30&amp;quot;&lt;br /&gt;
NODELIST  CPUS(A/I/O/T)   MEMORY   FREE_MEM  GRES                GRES_USED                     &lt;br /&gt;
n01       64/192/0/256    1000000  221943    gpu:nvidia-l40:8    gpu:nvidia-l40:8(IDX:0-7)     &lt;br /&gt;
n02       32/224/0/256    1000000  225575    gpu:nvidia-l40:8    gpu:nvidia-l40:0(IDX:N/A)                    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This shows that node 1 (Statistics &amp;amp; Data Science) has 64 CPUs allocated and 192 idle, out of 256 total. There is 1TB of RAM, of which 222 GB is free. There are 8 NVIDIA L40 GPus, all 8 of which are in use. Hence if we submit a job to the statds partition requesting any GPUs, it will have to wait until some become free. Meanwhile, node 2 (Philosophy) has no GPUs in use.&lt;br /&gt;
&lt;br /&gt;
=== Job queuing and scheduling ===&lt;br /&gt;
The cluster is divided into three partitions: statds (Statistics &amp;amp; Data Science), phil (Philosophy), and cmist (CMIST). Jobs are submitted to a partition. &#039;&#039;&#039;Users must submit jobs to their department&#039;s partition&#039;&#039;&#039; -- jobs submitted to the wrong partition will be rejected.&lt;br /&gt;
&lt;br /&gt;
Slurm runs jobs based on the resources they request and what is available. If resources aren&#039;t available for your job, slurm will put it in the queue and wait until other jobs finish. However, it&#039;s not simply a first-in first-out queue -- Slurm attempts to arrange the jobs so every job can run, even if that means running them out of order.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 4 GPUs on the same partition. The compute node only has 8 GPUs, so Job B will be queued until Job A completes.&lt;br /&gt;
* Someone submits Job A that requests 6 GPUs. Later, you submit Job B that requests 2 GPUs. Job B can run immediately.&lt;br /&gt;
* You submit a job that requires all 8 GPUs on a node, but 4 are currently in use. Your job is put in the queue and scheduled to run when Slurm knows the current jobs will finish (because of their maximum time limit). Meanwhile, someone submits a job using 2 GPUs and a short time limit. Slurm lets it run immediately, because it knows it will be done before your job is scheduled to run.&lt;br /&gt;
You can view the currently running or queued jobs by running &amp;lt;code&amp;gt;squeue&amp;lt;/code&amp;gt; on the head node, as described above. The &amp;lt;code&amp;gt;NODELIST(REASON)&amp;lt;/code&amp;gt; column will indicate which jobs are queued by giving special codes:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;(Resources)&amp;lt;/code&amp;gt; means there are not enough resources (CPUs, memory, or GPUs) available for the job. It will run once the resources are free.&lt;br /&gt;
* &amp;lt;code&amp;gt;(Priority)&amp;lt;/code&amp;gt; means resources are available, but Slurm wants to run a higher-priority job first. For example, maybe a large job has been waiting for resources for two days before you submit your job; Slurm may make your job wait so the large job can start first.&lt;br /&gt;
&lt;br /&gt;
=== Submitting batch jobs ===&lt;br /&gt;
The best way to run jobs is by writing a shell script specifying the Slurm options. To launch a batch job from a script you will need two files:&lt;br /&gt;
&lt;br /&gt;
*the actual script that implements things in your favorite programming language&lt;br /&gt;
*a bash script that requests the resources you need from Slurm and gives the commands to launch your job.&lt;br /&gt;
A typical bash script might look like this:&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# specify partition to run in (statds, phil, or cmist)&lt;br /&gt;
#SBATCH --partition statds&lt;br /&gt;
#SBATCH --ntasks 1&lt;br /&gt;
&lt;br /&gt;
# number of CPUs you need:&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
&lt;br /&gt;
# amount of memory per CPU&lt;br /&gt;
# (total allocated is CPUs * memory)&lt;br /&gt;
#SBATCH --mem-per-cpu 4G&lt;br /&gt;
&lt;br /&gt;
# number of GPUs you need&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
&lt;br /&gt;
# maximum time limit for task (up to 48 hours max, 48:00:00)&lt;br /&gt;
#SBATCH --time=01:00:00&lt;br /&gt;
&lt;br /&gt;
# email you when job is finished:&lt;br /&gt;
#SBATCH --mail-user=YourAndrewID@andrew.cmu.edu&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
&lt;br /&gt;
## Choose one:&lt;br /&gt;
&lt;br /&gt;
# to run a Python script in a Conda environment called ENV&lt;br /&gt;
srun /home/export/YOURANDREWID/.conda/envs/ENV/bin/python YourScript.py&lt;br /&gt;
&lt;br /&gt;
# to run an R script:&lt;br /&gt;
srun Rscript YourScript.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;Adjust the number of CPUs, number of GPUs, memory usage, and time limit based on the needs of your script. Requesting more than you need may result in your job having to wait for resources to free up; requesting a long time you don&#039;t need will block slurm from scheduling other jobs for when yours will be done. (And if you request more resources than exist on the compute nodes, your job will be queued forever while it waits for resources to appear.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;amp;nbsp;Slurm batch jobs are limited to a maximum duration of 48 hours. Jobs running longer will be killed.&lt;br /&gt;
&lt;br /&gt;
To run the job, SSH into the head node and navigate to the directory with your scripts. Then run:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch example.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where &amp;lt;code&amp;gt;example.sh&amp;lt;/code&amp;gt; is the name of your bash script.&lt;br /&gt;
&lt;br /&gt;
You will see a message like &amp;quot;Submitted batch job 1209&amp;quot; when your job is submitted. Any printed output from your script will automatically be redirected to a file based on the job number -- in this case, &amp;lt;code&amp;gt;slurm-1209.out&amp;lt;/code&amp;gt;. You can use &amp;lt;code&amp;gt;tail -f slurm-1209.out&amp;lt;/code&amp;gt; to view the output live and monitor your script&#039;s progress.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
You can also run interactive sessions that allow you to, say, run an R or Python console and type commands and immediately view the output. From the head node, run a command like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# remember to edit to correct partition:&lt;br /&gt;
srun --partition statds --ntasks 1 \&lt;br /&gt;
    --cpus-per-task 16 --mem-per-cpu 4G \&lt;br /&gt;
    --gres=gpu:1 --time=01:00:00 --pty \&lt;br /&gt;
    bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This runs a job that opens a bash shell on the compute node, and connects you directly to this job. You can now run bash commands, open Python, or run R scripts. Note your interactive session has a time limit and will be killed when it elapses, so set the time limit carefully and choose the resource amounts in the command according to your needs.&lt;br /&gt;
&lt;br /&gt;
Interactive sessions are limited to &#039;&#039;&#039;two hours maximum&#039;&#039;&#039;. You cannot request a longer time limit. This is because interactive sessions are inefficient, with the cluster spending most of its time waiting for you to type something instead of running code. For large tasks, submit a batch job.&lt;br /&gt;
&lt;br /&gt;
=== Interactive via VS Code ===&lt;br /&gt;
VS Code supports SSH and tunneling, which allows it to connect to a server and run commands. This allows you to use the Jupyter Notebook support built into VS Code to interact with the GPU cluster. As this uses an interactive session, it&#039;s subject to the same &#039;&#039;&#039;two-hour time limit&#039;&#039;&#039;. Hence notebooks should be used only for exploration and debugging, not large jobs.&lt;br /&gt;
&lt;br /&gt;
To use this, we need to connect to the head node, run an interactive Slurm session, and then connect VS Code to that Slurm session so it can use it. This takes a few extra steps.&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
Before you use this for the first time, do the following steps:&lt;br /&gt;
&lt;br /&gt;
*SSH into Wright and run the following to install and unpack the VSCode CLI:&amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;curl -Lk &#039;https://code.visualstudio.com/sha/download?build=stable&amp;amp;os=cli-alpine-x64&#039; --output vscode_cli.tar.gz&lt;br /&gt;
tar -xf vscode_cli.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add the&amp;amp;nbsp;&amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&amp;amp;nbsp;executable to your PATH by adding the following to your&amp;amp;nbsp;&amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;&amp;amp;nbsp;file:&amp;amp;nbsp;&amp;lt;code&amp;gt;export&amp;amp;nbsp;PATH=&amp;quot;~:$PATH&amp;quot;&amp;lt;/code&amp;gt;&amp;lt;pre&amp;gt;echo &#039;export PATH=&amp;quot;$PATH:/path/to/code&amp;quot;&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*In VSCode, install the&amp;amp;nbsp;&amp;lt;code&amp;gt;Remote - Tunnels&amp;lt;/code&amp;gt;&amp;amp;nbsp;extension, then use the VSCode SSH feature to connect to Wright and make sure to install all the local VS Code extensions on the remote machine as well (e.g., Python, Jupyter, ...)&lt;br /&gt;
&lt;br /&gt;
==== Running a session ====&lt;br /&gt;
*In the Wright headnode, launch a Slurm interactive session with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, following the instructions above.&lt;br /&gt;
&lt;br /&gt;
*Inside the interactive session, run&amp;amp;nbsp;&amp;lt;code&amp;gt;code tunnel&amp;lt;/code&amp;gt;&amp;amp;nbsp;and follow the instructions. The first time the system will ask you to name the tunnel and authorize the process via an authenticator, I suggest using GitHub since it usually works quite smoothly. Subsequent tunnels might still ask you to authorize their creation by typing an alphanumerical sequence into a link that appears in the terminal. Once you’ve done that, the tunnel is successfully created.&lt;br /&gt;
*From VSCode, select&amp;amp;nbsp;&amp;lt;code&amp;gt;Connect to Tunnel&amp;lt;/code&amp;gt;, then choose the authentication method you previously used and you will see the tunnel appear in the dropdown. Select it and you will land directly into the interactive session we just created&lt;br /&gt;
*You will now be able to run code and, e.g., Jupyter Notebooks using the compute node allocated by the Slurm interactive session. VS Code will be disconnected when the Slurm session ends, such as when it reaches its time limit.&lt;br /&gt;
Note that if you need to use a conda environment, you&#039;ll have to configure VS Code to use the Python executable you found above, since conda is not installed on the compute nodes.&lt;br /&gt;
&lt;br /&gt;
=== Submitting &amp;quot;condo&amp;quot; jobs ===&lt;br /&gt;
If your department&#039;s partition is busy, you may submit jobs to &amp;quot;condo&amp;quot; partitions to run on other nodes. The condo partitions are special:&lt;br /&gt;
&lt;br /&gt;
* Your job will run at a lower priority than that department&#039;s users. (Slurm calls this &amp;quot;QOS&amp;quot;, so the jobs will have &amp;quot;normal&amp;quot; as their priority, vs. a &amp;quot;priority&amp;quot; value for the department&#039;s users.)&lt;br /&gt;
* Your job will be preemptible: if the host department&#039;s users submit a job after yours that requires your resources, your job will be terminated and put back in the queue.&lt;br /&gt;
&lt;br /&gt;
The condo partitions are named the same as the usual partitions, but ending with &amp;lt;code&amp;gt;_condo&amp;lt;/code&amp;gt;. You must submit to the condo partition -- if you submit to another department&#039;s partition otherwise, your job will be rejected.&lt;br /&gt;
&lt;br /&gt;
For example, if you are a Philosophy user, submitting a job to the &amp;lt;code&amp;gt;statds_condo&amp;lt;/code&amp;gt; partition will run it on the Statistics node, but only when Statistics users are not using the resources. If a Statistics user submits a large job after yours, your job might be terminated, and will run again when resources become available.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=185</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=185"/>
		<updated>2025-01-24T16:09:58Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The department has a set of servers, the hydras, that can help you run large analyses and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s okay to not run as polished code as you might on the [[PSC]] or Azure.&lt;br /&gt;
&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed (which should allow parallelization across each server)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=184</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=184"/>
		<updated>2025-01-24T16:00:05Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Deprioritize when possible */ fix bolding&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== Introduction (why use the department servers / philosophical use) ==&lt;br /&gt;
&lt;br /&gt;
The department has a set of servers (hosted virtually through campus computing) that can help you process analysis faster and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s ok to not run as polished code as you might on the PSC or Azure.&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed (which should allow parallelization across each server)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== Deprioritize when possible ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=183</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=183"/>
		<updated>2025-01-24T15:59:24Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* Using the server respectfully */ Expand section and reorganize page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== Introduction (why use the department servers / philosophical use) ==&lt;br /&gt;
&lt;br /&gt;
The department has a set of servers (hosted virtually through campus computing) that can help you process analysis faster and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s ok to not run as polished code as you might on the PSC or Azure.&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed (which should allow parallelization across each server)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Using the servers respectfully ==&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Check the current usage&#039;&#039;&#039; of the server you&#039;re on before using it.&lt;br /&gt;
# Do not use &#039;&#039;&#039;all&#039;&#039;&#039; the cores on a server, and do not use &#039;&#039;&#039;all&#039;&#039;&#039; the servers at the same time, so others can get work done.&lt;br /&gt;
# If you have a long-running job, &#039;&#039;&#039;deprioritize it&#039;&#039;&#039; so others can run too.&lt;br /&gt;
&lt;br /&gt;
Each of these is easy to check.&lt;br /&gt;
&lt;br /&gt;
=== Checking current usage ===&lt;br /&gt;
To check which servers are currently being used and which are open, see the [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Grafana dashboard for the hydras]. It lists them all and their current usage.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re logged in to one node, you can use the &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; command. &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; displays the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up ther&lt;br /&gt;
&lt;br /&gt;
=== Limiting the cores you use ===&lt;br /&gt;
We recommend that when using parallel processing, use fewer than the total number of cores on the server. Most parallel processing packages let you choose the number of cores to use; the hydras have 12, so pick something smaller.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Deprioritize when possible&#039;&#039;&#039; ===&lt;br /&gt;
&amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs, so the operating system lets other processes run first. See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, everyone starts at the same priority, and you can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs -- you can&#039;t make them higher priority than everyone else.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice -20 Rscript some-big-script.R&lt;br /&gt;
renice -n 20 processid # get the process ID from top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp;nbsp;GUI “drag-and-drop” file sharing ===&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| print the current working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=182</id>
		<title>What resources when</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=What_resources_when&amp;diff=182"/>
		<updated>2025-01-24T15:32:08Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* The hydras (the department servers) */ Correct size info on hydras&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To try to answer the common question “what resources do I have access to and when should I use them”, below we present to approaches to answering the question. The first of which focuses on what resources exist and what they should be used for and the second tries to answer resource needs / current computing problems with resources to fit those needs/ solve those problems.&lt;br /&gt;
&lt;br /&gt;
After you’re found the resource you think you’d like to use (or even when you’re still deciding), we strongly encourage you to attend an computing office hour to help discuss all the things you should be thinking about and get you on the right track quickly.&lt;br /&gt;
&lt;br /&gt;
= What computing resources do you have access to =&lt;br /&gt;
&lt;br /&gt;
== Your personal computer ==&lt;br /&gt;
&lt;br /&gt;
Your personal computer is great for small jobs that take less than 30 minutes, uses few cores and not too much RAM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pro:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Naturally the easiest tool to use since it’s yours. Best for short jobs that require only a few cores. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
capacity:&lt;br /&gt;
&lt;br /&gt;
#*few cores: 4-8 cores common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt; (multiply processes per cors means = 8-16 “cores”). &lt;br /&gt;
#*low RAM: 4-32 GB of common on laptops&amp;lt;ref&amp;gt;&amp;lt;p&amp;gt;From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&amp;lt;/p&amp;gt;&amp;lt;/ref&amp;gt;, used across all cores &lt;br /&gt;
#*“no” GPUs: you don’t have GPUs that are optimized for Deep Learning &lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
other usage: You often want to use your computer for other things (and it’s built for that exact thing). It’s possible you or someone you know has has had to leave their laptop at home for the day/ run lode oernight When they need to run something intensive -OR- long. But you need that laptop for other work / homework…&lt;br /&gt;
&lt;br /&gt;
The below XKCD comic doesn’t have to be you… (though breaks are good):&lt;br /&gt;
&lt;br /&gt;
[[File:Compiling.png|thumb|none|https://xkcd.com/303/]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Your personal computer isn’t the best for when doing a lot of computing and its easy to put jobs elsewhere!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Common use-cases&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Most class projects &lt;br /&gt;
#Non-data problems &lt;br /&gt;
#Non-complex structure problems &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Parallel_computing|parallelization]] &lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;code&amp;gt;hydras&amp;lt;/code&amp;gt; (the department servers) ==&lt;br /&gt;
&lt;br /&gt;
The departmental servers should be seen as a “sandbox”. You can experiment with lots of things on the servers and it doesn’t cost you much to do. The hydras have a decent amount of RAM (much more than your personal computer), but often it won’t run a lot faster than if you put you’re computer aside and did the same thing on it (though a large pro is you don’t have to stop using your own computer when running jobs on the hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Best for long but smaller core jobs &lt;br /&gt;
#Decent amount of RAM per machine (64 GB, or 128 GB on hydra7 and hydra8)&lt;br /&gt;
#Very low barrier to entry (aka easy to get started) &lt;br /&gt;
#File management system shares across different hydra servers &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#usage: The department server is a bit of a “wild-west” in terms of usage (it varies how many people use it at a given time) &lt;br /&gt;
#cores per server: the number of cores per server is only 12&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conclusion:&#039;&#039;&#039; Great place to start for more intensive computing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Linux_and_department_servers|Linux and department servers]] &lt;br /&gt;
&#039;&#039;&#039;Server Monitoring&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
View current Hydra resource usage - [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
== PSC (Pittsburgh supercomputer center) ==&lt;br /&gt;
&lt;br /&gt;
The Pittsburgh supercomputer center provides supercomputers than have massive amounts of cores (but also can find some with large RAMs and GPUs). Generally speaking, the supercomputing resources are often used when you have extremely parallelizable code that would take a very long time if you ran it on just a few cores (e.g.&amp;amp;nbsp;your computer or a few hydras).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#A massive amount of cores and RAM that can be leveraged for extremely parallelizable computing &lt;br /&gt;
#Easier to access in the statistics department &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Requires learning of new job management system (though quick to learn - see [Slurm]) &lt;br /&gt;
#Some options to access the resources can take time or require going through your advisor &lt;br /&gt;
#&#039;&#039;currently (2021)&#039;&#039; has been having problems with servers crashing &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[PSC|PSC]] &lt;br /&gt;
*[[Slurm|Slurm]] &lt;br /&gt;
&lt;br /&gt;
== Azure ==&lt;br /&gt;
&lt;br /&gt;
Getting an virtual Azure machine is often only needed if you need access to GPUs and you want complete prioritization of your jobs. There are other reasons to utilize Azure, but there are start-up costs and there are only so many department credits to go around (that doesn’t mean you shouldn’t use it).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pros:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#personal virtual computing that can be used only by you (maybe also a small lab group) &lt;br /&gt;
#very flexibly it what is available (e.g.&amp;amp;nbsp;#cores, RAM, GPU vs CPU, etc) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cons:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Start-up costs are higher (requires more understanding of system administration) &lt;br /&gt;
#Requires more clear understanding of the costs as it isn’t free &lt;br /&gt;
#Some resources might not be available relative to department allocations &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Associated Articles&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*[[Azure_getting_started|Azure: getting started]] &lt;br /&gt;
&lt;br /&gt;
== GPU Computing ==&lt;br /&gt;
The Statistics &amp;amp; Data Science Department offers two main GPU computing environments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ghidorahs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 3 physical servers&lt;br /&gt;
* RTX 4090 GPUs&lt;br /&gt;
* Connected to the Stats network share&lt;br /&gt;
* Your statistics directory account will grant you access&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Wright&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* For a detail overview, please check [[GPU Cluster|here]]&lt;br /&gt;
* You must request access&lt;br /&gt;
* The Statistics network share is not accessible &lt;br /&gt;
&lt;br /&gt;
= Computing resource flowchart =&lt;br /&gt;
&lt;br /&gt;
These flow charts try to help capture what’s available and when you might use them.&lt;br /&gt;
&lt;br /&gt;
Visit the links below to view current computing resource usage. Select a server with the least amount of users and lowest resource usage.&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/fdkb6l4klj400d/hydra-cluster?orgId=1 Hydra Cluster Usage Monitor]&lt;br /&gt;
&lt;br /&gt;
* [https://info.stat.cmu.edu/grafana/d/edkar1rgy3l6od/ghidorah-cluster?orgId=1 Ghidorah Cluster Usage Monitor]&lt;br /&gt;
==  [[File:ProblemsOnYourPersonalComputer11.png|706x706px]]==&lt;br /&gt;
&lt;br /&gt;
From [http://laptopmag.com/articles/Cpu-comparison laptopmag]&lt;br /&gt;
&amp;lt;br/&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;↑&amp;lt;/font&amp;gt; &lt;br /&gt;
From [http://digitaltrends.com/computing/how-much-ram digitaltrends]&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=181</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=181"/>
		<updated>2025-01-24T15:30:38Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: /* What resources exist */ Mention nodes with extra RAM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== Introduction (why use the department servers / philosophical use) ==&lt;br /&gt;
&lt;br /&gt;
The department has a set of servers (hosted virtually through campus computing) that can help you process analysis faster and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s ok to not run as polished code as you might on the PSC or Azure.&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
## The exceptions are hydra7 and hydra8, which have 128 GB of RAM. Use these if you have particularly large jobs that need lots of memory.&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed (which should allow parallelization across each server)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server &lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
[to do: add section on sftp]&lt;br /&gt;
&lt;br /&gt;
==== GUI “drag and drop” file sharing ====&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;… &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| present working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;br /&gt;
== Using the server respectfully ==&lt;br /&gt;
&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users we recommend checking (1) the current usage of any server you’re on (it’s possible one server is being used a lot but others are not), (2) not run a parallelize process that could use &#039;&#039;&#039;all&#039;&#039;&#039; of a servers cores (at least leave 1 core open), and (3) deprioritize your jobs that you don’t need to have done soon (especially if others are using the server when you submit your job).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Understanding current resource usage:&#039;&#039;&#039;&amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; lets you know the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is being used/ what is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up there). &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Parallelizing with less than 100% of the cores:&#039;&#039;&#039;&amp;lt;br/&amp;gt;To avoid using all the cores when parallelizing, we recommend you first look at &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt;, and then at least do &amp;lt;code&amp;gt;(# of total cores) -1&amp;lt;/code&amp;gt; as the upper limit of the number of cores used (less if others are using it as well). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Deprioritizing when possible:&#039;&#039;&#039;&amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs (so that others may use the resources if necessary) See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, your can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs, everyone starts out on the same level. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice --20 ./andrew_id&lt;br /&gt;
renice&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=179</id>
		<title>Linux and department servers</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Linux_and_department_servers&amp;diff=179"/>
		<updated>2025-01-10T16:11:43Z</updated>

		<summary type="html">&lt;p&gt;Areinhar: fix /proc/ typos, clean up headings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[&#039;&#039;&#039;Request:&#039;&#039;&#039; Windows users (and all users) - if you see comments that are outdated / less helpful than expected please contribute.]&lt;br /&gt;
&lt;br /&gt;
== Introduction (why use the department servers / philosophical use) ==&lt;br /&gt;
&lt;br /&gt;
The department has a set of servers (hosted virtually through campus computing) that can help you process analysis faster and gain a better understanding of common command line structure for more high scale computing. One can also view the department servers a bit more as a “sandbox” or “playground” as there are very few constraints and it’s ok to not run as polished code as you might on the PSC or Azure.&lt;br /&gt;
&lt;br /&gt;
== What resources exist ==&lt;br /&gt;
&lt;br /&gt;
# The department provides 13 servers (named {&amp;lt;code&amp;gt;hydra1&amp;lt;/code&amp;gt;, ... , &amp;lt;code&amp;gt;hydra13&amp;lt;/code&amp;gt;}&amp;lt;code&amp;gt;.stat.cmu.edu&amp;lt;/code&amp;gt;. &lt;br /&gt;
# Each hydra has 12 CPU cores, and 64 GB of RAM (per core).&lt;br /&gt;
# The hydras all share the same data file system. This allows you to upload a file to any of the hydras and then have it on all of them.&lt;br /&gt;
# [[OpenMPI]] is installed (which should allow parallelization across each server)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[what_resources_when| What resources when]] for guides to help decide which resource you should be using.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction to connecting to the server and useful Linux commands ==&lt;br /&gt;
&lt;br /&gt;
The department servers all run Linux, and require you to use a command line to interact with it (as compared to Rstudio and other GUIs).&lt;br /&gt;
=== Getting Access: (&amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;) ===&lt;br /&gt;
&lt;br /&gt;
To get onto the server and type code you’ll need to access it through &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For Macs (and Linux), open up a &amp;lt;code&amp;gt;terminal&amp;lt;/code&amp;gt; and type &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;ssh andrew_id@hydra1.stat.cmu.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will then have to type in your password (if you don’t know it or don’t know it or have never accessed the server before - email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
For Windows, there&#039;s a few options (with different pros and cons). [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ Makeuseof] provides an overview and introduction to how to get started on a few approaches, including PuTTY and Windows PowerShell. &lt;br /&gt;
&lt;br /&gt;
Again, make sure to email [mailto:remarks@stat.cmu.edu remarks@stat.cmu.edu] to check that you have an account / or what your password is if you forgot.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
If you’re accessing the servers a lot, you might also look into aliases and password storing for the &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; commands. - Mac/Linux: [https://scotch.io/tutorials/how-to-create-an-ssh-shortcut scotch.io] - Windows: Powershell: [https://docs.microsoft.com/en-us/windows/terminal/tutorials/ssh microsoft], PuTTY: [https://www.makeuseof.com/tag/4-easy-ways-to-use-ssh-in-windows/ makeuseof]&lt;br /&gt;
&lt;br /&gt;
=== File sharing (&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; +) ===&lt;br /&gt;
&lt;br /&gt;
There is also command line code to copy files from your personal computer to the server. This is done with a SCP (secure copy) tool. There are also GUIs (graphical user interfaces) that allow you to “drag and drop” files from your computer to the server (and visa-versa). Currently, a lot of students use GUIs to deal with file sharing.&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
You can file share either by using &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt;, for example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Mac/Linux: This command is very similar to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; (the file copier). &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy from server &lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp username@from_host:path/to/file.txt /local/directory/ &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;scp -r username@from_host:path/to/folder/ local/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Copy to server&lt;br /&gt;
    &amp;amp;nbsp;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp local/file.txt username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; scp -r local/directory/ username@to_host:/remote/directory/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; references: [https://haydenjames.io/linux-securely-copy-files-using-scp/ haydenjames.io]&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Windows: Again, this process is a bit more complicated. &lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A PuTTY + Command Prompt provides a version that is very similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://success.tanaza.com/s/article/How-to-use-SCP-command-on-Windows tanaza]), and requires minor changes in the call&amp;amp;nbsp;&amp;amp;nbsp;(&amp;lt;code&amp;gt;pscp -scp&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;scp)&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A Powershell specific command is a bit more complicated / not similar to Mac/Linux &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; (reference: [https://www.nsoftware.com/kb/articles/psserver-scp.rst nsoftware]) &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
==== Command line &amp;lt;code&amp;gt;sftp&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
[to do: add section on sftp]&lt;br /&gt;
&lt;br /&gt;
==== GUI “drag and drop” file sharing ====&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;lot&#039;&#039;&#039; of students use &#039;&#039;&#039;GUI&#039;&#039;&#039; interfaces to transfer files instead of &amp;lt;code&amp;gt;scp&amp;lt;/code&amp;gt; command line. These tools allow you to “drag and drop” files from one location to another after the connection is set up.&lt;br /&gt;
&lt;br /&gt;
Some examples include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mac:&lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://cyberduck.io/ Cyberduck] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Linux: &lt;br /&gt;
  &amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; &lt;br /&gt;
  [https://www.openssh.com/ OpenSSH] &lt;br /&gt;
  &amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Windows: lots of options - [https://www.thegeekstuff.com/2011/06/windows-sftp-scp-clients/ thegeekstuff] &lt;br /&gt;
  &amp;lt;ol&amp;gt; &lt;br /&gt;
    &amp;lt;li&amp;gt;[https://www.putty.org/ PuTTY] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;[https://winscp.net/eng/download.php WinSCP] &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;… &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic CLI (Linux command line): &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Understanding the basic Linux command line is important to be able to navigate when you are actually on the server. Below are some based commands to move around the file system, manipulate files, and view storage structure.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! command&lt;br /&gt;
! translation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;&lt;br /&gt;
| present working directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cd _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| change directory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rm _file_&amp;lt;/code&amp;gt;&lt;br /&gt;
| remove / delete file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mv _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| move file (can change name)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cp _file_ _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| copy file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ls _dir_&amp;lt;/code&amp;gt;&lt;br /&gt;
| list files in directory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
use &amp;lt;code&amp;gt;man _command_&amp;lt;/code&amp;gt; to get a listing / manual of the command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional resources that capture more information on the command line and are still geared to statistical computing can be found here: [http://www.jarrodmillman.com/rcsds/standard/bash.html UCB 2015 reproducible DS lecture notes].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TODO: add information about &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt;, and a link to bash files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Text editors ==&lt;br /&gt;
&lt;br /&gt;
There are multiple options to view code on the server side. They include:&lt;br /&gt;
&lt;br /&gt;
*vim &lt;br /&gt;
*… [to be added later] &lt;br /&gt;
&lt;br /&gt;
== Running jobs ==&lt;br /&gt;
&lt;br /&gt;
We have included thoughts about running jobs in two places.&lt;br /&gt;
&lt;br /&gt;
#The first looks at tools that allow you to keep running jobs on the server when you close the connection to the server (turn off your laptop, etc.). These tools are call [[Terminal_multiplexers|terminal multiplexers]].&amp;amp;nbsp; &lt;br /&gt;
#The second set of tools focus on how to run your [[R_on_the_server|R analysis]] or [[Python_on_the_server|Python analysis]] code on the server.&lt;br /&gt;
&lt;br /&gt;
== Server specs ==&lt;br /&gt;
&lt;br /&gt;
Generally speaking, our servers have multiple CPU cores, but no GPU cores. For deep learning tasks that need GPUs, consider using the [[GPU Cluster|GPU cluster]].&lt;br /&gt;
&lt;br /&gt;
To examine the specs yourself, use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cat /proc/meminfo&lt;br /&gt;
cat /proc/cpuinfo&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see some information.&lt;br /&gt;
== Using the server respectfully ==&lt;br /&gt;
&lt;br /&gt;
Because the servers are a shared department resource it is important to use them respectfully. There are many servers and multiple cores (CPUs) per server. To be respectful of other users we recommend checking (1) the current usage of any server you’re on (it’s possible one server is being used a lot but others are not), (2) not run a parallelize process that could use &#039;&#039;&#039;all&#039;&#039;&#039; of a servers cores (at least leave 1 core open), and (3) deprioritize your jobs that you don’t need to have done soon (especially if others are using the server when you submit your job).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Understanding current resource usage:&#039;&#039;&#039;&amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; lets you know the current usage of the server’s resources with a list of jobs run. It also tells you the percentage of the cores that are being used and the amount of RAM (memory) that is being used/ what is available. See [https://www.howtogeek.com/668986/how-to-use-the-linux-top-command-and-understand-its-output/ howtogeek] resources on how to interpret it all (the documentation is very clean, so we encourage you to read up there). &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;top&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Parallelizing with less than 100% of the cores:&#039;&#039;&#039;&amp;lt;br/&amp;gt;To avoid using all the cores when parallelizing, we recommend you first look at &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt;, and then at least do &amp;lt;code&amp;gt;(# of total cores) -1&amp;lt;/code&amp;gt; as the upper limit of the number of cores used (less if others are using it as well). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Deprioritizing when possible:&#039;&#039;&#039;&amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;nice/renice&amp;lt;/code&amp;gt; allows you to lower the priority of your jobs (so that others may use the resources if necessary) See [https://www.howtogeek.com/411979/how-to-set-process-priorities-with-the-nice-and-renice-commands-in-linux/ howtogeek] resources on the basics. &amp;lt;code&amp;gt;nice&amp;lt;/code&amp;gt; sets the priority, and &amp;lt;code&amp;gt;renice&amp;lt;/code&amp;gt; updates your priority. On the department servers, your can only &#039;&#039;&#039;deprioritize&#039;&#039;&#039; your jobs, everyone starts out on the same level. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;nice --20 ./andrew_id&lt;br /&gt;
renice&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Areinhar</name></author>
	</entry>
</feed>