Running Programs on the Cray SV1, Spring 2004
(also see Introduction to
the SV1 (ppt))
- ssh cray
(or "ssh cray.tjhsst.edu" from remote)
- bash
(this runs a version of bash - "bourne again shell" - easy interface
you're used to)
- look around: "ls" lists files, "pwd" shows the directory path
- "mkdir directory" creates working directories if you need them
cd directory - changes directorie
- To transfer files from our lab to the SV1:
- Open another x-term (terminal)
- ftp cray
"put file" transfers your file from our lab to the SV1
Note: you can use "ls", "cd" inside ftp
- BETTER: use "gftp" - this provides a ftp with window interface
- Editing programs
- emacs filename
- CTRL x CTRL s
saves your file, no exit
- CTRL x CTRL c
exits emacs, asks if you want to save
- CTRL x CTRL h
Gets a preliminary help file
q - quits the help
t - gives you a tutorial
space bar scrolls
- vi filename
- You start out in "command" mode
- : linenumber
goes to a line number
- :i
Enters "insert" mode - use this mode to type into your file
:a is similar, appends to the end of a line
- ESC
goes back to "command" mode
- In command mode:
x - deletes one char
dd - deletes one line
- :w saves the file
- :wq saves and quits
- :q! quits without saving
- C
- cc -o filename filename.c
("-o filename" generates the output/executable file)
- ./filename
(runs the executable)
- C++
- CC -o filename filename.cpp
- ./filename
(runs the executable)
- Fortran 77
- f90 -o filename filename.f
- ./filename
(runs the executable)
- MPI (SV1 has the C version only)
- cc -o filename filename.c
- mpirun -np 4 filename
(runs the executable with 4 processes, "np" = number of processes)
- mpirun -nt 4 filename
(runs the executable with 4 tasks, "nt" = number of tasks,
tasks use shared memory, may be faster than processes)
MPI Resources