Page MenuHomePhabricator

[OpenMP] Always emit debug messages that indicate offloading failure

Authored by jhuber6 on Aug 24 2020, 12:30 PM.



This patch changes the libomptarget runtime to always emit debug messages that occur before offloading failure. The goal is to provide users with information about why their application failed in the target region rather than a single failure message. This is only done in regions that precede offloading failure so this should not impact runtime performance. if the debug environment variable is set then the message is forwarded to the debug output as usual.

A new environment variable was added for future use but does nothing in this current patch. LIBOMPTARGET_INFO will be used to report runtime information to the user if requrested, such as grid size, SPMD usage, or data mapping. It will take an integer indicating the level of information verbosity and a value of 0 will disable it.

Diff Detail

Event Timeline

jhuber6 created this revision.Aug 24 2020, 12:30 PM
jhuber6 requested review of this revision.Aug 24 2020, 12:30 PM

This is the first iteration. I just took the messages and passed them to the user without modifying them in any way. I also quickly added the environment variable to output extra information to the user in the case of failure but haven't added any support for it.

I didn't add any messages for the offload failures from the plugins because I wasn't sure if I should be modifying those because they don't inherit directly from the rest of the libomptarget source. There's useful information that tends to be more specific about what failed so I can add that in if it's okay.

jdoerfert accepted this revision.Aug 26 2020, 9:42 AM

LGTM, nice first step. We continue from here.

This revision is now accepted and ready to land.Aug 26 2020, 9:42 AM
ye-luo added a subscriber: ye-luo.Aug 26 2020, 9:48 AM

Please document the flags in the patch summary.

jhuber6 updated this revision to Diff 288060.Aug 26 2020, 11:54 AM
jhuber6 edited the summary of this revision. (Show Details)
jhuber6 edited the summary of this revision. (Show Details)Aug 26 2020, 12:02 PM
jhuber6 updated this revision to Diff 288099.Aug 26 2020, 1:28 PM

Fixed formatting. Some of the libomptarget test files seem to just randomly fail between tests, which makes it kind of annoying to test for correctness. Hopefully nothing breaks in the background.

This revision was landed with ongoing or failed builds.Aug 26 2020, 4:56 PM
This revision was automatically updated to reflect the committed changes.