PADX LINUX
Quick Reference
For full documentation: http://parallel.vub.ac.be/
=> Documentation
Linux KDE environment
- Single-click to start a program or activate a file, keep
the Control
button to prevent this
- You have 4 desktops or workspaces to organize your work
- Alt-TAB: to change between windows in a workspace
The 4 most important applications are on the toolbar, down left:
Netscape, Terminal the File Manager and Kwrite
Terminal (Console)
ls -al: list contents of directory
cd directoryname: change directory, cd .. to go
back to the
parent directory
pwd: show the path of the current directory
hostname: name of
computer
mkdir directoryname: create a directory
ssh hostname: go to another machine (eg parallel1), use exit
to go back
cp pathname-filename pathname: copy file to a different
location,
~/ is your home directory
Control-c: stops a running program.
use the Up & Down Arrows to repeat commands
(!)
copy: select a text, paste: click on both mouse
buttons at
the same time
TAB: to complete the name of a program, file or
directory.
grep <options>
<word> <files> to look for a word in files, use * to
look in all files, use option -R for recursive search (in
subdirectories)
Kwrite or Kate (multiple files & Terminal)
- F11: show Line Numbers
- Ctrl+I: Indent (also when multiple lines are selected)
- Ctrl+Shift+I: Unindent
- Ctrl+D: Comment (also when multiple lines are selected)
- Ctrl+Shift+D: Uncomment
- Ctrl+B: Toggle bookmark
on current line
- Alt+PageDown: go to next
bookmark
- Alt+PageUp: go to
previous bookmark
Compilation
in terminal
- qmake myproject.pro : to create the makefile from the
project file with Qmake
- make -k all: compilation
- make clean: to remove all object files and executables
MPI
- to run your program: mpirun
--hostfile <hostfile> <options>
<executablename> <program arguments>
- options: C for a
process on each computer, -np 4
to specify number of processes
- hostfile: 1 computer
name per line
- mpitask to
see
all mpi programs running
- for debugging or redirection of slave output: mpirun <options> <script>
<executablename>
<arguments>
Debugging
Start the gdb debugger with gdb executable
- r: to start the program
- p var = print variable
- p rec->field or p *var: prints part of a variable or the
pointer
content
- breakpoints
- b filename:linenumber = add a breakpoint at that place
- b myFunction = add a breakpoint at the start of the
function
- b myClass::myMethod = add a breakpoint at the start
of
the method
- delete 1 = delete breakpoint number 1
- delete = delete all breakpoints
- advance
- c = continue (runs program until the next breakpoint)
- s = step in (step by step execution, debugger 'goes
in' a
function)
- n = step over (step by step execution, debugger
executes a
function
without 'going in' that function)
- press Enter to repeat the last command
- up/down = up or down the program call stack
- display/undisplay $1 = show variable labelled as $1 at
every
step
- l: shows lines of the program code
- q: quit gdb
- Control-c: stops the running program