We will use PicoCluster to write and run programs throughout the course. Start here to connect, find your way around the command line, and create files.
Hardware
PicoCluster is a 64-bit ARM computer with 20 nodes. The login node is pc0, and the compute nodes are pc1 through pc19. Each node has 4 cores and 8 GB of RAM, for 80 cores in total.
Connect to PicoCluster
PicoCluster is available from the Wofford campus network and is not accessible off campus.
Open Terminal on macOS or Windows Terminal on Windows, then connect with SSH:
ssh yourWoffordUsername@picoclusterAn account will be created for you. Initial login information will be shared with you in class. When entering a password in the terminal, no characters will appear; that is normal. After your first login, change the temporary password with the passwd command. If you forget it, contact me so I can reset it.
Meet the machine
You are working remotely on a real Linux computer. Before doing anything else, take a moment to investigate the machine you are using.
hostnamehostname identifies the PicoCluster node you are currently using. When you first connect, you will normally be on the login node, pc0. Later, our programs will also run on compute nodes such as pc1, pc2, and so on.
lscpulscpu describes the node’s processor. Look for:
- Architecture: the type of processor architecture
- CPU(s): the number of logical processors Linux can use
- Core(s) per socket: the number of physical processor cores
- Thread(s) per core: whether each core supports multiple hardware threads
- Model name: the processor model, when reported
- Caches: small, fast areas of memory located near the processor
You do not need to understand all of these details yet. We will return to cores, threads, and caches as we learn how parallel programs use the hardware.
free -hfree -h reports the node’s memory usage in human-readable units. Compare the total, used, and available columns. The available amount can change because you share the machine with other processes and users.
uname -auname -a summarizes the operating system and hardware platform. Look for the Linux kernel version and the machine architecture.
These commands describe the individual node you are currently using, not the entire cluster. PicoCluster combines multiple nodes, each with its own processor and memory. Later, we will explore how programs divide work within one node and across several nodes.
Use the command line
Your account has its own home directory (located at /home/your_username/). These commands will help you get oriented (try running them in order):
whoami # show the username you are logged in as
pwd # show your current directory
ls # list its contents
ls -lh # list files with human-readable sizes
mkdir test # create a directory named test
cd test # enter that directory
pwd # confirm your location
ls # list its contents
cd .. # move up/back one directory
clear # clear the terminal screenA single dot (.) means the current directory, while two dots (..) mean its parent directory. You can return to your home directory at any time with either cd or cd ~. When you are finished working, enter exit to end the SSH session.
You will also need a terminal-based text editor. nano is the easiest place to start. To create or edit a file, enter nano filename.
Create and edit a file
Try creating a short text file:
nano notes.txtType a few lines. Here are a few useful Nano shortcuts:
| Shortcut | What it does |
|---|---|
| Ctrl+O, then Enter | Save the file using its current name |
| Ctrl+X | Exit Nano; if you have unsaved changes, it asks whether to save |
| Ctrl+A / Ctrl+E | Move to the beginning / end of the current line |
| Ctrl+K | Cut the current line (when no text is selected) |
| Ctrl+U | Paste the text you cut in Nano |
| Alt+U | Undo the last edit |
| Ctrl+G | Show help |
At the bottom of Nano, ^ means Ctrl: ^O means Ctrl+O. Use the Control key, including on a Mac. If Alt+U does not work in your terminal, press Esc, release it, and then press U. Nano’s cut/paste buffer is separate from your computer’s clipboard.
Save with Ctrl+O, then Enter, and exit with Ctrl+X. Read the file from the command line:
cat notes.txtFiles created in this terminal session are on the remote computer. Downloading a file in your laptop’s browser does not put it on PicoCluster. You can create the file in Nano and paste its contents there.
Check your setup
Before moving on, make sure you can:
- Log in and identify the node with
hostname. - Create a directory and move into it.
- Create, save, and read a text file.
- Run
gcc --versionto see the installed C compiler.