| | 96 | * 7.1 gdb via mpiexec |
| | 97 | * If there are no gdb installed in your system, you might have following error message: |
| | 98 | {{{ |
| | 99 | jazz@bio-cluster-12:~$ mpiexec -gdb -n 2 /home/jazz/demo1 |
| | 100 | 0: Traceback (most recent call last): |
| | 101 | 0: File "/usr/bin/mpdgdbdrv.py", line 78, in ? |
| | 102 | 0: write(gdb_sin_fileno,'handle SIGUSR1 nostop noprint\n') |
| | 103 | 0: OSError: [Errno 32] Broken pipe |
| | 104 | 1: Traceback (most recent call last): |
| | 105 | 1: File "/usr/bin/mpdgdbdrv.py", line 75, in ? |
| | 106 | 1: write(gdb_sin_fileno,'set confirm off\n') |
| | 107 | 1: OSError: [Errno 32] Broken pipe |
| | 108 | }}} |
| | 109 | * After install gdb, you can use gdb to debug your MPICH2 program. |
| | 110 | {{{ |
| | 111 | jazz@bio-cluster-12:~$ sudo apt-get install gdb |
| | 112 | jazz@bio-cluster-12:~$ mpiexec -gdb -n 2 /home/jazz/demo1 |
| | 113 | 1: Traceback (most recent call last): |
| | 114 | 1: File "/usr/bin/mpdgdbdrv.py", line 75, in ? |
| | 115 | 1: write(gdb_sin_fileno,'set confirm off\n') |
| | 116 | 1: OSError: [Errno 32] Broken pipe |
| | 117 | 0: (gdb) l |
| | 118 | 0: 4 * History: |
| | 119 | 0: 5 * 2008-04-09 BETA |
| | 120 | 0: 6 * 2008-06-25 增加顯示主機名稱功能 |
| | 121 | 0: 7 */ |
| | 122 | 0: 8 |
| | 123 | 0: 9 #include <stdio.h> |
| | 124 | 0: 10 #include <unistd.h> |
| | 125 | 0: 11 #include "mpi.h" |
| | 126 | 0: 12 int main (int argc, char **argv) |
| | 127 | 0: 13 { |
| | 128 | 0: (gdb) |
| | 129 | }}} |