Actions

Difference between revisions of "Getting started"

From Montana Tech High Performance Computing

(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
When you connect to hpc.mtech.edu, you will be logged into the "head" node, aka the "management" or "login" node. You can compile and test programs, submit jobs, and view results on the head node. Computationally intensive work should be done on the "compute" nodes. Jobs are assigned to the compute nodes through the [[Moab]] job scheduler. You request a portion of a compute node, an entire node, or multiple nodes for distributed programs.
 
When you connect to hpc.mtech.edu, you will be logged into the "head" node, aka the "management" or "login" node. You can compile and test programs, submit jobs, and view results on the head node. Computationally intensive work should be done on the "compute" nodes. Jobs are assigned to the compute nodes through the [[Moab]] job scheduler. You request a portion of a compute node, an entire node, or multiple nodes for distributed programs.
  
Check this wiki for software that is currently installed. You can compile and install software into your home directory or request software be installed for system wide use. If your data and software needs exceed 1 GB, then please let us know so a personal directory can be setup on the main [[Storage]] system - /data.
+
Check this wiki for software that is currently installed. You can compile and install software into your home directory or request software be installed for system wide use. If your data and software needs exceed 1 GB, then please let us know so a personal directory can be setup on the main [[Storage]] system - /data or /data1. Note: for users account created after August 2017 (except temporary accounts for classes), your home directory will be directly created on /data or /data1. So no need to request storage space.
  
===Graphical Display (optional)===
+
Below are the detailed instructions regarding to the aforementioned information.
Within the Montana University System, the graphical display from hpc.mtech.edu can be redirected to your local PC if you install an X Server. The cygwin x-server (http://x.cygwin.com/ ) is free and works well. You will need to enable X11 forwarding before you login into hpc.mtech.edu - this is done in putty by selecting Connection-SSH-Tunnels and checking the Enable X11 forwarding box. Start the x-server before logging on and test by running "xeyes".
 
  
==Connecting to HPC==
+
<h3 class="subheader">[[Connecting to HPC]]</h3>
 
+
Detailed instructions on connecting to HPC, transferring files, changing your password.
You can use Secure Shell(SSH) to connect to HPC. Depending on the operating system of your computer, you have different options to get connected.
+
<h3 class="subheader">[[Basic Linux Commands]]</h3>
 
+
Examples of commonly used Linux commands.
===For Mac/Linux===
+
<h3 class="subheader">[[Running Jobs on HPC]]</h3>
You can directly use the Terminal application comes with your system to connect.
+
Basic instructions on running calculations on HPC interactively or via job submission. You can also check more details on the [[Moab]] page.
 
 
In your terminal, type the following command to connect via ssh:
 
 
 
<code>ssh YourUserName@hpc.mtech.edu</code>
 
 
 
You will then receive prompt to enter your password, similar to the following line.
 
 
 
<code>YourUserName@hpc.mtech.edu's password:</code>
 
 
 
You can then enter your password. Note: when you enter your password, nothing will display on the screen.
 
 
 
If you intend to use any applications with GUI interfaces (e.g. MATLAB, COMSOL), you will need to add the '-X' option when connecting:
 
 
 
<code>ssh -X YourUserName@hpc.mtech.edu</code>
 
 
 
=== For Windows ===
 
You will need to install a terminal emulator program to connect. There are many such programs[https://en.wikipedia.org/wiki/List_of_terminal_emulators], below are examples of using '''MobaXterm''' and '''Xshell'''.
 
 
 
==== Using MobaXterm ====
 
MobaXterm[http://mobaxterm.mobatek.net/] is a single application that has integrations of several tools, e.g., SSH, X11, FTP....
 
 
 
MobaXterm has a free Home Edition, and you download it [http://mobaxterm.mobatek.net/download.html here]. Either the Portable version or the Installer version is fine.
 
 
 
To connect to the HPC, you can either start a local terminal, and use the command <code>ssh YourUserName@hpc.mtech.edu</code> as detailed in the previous Mac/Linux section.
 
 
 
[[File:Moba_1.png|border|500px]]
 
 
 
Or you can click the '''Session''' button on the top left corner and choose '''SSH''' in the pop-up window. Then enter the HPC's address and your username as shown below:
 
 
 
[[File:Moba_2.png|border|500px]]
 
 
 
Then click '''Ok''' and you'll get a prompt to enter your password.
 
 
 
==== Using Xshell ====
 
You can download Xshell at https://www.netsarang.com/products/xsh_overview.html It's free for School/Home use.
 
 
 
You'll also need to install an X Server program on your computer if you want to use any graphical applications (e.g. MATLAB, COMSOL). One free X Server is Xming and you can download it at https://sourceforge.net/projects/xming/
 
 
 
After the installation of Xshell/Xming, you can follow the steps below to set up the connection.
 
 
 
<div class="row">
 
<br>
 
  <div class="large-4 column">
 
* 1. Open Xshell, select '''New''' under the '''File''' Tab, and click the '''Connection''' category.<br />In the '''Host''' field, enter our HPC address (hpc.mtech.edu).<br \>You can also name this connection in the '''Name''' field (e.g., TechHpc).
 
  </div>
 
  <div class="large-8 column">
 
[[File:Xshell_1.png|border|400px]]
 
  </div>
 
</div>
 
 
 
<div class="row">
 
<br>
 
  <div class="large-4 column">
 
* 2. Click the  '''Authentication''' category, make sure '''Password''' is selected for the '''Method''' category.<br \>Then enter your username and password in the '''User Name''' and '''Password''' fields respectively.
 
  </div>
 
  <div class="large-8 column">
 
[[File:Xshell_2.png|border|400px]]
 
  </div>
 
</div>
 
 
 
<div class="row">
 
<br>
 
  <div class="large-4 column">
 
* 3. (Optional for GUI Applications) Click '''Tunneling''' category, select '''Forward X11 connection to''' and choose '''X DISPLAY:'''.<br \>Then enter your username and password in the '''User Name''' and '''Password''' fields respectively.
 
  </div>
 
  <div class="large-8 column">
 
[[File:Xshell_3.png|border|400px]]
 
  </div>
 
</div>
 
Once the above setup is complete, you can select '''Open''' under the '''File''' tab (or just use the '''Open''' Button) to connect to HPC.
 
Remember to run Xming first, if you need to use graphical interfaces. And you'll see its icon in the Taskbar.
 
 
 
==Transferring files between your computer and HPC==
 
 
 
After you login to HPC, the files you created/saved is stored on HPC. You will need some tools to transfer files between your computer and HPC.
 
 
 
===For Mac/Linux===
 
You can directly use the <code>scp</code> command in the terminal to do a file transfer, or you can use any FTP applications.
 
 
 
===For Windows===
 
You can use any FTP programs to transfer files. Just use hpc.mtech.edu as the host address, and provide your username and password. One FTP program is Xftp (free for home/school). You can get it at https://www.netsarang.com/products/xfp_overview.html
 
 
 
If you are logged in using Xshell, you can use the '''New File Transfer''' button in the toolbar (or the keyboard shortcut '''Ctrl'''+'''Alt'''+'''F''')  to open the file transfer.
 
By default, in the popped up Xftp window, you'll see your Desktop directory on the left side and the directory you are at in Xshell on the right. You can then Right-Click any files or folders to transfer files.
 
 
 
For Mobaxterm, the FTP function is integrated. If you are logged in to HPC, you can choose the '''Sftp''' tab in the left sidebar to download/upload files. Or you can also start a '''SFTP''' session similar to the Mobaxterm tutorial above.
 
 
 
==Basics==
 
Once you logged in, you'll see some texts, including the logo and some notice.<br \>
 
At the bottom line, you'll see your cursor after a Unix prompt(possibly a dollar sign):<br \>
 
<code>[YourUserName@scyld ~]$ &#10074;</code>
 
The texts before the dollar sign include your username, computer name and your current directory name. For general purposes, these texts will be omitted in the following examples, like <code>$ &#10074;</code>
 
 
 
===Change your initial password===
 
It's best to change your initial password the first time you log in. To do it, simply use the passwd command:
 
 
 
<code>$ passwd</code>
 
 
 
You will then get the following texts:
 
 
 
<code>Changing password for user YourUserName.
 
 
 
Changing password for YourUserName.
 
 
 
(current) UNIX password: &#10074;</code>
 
 
 
Enter your initial(current) password and press enter. You'll then be prompt to enter and retype new passoword:
 
 
 
<code>New password:
 
 
 
Retype new password:</code>
 
 
 
If change is successful, you'll get:
 
 
 
<code>passwd: all authentication tokens updated successfully.</code>
 
 
 
===Your Home Directory===
 
When you login to HPC, you are directed to your default home directory, which generally has the following format:
 
 
 
<code>/home/YourAffiliation/YourUserName</code>
 
 
 
'''NOTE:''' There is limited space available on the /home partition, where your default home directory is on. If you need to store a large amount of data or files (>2G), we will create a directory for you either at <code>/data/YourUserName</code> or <code>/data1/YourUserName</code>. You can send us an email to request a directory there.
 
 
 
===Exercises of Basic Linux Commands===
 
*To check your current directory use the command:
 
 
 
<code>$ pwd</code>
 
 
 
*Copy an folder to your home directory:
 
 
 
<code>$ cp -r /opt/intro ~</code>
 
 
 
Copy a file to your home directory:
 
 
 
<code>$ cp /opt/intro/helloworld.f ~</code>
 
 
 
The tilde symbol is your home directory
 
 
 
*List the contents of your home directory:
 
 
 
<code>$ ls</code>
 
 
 
*Go to the newly copied directory intro and list contents:
 
 
 
<code>$ cd intro
 
 
 
$ ls</code>
 
 
 
*Create a new folder, testfolder, here
 
 
 
<code>$ mkdir testfolder
 
 
 
$ ls</code>
 
 
 
*Move/Rename a file(or folder)
 
 
 
<code>$ mv helloworld.f helloworld2.f
 
 
 
$ls
 
 
 
$ mv helloworld2.f ./testfolder/
 
 
 
$ ls
 
 
 
$ ls ./testfolder </code>
 
 
 
Here the dot above represents the current directory.
 
 
 
*Go back to your home directory
 
 
 
<code>$ cd</code>
 
 
 
*Delete file/folder
 
 
 
<code>$ ls
 
 
 
$ rm helloworld.f
 
 
 
$ ls
 
 
 
$ rm -r intro
 
 
 
$ ls</code>
 

Revision as of 10:40, 22 September 2017

The HPC cluster's operating system is CentOS 7.3. Remote Access is through ssh (e.g., putty) or the NX web client which provides a desktop environment.

After you log into hpc.mtech.edu for the first time, please change your initial password. This is done using the passwd command - you will be prompted for your old password and then your new password.

When you connect to hpc.mtech.edu, you will be logged into the "head" node, aka the "management" or "login" node. You can compile and test programs, submit jobs, and view results on the head node. Computationally intensive work should be done on the "compute" nodes. Jobs are assigned to the compute nodes through the Moab job scheduler. You request a portion of a compute node, an entire node, or multiple nodes for distributed programs.

Check this wiki for software that is currently installed. You can compile and install software into your home directory or request software be installed for system wide use. If your data and software needs exceed 1 GB, then please let us know so a personal directory can be setup on the main Storage system - /data or /data1. Note: for users account created after August 2017 (except temporary accounts for classes), your home directory will be directly created on /data or /data1. So no need to request storage space.

Below are the detailed instructions regarding to the aforementioned information.

Connecting to HPC

Detailed instructions on connecting to HPC, transferring files, changing your password.

Basic Linux Commands

Examples of commonly used Linux commands.

Running Jobs on HPC

Basic instructions on running calculations on HPC interactively or via job submission. You can also check more details on the Moab page.