OpenMP-Validation-and-Verification / OpenMP_VV

OpenMP Offloading Validation & Verification Suite; Official repository. We have migrated from bitbucket!! For documentation, results, publication and presentations, please check out our website ->
https://crpl.cis.udel.edu/ompvvsollve/
Other
54 stars 19 forks source link

New test for omp_get_max_teams() #750

Closed andrewkallai closed 1 year ago

andrewkallai commented 1 year ago

PLEASE REFER TO CLOSED PR729 FOR RELEVANT DISCUSSION COMMENTS frontier clang 18.0.0 ld.lld: error: undefined symbol: omp_get_max_teams |>>> referenced by /tmp/test_target_get_max_teams.c.o.amdgcn-amd-amdhsa.gfx90a-b5ea00.o:(omp_offloading_72_118bc122_test_get_max_teams_l32) |>>> referenced by /tmp/test_target_get_max_teams.c.o.amdgcn-amd-amdhsa.gfx90a-b5ea00.o:(omp_offloading_72_118bc122_test_get_max_teams_l32) clang: error: ld.lld command failed with exit code 1 (use -v to see invocation) /sw/frontier/ums/ums012/llvm/18.0.0-20230828/bin/clang-linker-wrapper: error: 'clang' failed clang: error: linker command failed with exit code 1 (use -v to see invocation) summit gcc 13.2.1 PASS nvc 22.11 line 61: warning: statement is unreachable [code_is_unreachable] return errors; Remark: individual warnings can be suppressed with "--diag_suppress " NVC++-S-1073-Procedures called in a OpenMP target region must have 'omp declare target' information - omp_get_max_teams (/autofs/nccs-svm1_home1/andrewka/sollve_vv/tests/5.1/teams/test_target_get_max_teams.c: 34) NVC++/power Linux 22.11-0: compilation completed with severe errors

spophale commented 1 year ago

Changes are required to capture the different error conditions.

tob2 commented 1 year ago
andrewkallai commented 1 year ago

tests/5.1/env_var/test_omp_num_teams_env_2.c sets the environmental directly, tests/5.1/runtime_calls/test_teams_region_routines.c sets the ICV through omp_set_num_teams routine, and PR728 is a test specifically for the omp_set_num_teams routine. I don't see a reason to extend this test file as it is suppossed to check the ICV for host and device environments regardless, and is suppossed to pass if someone explicitely sets the ICV before execution.

seyonglee commented 1 year ago

tests/5.1/env_var/test_omp_num_teams_env_2.c sets the environmental directly, tests/5.1/runtime_calls/test_teams_region_routines.c sets the ICV through omp_set_num_teams routine, and PR728 is a test specifically for the omp_set_num_teams routine. I don't see a reason to extend this test file as it is suppossed to check the ICV for host and device environments regardless, and is suppossed to pass if someone explicitely sets the ICV before execution.

We may not need to add omp_set_num_teams or set the environment variable OMP_NUM_TEAMS in this test, but as @tob2 mentioned, one copy of the nteams-var ICV exists per device, and thus different devices can have different values. However, the current test uses the same nteams-var ICV value of the host for both the host and device tests. Therefore, this benchmark will need to be extended to use device-specific values of the teams-var ICV for each subtest.