[Openmp-commits] [openmp] r318847 - [CMake] Re-enable libomptarget and restrict tests to Clang 6.0.0
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 3 09:52:34 PST 2018
Yep, looks good. The CMake logic is also the way I thought it was: Only
test if we have all dependencies and built the library.
Let's wait until my checkout of the branch is finished so I can see if I
get the same problem...
Am 2018-01-03 18:47, schrieb Hans Wennborg:
> Looks like I have them:
>
> //Path to a file.
> LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:PATH=/usr/include
>
> //Path to a library.
> LIBOMPTARGET_DEP_LIBELF_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libelf.so
>
> //Path to a file.
> LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:PATH=/usr/include/x86_64-linux-gnu
>
> //Path to a library.
> LIBOMPTARGET_DEP_LIBFFI_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libffi.so
>
> On Wed, Jan 3, 2018 at 6:43 PM, Jonas Hahnfeld <hahnjo at hahnjo.de>
> wrote:
>> There should be some LIBOMPTARGET_DEP_* variables in the cache...
>>
>>
>> Am 2018-01-03 18:40, schrieb Hans Wennborg:
>>>
>>> How do I check whether I have those libraries?
>>>
>>> On Wed, Jan 3, 2018 at 6:24 PM, Jonas Hahnfeld <hahnjo at hahnjo.de>
>>> wrote:
>>>>
>>>> Hmm, not good. I'll download the branch and see if I can see the
>>>> error.
>>>>
>>>> Do you have libelf and libffi installed? Is the target plugin built?
>>>> Maybe
>>>> the tests are not correctly disabled if we don't find the
>>>> libraries...
>>>>
>>>> Jonas
>>>>
>>>>
>>>> Am 2018-01-03 17:51, schrieb Hans Wennborg:
>>>>>
>>>>>
>>>>> After just having created the 6.0.0 branch and trying to run the
>>>>> tests, they still seem to fail:
>>>>>
>>>>> ********************
>>>>> FAIL: libomptarget :: offloading/offloading_success.c (46527 of
>>>>> 48035)
>>>>> ******************** TEST 'libomptarget ::
>>>>> offloading/offloading_success.c' FAILED ********************
>>>>> Script:
>>>>> --
>>>>> echo ignored-command
>>>>> echo ignored-command
>>>>> echo ignored-command
>>>>> /work/llvm-6.0/build.release2/./bin/clang -fopenmp -I
>>>>> /work/llvm-6.0/llvm/projects/openmp/libomptarget/test -I /work
>>>>> /llvm-6.0/build.release2/projects/openmp/libomptarget/../runtime/src
>>>>> -L /work/llvm-6.0/build.release2/lib -fopenmp-t
>>>>> argets=x86_64-pc-linux-gnu
>>>>>
>>>>>
>>>>> /usr/local/google/work/llvm-6.0/llvm/projects/openmp/libomptarget/test/offloading/offloadi
>>>>> ng_success.c -o
>>>>>
>>>>>
>>>>> /usr/local/google/work/llvm-6.0/build.release2/projects/openmp/libomptarget/test/offloading/Output/of
>>>>> floading_success.c.tmp-x86_64-pc-linux-gnu &&
>>>>> /usr/local/google/work/llvm-6.0/build.release2/projects/openmp/libompta
>>>>> rget/test/offloading/Output/offloading_success.c.tmp-x86_64-pc-linux-gnu
>>>>> | /work/llvm-6.0/build.release2/./bin/FileCh
>>>>> eck
>>>>>
>>>>>
>>>>> /usr/local/google/work/llvm-6.0/llvm/projects/openmp/libomptarget/test/offloading/offloading_success.c
>>>>> --
>>>>> Exit Code: 1
>>>>>
>>>>> Command Output (stdout):
>>>>> --
>>>>> $ "echo" "ignored-command"
>>>>> # command output:
>>>>> ignored-command
>>>>>
>>>>> $ "echo" "ignored-command"
>>>>> # command output:
>>>>> ignored-command
>>>>>
>>>>> $ "echo" "ignored-command"
>>>>> # command output:
>>>>> ignored-command
>>>>>
>>>>> $ "/work/llvm-6.0/build.release2/./bin/clang" "-fopenmp" "-I"
>>>>> "/work/llvm-6.0/llvm/projects/openmp/libomptarget/test"
>>>>> "-I"
>>>>>
>>>>>
>>>>> "/work/llvm-6.0/build.release2/projects/openmp/libomptarget/../runtime/src"
>>>>> "-L" "/work/llvm-6.0/build.release2
>>>>> /lib" "-fopenmp-targets=x86_64-pc-linux-gnu"
>>>>> "/usr/local/google/work/llvm-6.0/llvm/projects/openmp/libomptarget/test/
>>>>> offloading/offloading_success.c" "-o"
>>>>>
>>>>>
>>>>> "/usr/local/google/work/llvm-6.0/build.release2/projects/openmp/libomptarget/te
>>>>> st/offloading/Output/offloading_success.c.tmp-x86_64-pc-linux-gnu"
>>>>> $
>>>>>
>>>>>
>>>>> "/usr/local/google/work/llvm-6.0/build.release2/projects/openmp/libomptarget/test/offloading/Output/offloading_succ
>>>>> ess.c.tmp-x86_64-pc-linux-gnu"
>>>>> note: command had no output on stdout or stderr
>>>>> error: command failed with exit status: 1
>>>>> $ "/work/llvm-6.0/build.release2/./bin/FileCheck"
>>>>> "/usr/local/google/work/llvm-6.0/llvm/projects/openmp/libomptarget/
>>>>> test/offloading/offloading_success.c"
>>>>> # command stderr:
>>>>>
>>>>>
>>>>> /usr/local/google/work/llvm-6.0/llvm/projects/openmp/libomptarget/test/offloading/offloading_success.c:19:12:
>>>>> error:
>>>>> expected string not found in input
>>>>> // CHECK: Target region executed on the device
>>>>> ^
>>>>> <stdin>:1:1: note: scanning from here
>>>>> Target region executed on the host
>>>>> ^
>>>>>
>>>>> error: command failed with exit status: 1
>>>>>
>>>>> --
>>>>>
>>>>> On Wed, Nov 22, 2017 at 6:15 PM, Jonas Hahnfeld via Openmp-commits
>>>>> <openmp-commits at lists.llvm.org> wrote:
>>>>>>
>>>>>>
>>>>>> Author: hahnfeld
>>>>>> Date: Wed Nov 22 09:15:18 2017
>>>>>> New Revision: 318847
>>>>>>
>>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=318847&view=rev
>>>>>> Log:
>>>>>> [CMake] Re-enable libomptarget and restrict tests to Clang 6.0.0
>>>>>>
>>>>>> We have just fixed the codegen of omp_is_initial_device() to
>>>>>> reliably
>>>>>> work
>>>>>> when offloading to the same device, see commit r316001. This fixes
>>>>>> the
>>>>>> failing tests that were the reason why we disabled the library for
>>>>>> 5.0.
>>>>>>
>>>>>> Differential Revision: https://reviews.llvm.org/D39052
>>>>>>
>>>>>> Modified:
>>>>>> openmp/trunk/CMakeLists.txt
>>>>>> openmp/trunk/libomptarget/test/CMakeLists.txt
>>>>>>
>>>>>> Modified: openmp/trunk/CMakeLists.txt
>>>>>> URL:
>>>>>>
>>>>>> http://llvm.org/viewvc/llvm-project/openmp/trunk/CMakeLists.txt?rev=318847&r1=318846&r2=318847&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>> --- openmp/trunk/CMakeLists.txt (original)
>>>>>> +++ openmp/trunk/CMakeLists.txt Wed Nov 22 09:15:18 2017
>>>>>> @@ -5,10 +5,7 @@ set(OPENMP_LLVM_TOOLS_DIR "" CACHE PATH
>>>>>> add_subdirectory(runtime)
>>>>>>
>>>>>>
>>>>>> -# The tests currently don't pass if the generic ELF plugin is
>>>>>> built.
>>>>>> -# TODO: Fix the tests and enable libomptarget by default on
>>>>>> supported
>>>>>> -# architectures and platforms.
>>>>>> -set(ENABLE_LIBOMPTARGET OFF)
>>>>>> +set(ENABLE_LIBOMPTARGET ON)
>>>>>> # Currently libomptarget cannot be compiled on Windows or MacOS
>>>>>> X.
>>>>>> # Since the device plugins are only supported on Linux anyway,
>>>>>> # there is no point in trying to compile libomptarget on other
>>>>>> OSes.
>>>>>>
>>>>>> Modified: openmp/trunk/libomptarget/test/CMakeLists.txt
>>>>>> URL:
>>>>>>
>>>>>> http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/test/CMakeLists.txt?rev=318847&r1=318846&r2=318847&view=diff
>>>>>>
>>>>>>
>>>>>> ==============================================================================
>>>>>> --- openmp/trunk/libomptarget/test/CMakeLists.txt (original)
>>>>>> +++ openmp/trunk/libomptarget/test/CMakeLists.txt Wed Nov 22
>>>>>> 09:15:18
>>>>>> 2017
>>>>>> @@ -27,6 +27,29 @@ if(${LIBOMPTARGET_STANDALONE_BUILD})
>>>>>> "C compiler to use for testing OpenMP offloading library")
>>>>>> set(LIBOMPTARGET_TEST_CXX_COMPILER ${CMAKE_CXX_COMPILER} CACHE
>>>>>> STRING
>>>>>> "C++ compiler to use for testing OpenMP offloading library")
>>>>>> +
>>>>>> + if (NOT(${LIBOMPTARGET_TEST_C_COMPILER} MATCHES "clang" AND
>>>>>> ${LIBOMPTARGET_TEST_CXX_COMPILER} MATCHES "clang"))
>>>>>> + libomptarget_say("Can only test with Clang compiler!")
>>>>>> + libomptarget_warning_say("The check-libomptarget target will
>>>>>> not
>>>>>> be
>>>>>> available!")
>>>>>> + return()
>>>>>> + endif()
>>>>>> +
>>>>>> + execute_process(
>>>>>> + COMMAND ${LIBOMPTARGET_TEST_C_COMPILER} --version
>>>>>> + OUTPUT_VARIABLE TEST_COMPILER_VERSION)
>>>>>> + string(REGEX MATCH "version ([0-9.]+)" TEST_COMPILER_VERSION
>>>>>> ${TEST_COMPILER_VERSION})
>>>>>> + if (NOT(TEST_COMPILER_VERSION))
>>>>>> + libomptarget_say("Unable to determine Clang compiler
>>>>>> version!")
>>>>>> + libomptarget_warning_say("The check-libomptarget target will
>>>>>> not
>>>>>> be
>>>>>> available!")
>>>>>> + return()
>>>>>> + endif()
>>>>>> + set(TEST_COMPILER_VERSION ${CMAKE_MATCH_1})
>>>>>> + if (TEST_COMPILER_VERSION VERSION_LESS 6.0.0)
>>>>>> + libomptarget_say("Clang compiler version does not implement
>>>>>> all
>>>>>> codegen, please update to 6.0.0!")
>>>>>> + libomptarget_warning_say("The check-libomptarget target will
>>>>>> not
>>>>>> be
>>>>>> available!")
>>>>>> + return()
>>>>>> + endif()
>>>>>> +
>>>>>> set(LIBOMPTARGET_TEST_OPENMP_FLAG -fopenmp CACHE STRING
>>>>>> "OpenMP compiler flag to use for testing OpenMP offloading
>>>>>> library")
>>>>>> find_program(LIBOMPTARGET_LLVM_LIT_EXECUTABLE
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Openmp-commits mailing list
>>>>>> Openmp-commits at lists.llvm.org
>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-commits
More information about the Openmp-commits
mailing list