|
| View previous topic :: View next topic |
| Author |
Message |
hongyon
Joined: 19 Jul 2004 Posts: 551
|
Posted: Tue Aug 31, 2010 4:13 pm Post subject: |
|
|
Hi,
I think I understand what the problem is. Did you do something like this?
prompt% pgdbg mpirun -np 4 .-dbg=pgdbg ./a.out
That probably why it fails to run with 4 processes. It will run as a single process and if you have some communication between processes, it will fail big time.
In order to debug an MPI program in a debugger, the command you need to run is as follow:-
prompt% mpirun -np 4 -dbg=pgdbg ./a.out
This is how MPICH1 debugging works. Did I misunderstand something here?
Hongyon |
|
| Back to top |
|
 |
lionel@predsci.com
Joined: 07 Nov 2008 Posts: 15 Location: San Diego, CA
|
Posted: Tue Aug 31, 2010 4:31 pm Post subject: |
|
|
No,
I did start with
mpirun -np 4 -dbg=pgdbg hello
If I do:
| Quote: |
PGDBG 10.6-0 x86-64 (Workstation, 8 Process)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
Loaded: /home/lionel/hello
pgdbg> ignore 10
Ignore signal SIGUSR1(10)
pgdbg> break main
(1)breakpoint set at: hello line: "hello.f"@4 address: 0x406E34
1
pgdbg> run -p4pg /home/lionel/PI31029 -p4wd /home/lionel -mpichtv
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
Breakpoint at 0x406E34, function hello, file hello.f, line 4
#4: call mpi_init(ierr)
pgdbg>
pgdbg> next
libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
libnss_compat.so.2 loaded by ld-linux-x86-64.so.2.
libnsl.so.1 loaded by ld-linux-x86-64.so.2.
libnss_nis.so.2 loaded by ld-linux-x86-64.so.2.
Warning!!!! The current implementation of PGDBG supports
the debugging MPI application with randomized loading by
duplicating symbol information for each process. If
PGDBG is consuming too much memory, you should consider
running:
sysctl -w kernel.randomize_va_space=0
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
ld-linux-x86-64.so.2 loaded by ld-linux-x86-64.so.2.
libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
ld-linux-x86-64.so.2 loaded by ld-linux-x86-64.so.2.
libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
ld-linux-x86-64.so.2 loaded by ld-linux-x86-64.so.2.
libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
([1] New Process)
([2] New Process)
([3] New Process)
[0] Stopped at 0x406E3D, function hello, file hello.f, line 5
#5: call mpi_comm_rank(MPI_COMM_WORLD, myproc, ierr)
pgdbg [all] 0>
|
then, it's OK.
However, if I do
| Quote: |
PGDBG 10.6-0 x86-64 (Workstation, 8 Process)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
Loaded: /home/lionel/hello
pgdbg> ignore 10
Ignore signal SIGUSR1(10)
pgdbg> break main
(1)breakpoint set at: hello line: "hello.f"@4 address: 0x406E34
1
pgdbg> run -p4pg /home/lionel/PI31405 -p4wd /home/lionel -mpichtv
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
Breakpoint at 0x406E34, function hello, file hello.f, line 4
#4: call mpi_init(ierr)
pgdbg>
pgdbg> run argument
Reloading:
/home/lionel/hello argument
libpthread.so.0 loaded by ld-linux-x86-64.so.2.
librt.so.1 loaded by ld-linux-x86-64.so.2.
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
Breakpoint at 0x406E34, function hello, file hello.f, line 4
#4: call mpi_init(ierr)
pgdbg> next
libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
libnss_compat.so.2 loaded by ld-linux-x86-64.so.2.
libnsl.so.1 loaded by ld-linux-x86-64.so.2.
libnss_nis.so.2 loaded by ld-linux-x86-64.so.2.
Stopped at 0x406E3D, function hello, file hello.f, line 5
#5: call mpi_comm_rank(MPI_COMM_WORLD, myproc, ierr)
pgdbg>
|
as you can see, only one process is initialized. |
|
| Back to top |
|
 |
hongyon
Joined: 19 Jul 2004 Posts: 551
|
Posted: Tue Aug 31, 2010 7:18 pm Post subject: |
|
|
For MPI Program, you need to restart the program using mpirun everytime you want to debug a program.
Basically, mpirun will spawn a process(es) and the debugger will attach to each process mpirun spawns of and display as a single entity on the GUI.
When you type a "run" command, it basically restart a new single program. At this point, pgdbg has no capability to spawn new mpi process(es).
Hongyon |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|