-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run test_omp_target_offload with multiple environment vars set #262
Run test_omp_target_offload with multiple environment vars set #262
Conversation
@tob2 This looks good to me. I want to double-check that it will interact OK with the results collection, there might be some overwrite/naming issues with the output files. Also, is there a way to do this with a bash FOR, to reduce the repetition? For the run dependencies: If I understand your suggestion correctly, I believe the SOURCES option, if specified, will change the run rule dependency list to be just the listed files. |
6a0d02d
to
72af402
Compare
I have now moved it to the Bash script using NOTE: I forced-pushed the new version. The previous version is at SOLLVE/sollve_vv@master...tob2:target_offload_env-orig The make output now looks as follows. ("PASS" is placed between the other logs as STDERR is unbuffered contrary to STDOUT.)
[Re-committed + fixed ↑ as I had a typo in of the "DISABLED" (missing tailing 'D' in one place).] |
72af402
to
202381f
Compare
One question: Currently, it only checks DEFAULT, MANDATORY, DISABLED; should it also check 'unset'? |
Early ping |
In the test we do capture if the value is not set. The 5.0 spec only recognizes DEFAULT, MANDATORY, DISABLED and the language suggests that OMP_TARGET_OFFLOAD must be one of those. TODO: We add an error if it is not set. Thanks @tob2 ! |
I tested this out. Looks like the way our results generation works causes all the results from the three runs to be merged into one result, with the final pass/fail decision based on the outcome of the last run (I need to check this further to see exactly what is going on, it could be that it needs all three to pass in order to pass). We need to discuss what the expected behavior should be in terms of the website results. Should the website show three rows per compiler/system for this test? If so, right now there is no way to distinguish the environment variable settings on the website. Or, should it just show PASS/FAIL based on whether or not all three runs pass? The latter is my preference. TL;DR this does basically work with our full infrastructure, but we should discuss what exactly we want to do on the website with this. @spophale @tmh97 |
Yes, we did discuss it last meeting, I forgot to mention here what we decided. We're thinking it would work best to create three separate test files, one for each setting, each with one unique run rule in the Makefile. That way the online results are clear about which environment settings fail/pass, since the test names will indicate which setting was used. |
Pull Req. OpenMP-Validation-and-Verification#262 * sys/scripts/run_test.sh: Add --env argument. * Makefile (%.c.run, %.c.runonly): Automatically set environment variable based on the test-case name (test_<envname>_env_<val>.c). * tests/5.0/program_control/test_omp_target_offload.c: Renamed ... tests/5.0/program_control/test_omp_target_offload_env_DEFAULT.c: to this; add 'EXPECTED_POLICY' #define and check that the env var matches. * tests/5.0/program_control/test_omp_target_offload_env_DISABLED.c: New; #define EXPECTED_POLICY and include the _DEFAULT file. * tests/5.0/program_control/test_omp_target_offload_env_MANDATORY.c: Likewise.
202381f
to
710d534
Compare
Like this new version? |
LGTM. |
* tests/5.0/program_control/test_omp_target_offload_env_DEFAULT.c: Remove unused variable, fixed OMPVV_ERROR_IF fmt string usage.
|
@spophale just tested on Summit. Works as expected. |
Hey @tob2 , I realized some of the changes we pushed into the makefile broke the ability to run .c files using Specifically the lines 350-368 as noted in this issue #400 It seems the makefile error is thrown on line 358. Any thoughts on what may be the issue? I'll continue to look into this but figured it was worth asking |
Currently, 5.0/program_control/test_omp_target_offload.c is a bit pointless as it requires that OMP_TARGET_OFFLOAD is set, which is usually not the case.
As discussed in pull #240, it cannot be set after program start.
This patch runs the once-compiled program three times. It seems to work okay, but I am not sure whether it messes up any diagnostic postprocessing.
Run trice with env OMP_TARGET_OFFLOAD set to DEFAULT, MANDATORY, DISABLED.