Transcript High Performance Computing
Introduction to High Performance Computing for Climate Computing Dr. Jerry Perez Research Associate High Performance Computing Center
www.hpcc.ttu.edu
1-21-2015
Creating, moving and editing data files
•Login to Hrothgar •pwd •mkdir test •cd test •vi test
How to access the supercomputer: Using Putty to access Hrothgar.hpcc.ttu.edu
•Select or type Hrothgar.hpcc.ttu.edu in the server window.
•Select open
How to access the supercomputer: Using Putty to access Hrothgar.hpcc.ttu.edu
•Use your eRaider user name at the “login as” prompt.
•Use your eRaider password at the “ [email protected]’s password:”
pwd
At prompt, type: pwd
mkdir
At the prompt, type: mkdir test Check your work, type: ls
cd
At the prompt, type: cd test Check your work, type: ls Check your work, type: pwd
Vi – using the text editor
We will prepare to write our first code.
But first we must learn how to use the vi editor.
At the prompt, type: vi test.sh
Using the VI editor
To get into and out of vi To Start vi
To use vi on a file, type in vi filename. If the file named filename exists, then the first page (or screen) of the file will be displayed; if the file does not exist, then an empty file and screen are created into which you may enter text. • vi filename edit filename starting at line 1 • vi -r filename recover filename that was being
edited when system crashed
Using the VI editor
Inserting or Adding Text
The following commands allow you to insert and add text. Each of these commands puts the vi editor into insert mode; thus, the
until
Deleting Text
The following commands allow you to delete text. * x delete single character under cursor Nx delete N characters, starting with character under cursor dw delete the single word beginning with character under cursor dNw delete N words beginning with character under cursor; e.g., d5w deletes 5 words D delete the remainder of the line, starting with current cursor position * dd delete entire current line Ndd or dNd delete N lines,
beginning with the current line; e.g., 5dd deletes 5 lines
Using the VI editor
To Exit vi
Usually the new or modified file is saved when you leave vi. However, it is also possible to quit vi without saving the file.
Note:
The cursor moves to bottom of screen whenever a colon (:) is typed. This type of command is completed by hitting the
original invocation
• :wq
original invocation
• :q
saved for this vi call
TEST.sh – your first cluster job
#$ -V #$ -cwd #$ -S /bin/bash #$ -N test #$ -o $JOB_NAME.o$JOB_ID #$ -e $JOB_NAME.e$JOB_ID #$ -q normal #$ -pe fill 12 #$ -P hrothgar hostname
Running your cluster job
At the prompt type: qsub test.sh
Check your work, type: qstat
Running your cluster job
How to copy files from the supercomputer: Using PSCP to move files •Obtain PSCP.exe: http://www.chiark.greenend.org.uk/~sgtatham/pu tty/download.html
•Select PSCP for your OS.
•If you have a MAC or a Linux OS, you do not need PSCP.
How to copy files from the supercomputer: Using PSCP to move files
Copying files from your Linux host to your Windows PC.
In order to copy a file from your Linux host to your Windows PC your command line would look like this:
pscp [email protected]:test.sh c:\test.sh
This command line copies “test.sh" located in your home directory on your Linux host to the temp directory on your C:\ drive.
Copying files from your Windows PC to our Linux host.
In order to copy a file from your Windows PC to your our Unix host your command line would look like this:
pscp -v c:\test.sh [email protected]:/test.sh
This command line copies “test.sh" located in the C:\ drive to your home directory on our Linux cluster. Remember: Backslashes (
\
) for your DOS and Windows files and forward slashes (
/
) for your Linux files.