public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* OMPD: 5.5.8 Display Control Variables
@ 2022-05-22 15:56 Mohamed Atef
  2022-05-23  7:49 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Mohamed Atef @ 2022-05-22 15:56 UTC (permalink / raw)
  To: gcc, Jakub Jelinek, tobias

To implement this
<https://www.openmp.org/spec-html/5.1/openmpsu247.html#x312-4810005.5.8>,
should I add a function in the runtime to dump all the
environment variables. Or should I use variables from helper functions?
To make the icv-name=icv-value pair I think it will be too costly
to use helper functions.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OMPD: 5.5.8 Display Control Variables
  2022-05-22 15:56 OMPD: 5.5.8 Display Control Variables Mohamed Atef
@ 2022-05-23  7:49 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2022-05-23  7:49 UTC (permalink / raw)
  To: Mohamed Atef; +Cc: gcc, tobias

On Sun, May 22, 2022 at 05:56:46PM +0200, Mohamed Atef wrote:
> To implement this
> <https://www.openmp.org/spec-html/5.1/openmpsu247.html#x312-4810005.5.8>,
> should I add a function in the runtime to dump all the
> environment variables. Or should I use variables from helper functions?
> To make the icv-name=icv-value pair I think it will be too costly
> to use helper functions.

ICVs are of different kinds, some are pre-process, some are per-device, some
are per-thread, some are per-task.  But the function only has an address
space handle, so it can't query e.g. particular thread, task etc. ICVs.

My understanding is that the function should return something close to what
omp_display_env prints, except with different formatting, without _OPENMP =
line, the OPENMP DISPLAY ENVIRONMENT BEGIN/END pairs etc.
So, look at what omp_display_env does, copy the content of gomp_global_icv
and various other global vars from the process and then print it into
strings like omp_display_env prints then.
Note, omp_display_env can print also device sets before the vars (there are
patches floating for that in libgomp but still need work), like
  [device] OMP_NUM_THREADS='2'
  [host,device] OMP_DYNAMIC='TRUE'
  [host] OMP_PLACES='{0:4},{4:4},{8:4},{12:4}'
but probably this function should print host only stuff without such
prefixes (and without the 's) or indentation.

	Jakub


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-23  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 15:56 OMPD: 5.5.8 Display Control Variables Mohamed Atef
2022-05-23  7:49 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).