Patch by Michael Klemm.
It implements omp_display_env() API, which is run time counterpart of the OMP_DISPLAY_ENV environment variable.
This is part of coming OpenMP 5.1 specification to be released later this year.
Paths
| Differential D74956
OpenMP 5.1 omp_display_env function implementation. ClosedPublic Authored by AndreyChurbanov on Feb 21 2020, 4:50 AM.
Details Summary Patch by Michael Klemm. It implements omp_display_env() API, which is run time counterpart of the OMP_DISPLAY_ENV environment variable.
Diff Detail
Event TimelineComment Actions We can have filechek tests, right? We should verify a bit more than the existence of a function that will return.
Comment Actions
I am not sure how to pipe error output (stderr) to filecheck. I saw some examples of the "2>&1 |", this works in bash, but does not work in c shell. Maybe "|2" can be used? Could somebody please advise how to better pipe stderr to filecheck? Is the "2>&1 |" appropriate? I personally work in bash usually, but some systems may have other shell by default. Comment Actions
Can we do it in two steps?
Comment Actions
Lit parses the 2>&1 directly, redirection is set (probably for subprocess python module), and the text is not sent to an underlying shell. So lit acts as a limited, platform-independent Bourne shell. So It is safe to use 2>&1. From https://llvm.org/docs/TestingGuide.html:
Closed by commit rG95df6747cf19: [openmp] OpenMP 5.1 omp_display_env function implementation. (authored by AndreyChurbanov). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 248173 openmp/runtime/src/dllexports
openmp/runtime/src/include/omp.h.var
openmp/runtime/src/include/omp_lib.h.var
openmp/runtime/src/include/omp_lib.f.var
openmp/runtime/src/include/omp_lib.f90.var
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_ftn_entry.h
openmp/runtime/src/kmp_ftn_os.h
openmp/runtime/src/kmp_runtime.cpp
openmp/runtime/src/kmp_settings.h
openmp/runtime/src/kmp_settings.cpp
openmp/runtime/test/api/omp_display_env0.c
|
The subroutine is declared as bind(C) and the verbose argument is passed by reference. Does it match the C prototype? Should it have the value attribute as well?