Thursday, March 6, 2014

gdb and mpi

Compile for both MPI and openMP

mpic++ -fopenmp -g aa.cpp -o test5 -std=c++11

Run
mpirun -np 3 test5

Run with gdb

mpirun -np 1 xterm -e gdb test5

Breakpoint for gdb
Break linenumber

Run in gdb
run

Step over in gdb
n
Continue in gdb
c

No comments:

Post a Comment