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

Adding Test Cases for Target Parallel Loop Construct #772

Closed jainprad closed 1 year ago

jainprad commented 1 year ago

Please Review the test cases.

seyonglee commented 1 year ago

[Results on Summit after fixing hostMin and hostMax errors]

LLVM V17 and NVHC V22.11 fail on the reduction tests; can these fails be related to using fmin() and fmax() functions, where argument types are double, for integer variables?

jainprad commented 1 year ago

[Results on Summit after fixing hostMin and hostMax errors]

  • test_target_parallel_loop_collapse.c

    • GCC 13.1.1: C test passed.
    • XL 16.1.1-10: C test passed.
    • NVHPC 22.11: C test passed.
    • LLVM 17.0.0: Condition test_target_parallel_loop_collapse() failed
  • test_target_parallel_loop_reduction.c

    • GCC 13.1.1: C test passed.
    • XL 16.1.1-10: C test passed.
    • NVHPC 22.11: C test failed: Condition result != hostMin failed; Condition result != hostMax failed
    • LLVM 17.0.0: Condition result != hostMin failed; Condition result != hostMax failed; Condition total != sum_host failed

LLVM V17 and NVHC V22.11 fail on the reduction tests; can these fails be related to using fmin() and fmax() functions, where argument types are double, for integer variables?

Thanks Seyonglee for Review. in C, math.h library functions fmin() and fmax() always returns floating point values either passing integer or floating point as arguments. Here I am casting return value to the result integer variable and comparing result with hostMin/hostMax(integer) that should be correct and pass. But to make this tests according to definition of fmin() and fmax, I have declared all the arrays, result, hostMin and hostMax as double variable. I will upload the updated code for review and execution on your setup. Thanks.

jainprad commented 1 year ago

Hi @spophale , Please review.

seyonglee commented 1 year ago

[Summit Results after @jainprad's update]

After changing the variable types in the reduction test to double, the NVHPC-compiled version also passed while the LLVM-compiled version still failed. I don't see any other issue on these tests.