The Tufts High Performance Compute (HPC) cluster delivers 35,845,920 cpu hours and 59,427,840 gpu hours of free compute time per year to the user community.
Teraflops: 60+ (60+ trillion floating point operations per second) cpu: 4000 cores gpu: 6784 cores Interconnect: 40GB low latency ethernet
For additional information, please contact Research Technology Services at tts-research@tufts.edu
9. Editing Files
A text editor is a simple tool to assist the user with creating and editing files. There is no best text editor, it depends on personal preferences. The most widely used editors avaliable on Stampede are emacs, vi and vim (an enhanced version of vi). Emacs relies heavily on key-chords (or multiple key strokes), while vi(m) uses distinct editing modes. Vi(m) users tend to enter and exit the editor repeatedly, and use the shell for complex tasks, while emacs users typically remain within the editor and use emacs itself for complex tasks. Most users develop a perference for one or the other and stick with it.
Â
Following is a brief introduction to the basics of vi(m).
Creating a File
- Type vi followed by the file name you want to create and edit.
$vi temp.txt
- vi has two modes: command mode and insert mode. Command modes allows users to input commands and insert mode allows users to insert text. Vi will start up in command mode; to enter insert mode type i. Use Esc to leave insert mode and enter command mode. To add lines to temp.txt, type i to enter insert mode.
- Type some lines into the file temp.txt
Hello new users, My name is Philip, and this is a tutorial ~ ~ ~ ... -- INSERT --
- When you have finished typing, hit Esc to exit insert mode. Note that you can move the cursor around.
- Assuming you want to delete "Hello new users" and replace this phrase with "Hi there", move the cursor to the first character ("H")and type dw three times. This will remove the three words, leaving the ",". Type i to enter insert mode and type "Hi there".
- When you are finished, press Esc to exit insert mode.
Hi there, My name is Philip, and this is a tutorial ~ ~ ...
- Press :w to write and save to the file.
Hi there, My name is Philip, and this is a tutorial ~ ~ ... "temp.txt" [New] 3L, 9C written
Useful Functions
After pressing Esc to exit insert mode and enter command mode, you can do any of the following:
u : UndoÂ
x : Delete one character
dd: Delete one line
dw: Delete one word
#Number+dd : Delete # of lines
#Number+dw : Delete # of words
For example: 3dd deletes 3 lines from the cursor (including the current line), 3dw deletes 3 words.
Type : to enter file commands. You can then do one of the following (type and press Enter<):
:q: Quit
:q!: Force quit (ignore saving)
:w: Write
:wq: Write and quit
Â
Â
For additional information, please contact Research Technology Services at tts-research@tufts.edu