On Fri, Jul 30, 2021 at 10:43:01AM +0200, Ulrich Drepper wrote:
> On Fri, Jul 30, 2021 at 9:50 AM Tobias Burnus <tob...@codesourcery.com>
> wrote:
> 
> > this patch breaks offloading. The reason is that most code
> > in env.c is enclosed in:
> >
> 
> Indeed, normally I test that configuration but my setup currently has a few
> problems.
> 
> Although the env vars aren't parsed for those targets it seems to be
> appropriate to still provide the complete implementation.  There are other
> functions which print something this is likely bogus as well and/or the
> output isn't seen.
> 
> How about this change?  Compiles for me for NVPTX.  It doesn't change
> anything but the location of the function definition in the file and
> includes for LIBGOMP_OFFLOADED_ONLY some headers which aren't included in
> this file before (but are present).

I think for now it would be better to guard the omp_display_env_*
in fortran.c with #ifndef LIBGOMP_OFFLOADED_ONLY
It is true that we have e.g. omp_display_affinity supported in offloaded
regions, but in that case we don't really support affinity in the offloaded
regions and so it prints the limited information (like it does even on
hosts that don't support affinity).
But for omp_display_env we shouldn't just print the variables with
default unmodified values, but need to have a structure with all of that
info copied from host to target during load image time.

        Jakub

Reply via email to