PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

HelloWorld MPI: PGDBG shows only one process.

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Angel de Vicente



Joined: 19 Jul 2010
Posts: 3

PostPosted: Fri Jan 13, 2012 3:53 pm    Post subject: HelloWorld MPI: PGDBG shows only one process. Reply with quote

Hi,

I just installed PGI Fortran (11.10) in my Ubuntu 10.04 workstation, but I'm having trouble with the debugger.

The program in question is just a simple hello world:

program hello
include 'mpif.h'
integer ierr, myproc
call mpi_init(ierr)
call mpi_comm_rank(MPI_COMM_WORLD, myproc, ierr)
print *, "Hello world! I'm node", myproc
call mpi_finalize(ierr)
end

I compile it with:
pgf90 -Mmpi=mpich1 -o test -g test.f90

which gives no trouble and then I can run it OK outside the debugger:
$ mpirun -np 4 ./test
Hello world! I'm node 0
Hello world! I'm node 2
Hello world! I'm node 3
Hello world! I'm node 1

But if I try to run it with the debugger:
mpirun -np 4 -dbg=pgdbg ./test

I get the following in the Command window of the debugger, with the ERRORS at the end.

=========================
PGDBG 11.10-0 x86-64 (Workstation, 16 Process)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc. All Rights Reserved.
Loaded: /home/angelv/Dropbox/ProgrammingGym/PPMPI/ppmpi_f/chap03/./test


pgdbg> ignore 10
Ignore signal SIGUSR1(10)

pgdbg> break main
(1)breakpoint set at: hello line: "test.f90"@4 address: 0x407406
1
pgdbg> run -p4pg /home/angelv/Dropbox/ProgrammingGym/PPMPI/ppmpi_f/chap03/PI20788 -p4wd /home/angelv/Dropbox/ProgrammingGym/PPMPI/ppmpi_f/chap03 -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 0x407406, function hello, file test.f90, line 4
#4: call mpi_init(ierr)

pgdbg> libnss_files.so.2 loaded by ld-linux-x86-64.so.2.
libnss_mdns4_minimal.so.2 loaded by ld-linux-x86-64.so.2.
libnss_dns.so.2 loaded by ld-linux-x86-64.so.2.
libresolv.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.
ERROR: New Process (PID 21688, HOST carro) ATTACH FAILED.
ERROR: New Process (PID 21688, HOST carro) IGNORED.
ERROR: Cannot read value at address 0x9E7300.
ERROR: Cannot read value at address 0x9E7308.
ERROR: Cannot read value at address 0x9E7310.
ERROR: New Process (PID 0, HOST unknown) IGNORED.
ERROR: Cannot read value at address 0x9E7318.
ERROR: Cannot read value at address 0x9E7320.
ERROR: Cannot read value at address 0x9E7328.
ERROR: New Process (PID 0, HOST unknown) IGNORED.
ERROR: Cannot read value at address 0x69EA08.
ERROR: Thread Running. Ignoring cont.
ERROR: Ignoring cont.
======================


Has anybody encountered this? Any solutions?

Thanks a lot,
Ángel de Vicente
Back to top
View user's profile
Angel de Vicente



Joined: 19 Jul 2010
Posts: 3

PostPosted: Fri Jan 13, 2012 4:29 pm    Post subject: Re: HelloWorld MPI: PGDBG shows only one process. Reply with quote

Angel de Vicente wrote:

I just installed PGI Fortran (11.10) in my Ubuntu 10.04 workstation, but I'm having trouble with the debugger.


Sorry, it is Ubuntu 11.04 (x86_64)

Thanks,
Ángel
Back to top
View user's profile
donb



Joined: 20 Jul 2004
Posts: 82
Location: The Portland Group, Inc.

PostPosted: Mon Jan 16, 2012 12:35 pm    Post subject: Reply with quote

I have been experimenting with your test case here at PGI, and I have found that although it works on older systems, it fails on Ubuntu 11.10. We don't have a workaround at this time. I have submitted a problem report and a fix should appear in an early 2012 release. It is probably too late for a fix in the upcoming 12.1.

Thanks for the report, and sorry this is not working for you.
--Don
Back to top
View user's profile
Angel de Vicente



Joined: 19 Jul 2010
Posts: 3

PostPosted: Tue Jan 17, 2012 3:57 pm    Post subject: Reply with quote

I found that, as it turns out, the issue was related to a Ubuntu feature: https://wiki.ubuntu.com/Security/Features#ptrace

Disabling it temporarily
sudo sysctl -w kernel.yama.ptrace_scope=0

makes the program run without trouble with PGDBG.

Cheers,
Ángel de Vicente
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
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