Open sanish81 opened 4 years ago
The smp launcher differs from the others in that it doesn't invoke any system launcher to run the _real
executable. Instead all it has to do is to set an environment variable to the desired number of program instances and run the _real
directly. Unfortunately the logic common to all launchers which handles invoking a debugger assumes that there is a system launcher wrapping the _real
, whose command line can be adjusted to wrap an xterm
instead. This is the root cause of the problem. Hopefully there is an elegant way for the common launcher code to recognize that no system launcher is involved, and adjust the command line appropriately.
@gbtitus: Could the common launcher code check the CHPL_LAUNCHER setting, see that it's the smp case, and special-case it?
I have been using the UDP conduit for multilocale debugging without any significant issue. It may be a workaround for this issue.
Could the common launcher code check the CHPL_LAUNCHER setting ... ?
I think so. We don't pass the CHPL_MAKE_LAUNCHER
setting into the launcher library build as a predefined preprocessor variable currently, but we could. Or perhaps we could add the CHPL_LAUNCHER
setting to the runtime build's chpl-env-gen.h
file and then #include
that into the launcher. Checking at execution time would be harder because the actual setting is from the chplenv python scripts rather than the environment; i.e. you could imagine an execution environment in which the chplenv script chose 'smp' as the launcher when CHPL_LAUNCHER
wasn't set at all. We'd have to run the python chplenv script out of the launcher to get that right. Checking when we're compiling the launcher library definitely seems easier.
I have been using the UDP conduit for multilocale debugging without any significant issue. It may be a workaround for this issue.
Yes, that's what they've switched to now, which somewhat relieves the pressure to get this working.
Checking at execution time would be harder
Agreed, I think this is something we'd want to decide at compile-time. Either of the techniques you suggest for threading the information into the source seem reasonable to me.
Summary of Problem
Attempting to launch a multi-locale program either with the "--gdb" flag or with CHPL_COMM_USE_GDB set, results in the following error
<command-line arg>:1: error: Unexpected flag: "-e"<command-line arg>:1: error: Unexpected flag: "-e"
Compile command:
chpl -g my_app.chpl
Execution command:
./my_app --gdb -nl 2
Configuration Information