charmplusplus / charm

The Charm++ parallel programming system. Visit https://charmplusplus.org/ for more information.
Apache License 2.0
208 stars 49 forks source link

CharmDebug in SMP mode does not work #1485

Open bilgeacun opened 7 years ago

bilgeacun commented 7 years ago

Original issue: https://charm.cs.illinois.edu/redmine/issues/1485


It has been broken since at least Charm 6.6.0.

bilgeacun commented 5 years ago

Original date: 2017-04-06 15:13:03


It simply freezes when you press "Start", nothing else is printed.

ericjbohm commented 5 years ago

Original date: 2017-04-06 22:24:40


See the bohm/charmdebugpatch branch for a hacky workaround to that hang.

bilgeacun commented 5 years ago

Original date: 2017-04-13 18:32:02


bohm/charmdebugpatch branch still freezes with some ppn values, for example this one for tests/charm++/simplearrayhello: ./charmdebug ./hello +p8 10 ++ppn 2

I have found this comment from Abhishek on TMS:


Tried to see what are the issues when using CharmDebug with SMP. Eventually emailed Filippo.
Response from Filippo regarding CharmDebug for SMP mode:
"I don't recall having made documentation for SMP version of CharmDebug, but I also never really explored that direction. This project will be quite an extensive one, I believe. There are quite a few things to fix and design decisions to make. Let me just give you a brainstorming of the items I see missing/problematic:
1) Many variables are not thread safe (need to use more Ckpv/Cpv) primarily in ck-core/debug-charm.C and conv-core/memory-charmdebug.c
2) You need to come up with how the UI should display SMP nodes (this abstraction is totally missing from the java app)
3) You need to design how you plan to track memory allocation in SMP (note that I don't think charmdebug can run without -memory charmdebug...): per core? per node? I thought that memory charmdebug was built uniquely on top of memory-gnu, but apparently I already ported it to work on memory-os, so that is good since memory-gnu should be probably avoided. But remember that nowadays the allocation is done in quite a fancy manner so you need to take that into consideration when you redesign the memory-related facilities (leak detection/scanning/etc.)
4) Most of the Cpd getter utilities should not pose too much of a problem (just need to be extended a bit)
5) Tools like the provisional delivery may need to be disabled. This tool makes use of fork, which would not work in an SMP scenario (at least not easily). This tool does not work under bigsim as well. "
bilgeacun commented 5 years ago

Original date: 2017-08-01 21:16:20


Changing this into a Feature since CharmDebug never worked/implemented for SMP.

ericjbohm commented 5 years ago

PR #2540 fixes this hang and enables most charmdebug functionality (including breakpoints) to work for SMP programs. There are still some issues remaining (i.e., gdb) due to charmdebug being ignorant of the distinction between a PE and Process that arises in SMP.