1

I'm trying to compile code on GCC that uses OpenACC to offload to an NVIDIA GPU but I haven't been able to find a similar compiler option to the one mentioned above. Is there a way to tell GCC to be more verbose on all operations related to offloading?

1 Answers1

2

Unfortunately, GCC does not yet provide a user-friendly interface to such information (it's on the long TODO list...).

What you currently have to do is look at the dump files produced by -fdump-tree-[...] for the several compiler passes that are involved, and gather information that way, which requires understanding of GCC internals. Clearly not quite ideal :-/ -- and patches welcome probably is not the answer you've been hoping for.

Typically, for a compiler it is rather trivial to produce diagnostic messages for wrong syntax in source code ("expected [...] before/after/instead of [...]"), but what you're looking for is diagnostic messages for failed optimizations, and similar, which is much harder to produce in a form that's actually useful for a user, and so far we (that is, the GCC developers) have not been able to spend the required amount of time on this.

tschwinge
  • 346
  • 1
  • 5
  • 1
    That's what I thought. After all, the whole OpenACC thing is still very much in development in GCC. A compiler flag that would just produce debug output like "Found acc area in file x on line y and produced kernel code for offload target nvptx" would be really helpful to get started. I'm not in a position to produce any useful patches, since I don't know much about compilers or C in general. – Christopher Thonfeld-Guckes Jun 29 '16 at 12:30