TornadoVM: Cannot compile with openjdk17 and gcc[89] with Intel opencl.
Describe the bug Trying to compile on Centos 7 with opencl support on devtoolset-8 and devtoolset-9 :
How To Reproduce
make jdk-11-plus BACKEND=opencl
...
INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ tornado-benchmarks ---
-- Looking for CL_VERSION_2_2 - found
-- Found OpenCL: /usr/lib64/libOpenCL.so (found version "2.2")
[INFO] Building jar: /d00/local/tornado/tornadovm/benchmarks/target/tornado-benchmarks-0.11-dev-c61f388.jar
-- Found JNI: /d00/gaia/jdk17/lib/libjawt.so
-- Configuring done
-- Generating done
-- Build files have been written to: /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake
[INFO]
[INFO] --- cmake-maven-plugin:3.7.0-b2:compile (cmake-compile) @ tornado-drivers-opencl-jni ---
[INFO] Configured to use native CMake
gmake[1]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/d00/local/tornado/cmake-3.10.1/bin/cmake -H/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources -B/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake --check-build-system CMakeFiles/Makefile.cmake 0
/d00/local/tornado/cmake-3.10.1/bin/cmake -E cmake_progress_start /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles/progress.marks
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/Makefile2 all
gmake[2]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/tornado-opencl.dir/build.make CMakeFiles/tornado-opencl.dir/depend
gmake[3]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
cd /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake && /d00/local/tornado/cmake-3.10.1/bin/cmake -E cmake_depends "Unix Makefiles" /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles/tornado-opencl.dir/DependInfo.cmake --color=
Scanning dependencies of target tornado-opencl
gmake[3]: Leaving directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/tornado-opencl.dir/build.make CMakeFiles/tornado-opencl.dir/build
gmake[3]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
[ 9%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLCommandQueue.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++ -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux -O3 -fpermissive -export-dynamic -fPIC -O3 -DNDEBUG -fPIC -o CMakeFiles/tornado-opencl.dir/source/OCLCommandQueue.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp: In function ‘void Java_uk_ac_manchester_tornado_drivers_opencl_OCLCommandQueue_clEnqueueWaitForEvents(JNIEnv*, jclass, jlong, jlongArray)’:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:145:97: warning: ‘cl_int clEnqueueWaitForEvents(cl_command_queue, cl_uint, _cl_event* const*)’ is deprecated [-Wdeprecated-declarations]
145 | cl_int status = clEnqueueWaitForEvents((cl_command_queue) queue_id, len, (cl_event *) events);
| ^
In file included from /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:30:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include/CL/cl.h:1891:1: note: declared here
1891 | clEnqueueWaitForEvents(cl_command_queue command_queue,
| ^~~~~~~~~~~~~~~~~~~~~~
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:145:97: warning: ‘cl_int clEnqueueWaitForEvents(cl_command_queue, cl_uint, _cl_event* const*)’ is deprecated [-Wdeprecated-declarations]
145 | cl_int status = clEnqueueWaitForEvents((cl_command_queue) queue_id, len, (cl_event *) events);
| ^
In file included from /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:30:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include/CL/cl.h:1891:1: note: declared here
1891 | clEnqueueWaitForEvents(cl_command_queue command_queue,
| ^~~~~~~~~~~~~~~~~~~~~~
[ 18%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLContext.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++ -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux -O3 -fpermissive -export-dynamic -fPIC -O3 -DNDEBUG -fPIC -o CMakeFiles/tornado-opencl.dir/source/OCLContext.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLContext.cpp
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLContext.cpp:95:7: warning: extra tokens at end of #endif directive [-Wendif-labels]
95 | #endif()
| ^
[ 27%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLDevice.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++ -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux -O3 -fpermissive -export-dynamic -fPIC -O3 -DNDEBUG -fPIC -o CMakeFiles/tornado-opencl.dir/source/OCLDevice.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLDevice.cpp
[ 36%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLEvent.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++ -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux -O3 -fpermissive -export-dynamic -fPIC -O3 -DNDEBUG -fPIC -o CMakeFiles/tornado-opencl.dir/source/OCLEvent.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLEvent.cpp
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] [options] system modules path not set in conjunction with -source 11
[WARNING] [options] --add-opens has no effect at compile time
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] [options] module name in --add-exports option not found: tornado.annotation
[WARNING] [options] module name in --add-exports option not found: tornado.drivers.ptx
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/phases/TornadoTaskSpecialisation.java:[95,18] [deprecation] isAccessible() in AccessibleObject has been deprecated
[INFO] 8 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/OCLArchitecture.java:[45,7] error: OCLArchitecture is not abstract and does not override abstract method getFeatures() in Architecture
[INFO] 1 error
[INFO] -------------------------------------------------------------
...
INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for tornado 0.11-dev:
[INFO]
[INFO] tornado ............................................ SUCCESS [ 1.021 s]
[INFO] tornado-api ........................................ SUCCESS [ 3.393 s]
[INFO] tornado-runtime .................................... SUCCESS [ 2.587 s]
[INFO] tornado-matrices ................................... SUCCESS [ 0.985 s]
[INFO] tornado-drivers .................................... SUCCESS [ 0.685 s]
[INFO] tornado-drivers-common ............................. SUCCESS [ 0.851 s]
[INFO] tornado-drivers-opencl ............................. FAILURE [ 2.008 s]
[INFO] tornado-drivers-opencl-jni ......................... SUCCESS [ 5.210 s]
[INFO] tornado-examples ................................... SUCCESS [ 2.870 s]
[INFO] tornado-benchmarks ................................. SUCCESS [ 7.747 s]
[INFO] tornado-unittests .................................. SUCCESS [ 3.850 s]
[INFO] tornado-annotation ................................. SUCCESS [ 0.819 s]
[INFO] tornado-assembly ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.291 s (Wall Clock)
[INFO] Finished at: 2021-09-17T18:22:18+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tornado-drivers-opencl: Compilation failure
[ERROR] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/OCLArchitecture.java:[45,7] error: OCLArchitecture is not abstract and does not override abstract method getFeatures() in Architecture
[ERROR]
Expected behavior Successful compilation.
Computing system setup (please complete the following information):
- OS: centos7
- OpenCL Version : 2.2 reported by the build process
- TornadoVM commit id c61f388544396609de3b11350e307a048e610a65
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (17 by maintainers)
Yes, that’s right. Our maven repos only ship the releases. What you propose will also work because we rarely change the API. We haven’t scheduled any changes for the next release regarding the API, so it will keep as it is for now.
What we do internally is to use
0.13-dev
(current tag as today) in our pom files and then we update accordingly with each release.Hope this helps
Great. I will close this issue then. Feel free to open new issues if you encounter new problems.
I can confirm that version parsing was the problem - when kludging it with removal of minor version JDK checks at lines 121 and 285:
it worked!
We have probably the first released JDK17 installed with no minor versions yet.
That’s excellent news! We will try in coming weeks - we will assess gains on our cluster with Intel GPUs then CUDA. Thanks a lot!
Hi @yazun , TornadoVM now supports JDK 17 and GraalVM 21.3.0. It is upstream in the
develop
branch:https://github.com/beehive-lab/TornadoVM/commits/develop
Please, let us know if this works for you, and feel free to open new issues if you encounter new problems or want to add your feedback.
Juan
We just finished a greater effort to move to JDK17 so we would be happy to try TornadoVM once the updated to latest JVMCI. (just for the info, we consider TornadoVM for astronomy, Variability Studies in ESA Gaia project ) Thanks