OK, the problem was indeed with the version of GDB and GCC. Now I
can run the debugger from Eclipse on the MPI Pi test program.
I still have a problem with my program though; the debugger breaks
correctly at the beginning, I have the appropriate local variables
displayed, but as soon as I step in, I get the following exception
from Eclipse:
Exception in thread "Proxy Client Packet Thread"
java.lang.ArrayIndexOutOfBoundsException: 679
at
org.eclipse.ptp.proxy.util.compression.huffmancoder.HuffmanCoder.decode(HuffmanCoder.java:416)
at
org.eclipse.ptp.proxy.util.compression.huffmancoder.HuffmanByteUncompress.apply(HuffmanByteUncompress.java:75)
at
org.eclipse.ptp.proxy.packet.ProxyPacket.read(ProxyPacket.java:263)
at
org.eclipse.ptp.proxy.client.AbstractProxyClient.processPacket(AbstractProxyClient.java:264)
at
org.eclipse.ptp.proxy.client.AbstractProxyClient.access$4(AbstractProxyClient.java:259)
at
org.eclipse.ptp.proxy.client.AbstractProxyClient$2.run(AbstractProxyClient.java:356)
I then have to manually kill a
bunch of eclipse/sdm/mpirun processes and restart everything in
order to get things back to normal.
This could be coming from a bug in my MPI program, however running
it with mpirun from command line is working.
-------- Forwarded Message --------
I think the issue is with my version of GDB.
I updated GCC to 4.8.1 and so it seems I need to update GDB
manually as well now. I will try that and let you know.
http://stackoverflow.com/questions/19129706/c-app-on-ubuntu-after-installing-gcc-4-8-1-the-gdb-does-not-work
-------- Forwarded Message --------
Hi Greg,
I seem to have the same problem when using GDB from the command
line:
am12530@logti-a3460-17:~/workspace/mpi-cpp-pi-test/Debug$ gdb
mpi-cpp-pi-test
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute
it.
There is NO WARRANTY, to the extent permitted by law. Type
"show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from
/home/am12530/workspace/mpi-cpp-pi-test/Debug/mpi-cpp-pi-test...done.
(gdb) b main
Breakpoint 1 at 0x408790: file ../src/mpi-cpp-pi-test.cpp, line
17.
(gdb) r
Starting program:
/home/am12530/workspace/mpi-cpp-pi-test/Debug/mpi-cpp-pi-test
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, main () at ../src/mpi-cpp-pi-test.cpp:17
17 double PI25DT = 3.141592653589793238462643;
(gdb) info locals
SEEK_END = 2
ompi_stdio_seek_set = 0
SEEK_SET = 0
std::__ioinit = {static _S_refcount = <optimized out>,
static _S_synced_with_stdio = <optimized out>}
ompi_stdio_seek_cur = 1
SEEK_CUR = 1
ompi_stdio_seek_end = 2
(gdb)
So I suppose it is not an issue with Eclipse or PTP then? Or
could it be an issue with the build? Here are some more
information with my Debug configuration:
Target System Configuration: Generic OpenMPI Interactive
Connection Type: Local
Number of processes: 2
Cheers,
Valentin
On 14-09-15 09:21 AM, Greg Watson
wrote:
I’ve opened a bug on the project name issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=444117
Please try the following commands from the command line:
gdb <your_program>
(gdb) b main
(gdb) r
(gdb) info locals
I would be interested to see what it says at this point.
Regards,
Greg
This is the name
of the local machine, I am trying to debug locally. I
had to uncomment a line from my hosts file in order
for it to work (127.0.1.1 logti-a3460-17).
The MPI Pi C++ example was making the debugger hang as
well, but that is because I had spaces in the
directory name of the project, so I think in the
commands the --routing_file option was not right. Now
with a brand new MPI Pi C++ project I can have the
debugger working, and here is a screenshot similar to
yours showing my issue with the variables.
On 14-09-05 06:00 PM,
Greg Watson wrote:
Is logti-a3460-17 a valid host name on
your system? The sdm is trying to resolve this as an
address but it is failing. This resolution needs to
work on the nodes as well as the frontend, so the
node would need to be configured to resolve the name
correctly.
Greg
Thank
you. I have applied the patch, but I just
get a similar error, with gethostbyname
instead of getaddrinfo.
#PTP job_id=19157
Data for JOB [38102,1] offset 0
SDM: [server] effsize: 2, size: 1, rv: 0
SDM: [server] Found routing file, size=1
SDM: [0] size 2
SDM: [0] in sdm_create_sockd_map
SDM: [0] sdm_route_get_route dest {0},
parent 1
SDM: [0] adjacent nodes: {}
SDM: [0] This node is a server!
SDM: [server] effsize: 2, size: 1, rv: 0
SDM: [0] nodeID: 0, hostname:
logti-a3460-17, port: 51969
SDM: [0] found entry for node 0
SDM: [0] found my entry
SDM: [0] [ACCEPT] sockfd: 4
SDM: [0] port bound: 51969
SDM: [0] bound to port 51969
SDM: [master] effsize: 2, size: 1, rv: 0
SDM: [master] Found routing file, size=1
SDM: [1] size 2
SDM: [1] route for 0 is {}
SDM: [1] in sdm_create_sockd_map
SDM: [1] sdm_route_get_route dest {0-1},
parent 1
SDM: [1] adjacent nodes: {0}
SDM: [1] adding 0 to my map
SDM: [master] effsize: 2, size: 1, rv: 0
SDM: [1] nodeID: 0, hostname:
logti-a3460-17, port: 51969
gethostbyname: Connection timed out
SDM: [1] gethostbyname error. hostname:
logti-a3460-17, port: 51969
SDM: [1] failed to connect to child
logti-a3460-17:51969
SDM: [1] sdm_message_init failed
SDM: sdm_init failed
On 14-09-05
05:37 PM, Greg Watson wrote:
Put the patch file
somewhere, the go to the
org.eclipse.ptp.debug.sdm directory and
type “patch -p3 <
/path/to/patch_file”. Type “make” to
rebuild the sdm.
HTH,
Greg
Yes it is
Ubuntu... Sorry I don't know how
to apply the patch, what should
I do?
On
14-09-05 05:12 PM, Greg Watson
wrote:
Valentin,
Is your backend Ubuntu
by any chance? I have a
suspicion that getaddrinfo
is buggy on Ubuntu, and
this may be causing the
problem. If you’re feeling
adventurous, you could try
applying the following
patch to the sdm which
replaces getaddrinfo with
gethostbyname. It would be
interesting to see if this
helps at all.
Regards,
Greg
Hi
Greg,
Thanks for your
help. I was using
Open MPI 1.8.1 and
PTP 8.0.1 (with
the fix for OMPI
1.8, which was
working since the
debugger could
launch). I have
now updated to PTP
8.1.0 and for some
reason I get the
getaddrinfo error
again, the same
way it was
described by
Christoph Schober
in a previous
thread (progress
bar stuck, cannot
connect to
debugger, Eclipse
hangs until SDM
process is
killed).
This is slightly
unrelated to my
original problem
but now I cannot
start debugging
anymore, and I
don't understand
why I have this
issue again. I
made sure the
start_job.pl
script was
correct, and I
recompiled SDM
from the 8.1.0
source archive.
Some SDM debug
output:
#PTP job_id=15465
Data for JOB
[57962,1] offset 0
SDM: [server]
effsize: 2, size:
1, rv: 0
SDM: [server]
Found routing
file, size=1
SDM: [0] size 2
SDM: [0] in
sdm_create_sockd_map
SDM: [0]
sdm_route_get_route
dest {0}, parent 1
SDM: [0] adjacent
nodes: {}
SDM: [0] This node
is a server!
SDM: [server]
effsize: 2, size:
1, rv: 0
SDM: [0] nodeID:
0, hostname:
logti-a3460-17,
port: 59885
SDM: [0] found
entry for node 0
SDM: [0] found my
entry
SDM: [0] [ACCEPT]
sockfd: 4
SDM: [0] port
bound: 59885
SDM: [0] bound to
port 59885
SDM: [master]
effsize: 2, size:
1, rv: 0
SDM: [master]
Found routing
file, size=1
SDM: [1] size 2
SDM: [1] route for
0 is {}
SDM: [1] in
sdm_create_sockd_map
SDM: [1]
sdm_route_get_route
dest {0-1}, parent
1
SDM: [1] adjacent
nodes: {0}
SDM: [1] adding 0
to my map
SDM: [master]
effsize: 2, size:
1, rv: 0
SDM: [1] nodeID:
0, hostname:
logti-a3460-17,
port: 59885
getaddrinfo:
Connection timed
out
SDM: [1]
getaddrinfo error.
hostname:
logti-a3460-17,
port: 59885
SDM: [1] failed to
connect to child
logti-a3460-17:59885
SDM: [1]
sdm_message_init
failed
SDM: sdm_init
failed
On
14-09-03 04:05
PM, Greg Watson
wrote:
I
just tried
debugging the
MPI Pi C++
Project using
Open MPI 1.6 on
Ubuntu 14.04
with PTP 8.0.1
and it worked
fine.
Can you
provide more
details on
your setup?
Maybe a
screenshot
showing the
Parallel Debug
perspective
would help?
Greg
<Mail
Attachment.png>
On Sep 3,
2014, at 12:52
PM, Valentin
Vervondel < valentin.vervondel.1@xxxxxxxxxxxxx>
wrote:
Yes
I have a stack
frame
selected, and
it is
displaying
some variables
just none of
mine, only
what seems to
be Open MPI
variables, no
matter where I
break in my
program. Here
is a full
list:
cl::NullRange
(No value)
ompi_stdio_seek_set
0
SEEK_END 2
ompi_stdio_seek_end
2
std::__ioinit
{...}
_S_refcount
0
_S_synced_with_stdio
false
SEEK_CUR 1
ompi_stdio_seek_cur
1
SEEK_SET 0
On 14-09-03
09:58 AM, Greg
Watson wrote:
Do
you have a
stack frame
selected in
the Debug
view? The
Variables view
will not
display
anything
unless you
have a stack
frame
selected.
Regards,
Greg
On Aug 21,
2014, at 2:52
PM, Valentin
Vervondel <valentin.vervondel.1@xxxxxxxxxxxxx>
wrote:
Hi,
When I start a
parallel debug
of my Open MPI
application, I
don't have my
program
variables
displayed in
the Variables
tab of the
parallel debug
perspective. I
actually have
two Variables
tab, the first
one only
contains
variables such
as
ompi_stdio_seek_set,
ompi_stdio_seek_end,
SEEK_CUR,
cl::NullRange,
etc. but none
of my
own variables,
no matter
where I am
debugging in
the program.
The second one
iw just empty.
Same for when
I hover on a
variable, no
value is
displayed.
I have tried
closing the
tabs and
resetting the
perspective,
but the
problem
persists. I am
using Luna
with PTP 8.0.1
on Ubuntu.
Thanks!
_______________________________________________
ptp-user
mailing list
ptp-user@xxxxxxxxxxx
To change your
delivery
options,
retrieve your
password, or
unsubscribe
from this
list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user
mailing list
ptp-user@xxxxxxxxxxx
To change your
delivery
options,
retrieve your
password, or
unsubscribe
from this
list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user
mailing list
ptp-user@xxxxxxxxxxx
To change your
delivery
options,
retrieve your
password, or
unsubscribe
from this
list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing
list
ptp-user@xxxxxxxxxxx
To change your
delivery options,
retrieve your
password, or
unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options,
retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve
your password, or unsubscribe from this
list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
<ptp-sdm-no-variables.png>_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password,
or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-user
|