Note: The video version of this segment of the tutorial is here.

Henry2 is a Linux cluster

Required software

macOS/Linux Windows

Acceptable Use Policy

You must read and understand the HPC Acceptable Use Policy (AUP), located here.

The AUP seeks to ensure that one user may not adversely affect other users. The HPC has two kinds of "nodes", and it is important to understand the difference between them in order to know which operations may be performed on each type of node.

"Login" nodes are shared with all users, so no resource intensive processes may be run on the login nodes. The purpose of a login node is to prepare to run a program (e.g., moving and editing files and compiling).

"Compute" nodes are for actually running the program. Any process that uses a non-trivial amount of compute or memory resources must be run on a compute node.

The following video on the HPC Acceptable Use Policy explains some of the technical details of the AUP including the difference between login nodes and compute nodes, and it discusses some of the actions that violate the AUP.

Log in to Henry2

Follow the instructions provided on the HPC website for logging in.

Master essential Linux

You can squeak by with the following basic commands along with a simple text editor.

To practice these commands, please see Tutorial One and Tutorial Two for text based tutorials, or see our video for practicing Linux commands.

Use nano for creating text files and editing text. At the command prompt, type

nano [filename]
The text editor nano will list the available key commands. Upon using the Exit key commands in nano, it will prompt you to save the file.

If using Linux for more than a few trivial tasks, you should learn vi or emacs.

Here is our list of recommended resources for learning Linux, text editors, and the command line. Expand the box with recommended learning paths to help inform which materials to try next.

Exercise 2.1: Get the sample exercise file

The sample R script is located here:
/usr/local/apps/samples/guide/weather.R 
  • In your home directory, make a directory called guide.
  • Move through the filesystem so that the current working directory is the guide folder you just created.
  • Copy the R script to the guide directory.
  • Show the contents of the guide directory.
  • Display the contents of the file weather.R.
  • Before modifying weather.R, save a copy of the file as weather.R.save. Confirm the new file exists, and check the contents.
  • Use nano to modify the original script by adding a comment line:
  • # Hello
    
  • Display the contents of the script again.
  • Delete the backup copy.

  • Go to Step 3


    Copyright © 2022 · Office of Information Technology · NC State University · Raleigh, NC 27695 · Accessibility · Privacy · University Policies