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

error: use of undeclared identifier 'THRESHOLD' #162

Closed colleeneb closed 4 years ago

colleeneb commented 4 years ago

Describe the bug It looks like there is a missing #define THRESHOLD in 5.0/target_teams_distribute/test_target_teams_distribute_reduction_bitor.c Pointer: https://github.com/SOLLVE/sollve_vv/blob/f74e6628477c5b81d2d542b69f1992e22346030e/tests/5.0/target_teams_distribute/test_target_teams_distribute_reduction_bitor.c#L17

Test that it applies to 5.0/target_teams_distribute/test_target_teams_distribute_reduction_bitor.c

To Reproduce Steps to reproduce the behavior:

  1. Try to run with something like
    export OMP_TARGET_OFFLOAD=MANDATORY
    make OMP_VERSION=5.0 CC='xlc_r -qsmp -qoffload' CXX='xlC_r -std=c++11 -qsmp -qoffload -std=c++11 -fopenmp-version=50'  FC='none' VERBOSE_TESTS=1 VERBOSE=1 LOG=1 LOG_ALL=1 all

    and then get compile error:

    ...
    /home/bertoni/tmp/sollve_vv/tests/5.0/target_teams_distribute \
    /test_target_teams_distribute_reduction_bitor.c:29:57: \
    error: use of undeclared identifier 'THRESHOLD'
    while ((!have_true || !have_false) && (num_attempts < THRESHOLD)) {
                                                        ^
    1 error generated.
    Error while processing /home/bertoni/tmp/sollve_vv/tests/5.0/target_teams_distribute/test_target_teams_distribute_reduction_bitor.c.

Expected behavior I expected it to compile :)

Compiler XL 16.1.1 Accelerator hardware K80

colleeneb commented 4 years ago

Sorry, didn't mean to assign anyone, somehow did that accidentally....

spophale commented 4 years ago

Thanks @colleeneb ! Once a PR is ready, it will be added to the comment.

tmh97 commented 4 years ago

@colleeneb removed the threshold value and replaced it with 'N'. After making the change, I was able to compile and run successfully using your 'make' command. Thanks again! see PR #166

colleeneb commented 4 years ago

@tmh97 Thanks! However, my guess was that the solution was to add #define THRESHOLD 1024, (not change THRESHOLD to N), since this would make it more similar to the version in the 4.5 directory (https://github.com/SOLLVE/sollve_vv/blob/0d8c8f7a1d9cd93199ed680cf570e195b8ea85a1/tests/4.5/target_teams_distribute/test_target_teams_distribute_reduction_bitor.c#L18)

But this was just a guess, you guys are the developers. :)

tmh97 commented 4 years ago

@colleeneb adding #define THRESHOLD 1024 instead of changing it to N, then closing this issue! Thanks for following up

colleeneb commented 4 years ago

Sounds great, thanks!