TornadoVM icon indicating copy to clipboard operation
TornadoVM copied to clipboard

Running unit tests from eclipse on Windows

Open gjevardat opened this issue 3 years ago • 4 comments

Hi

I'am trying to run the TestArrays test provided in your code repo from Eclipse, on Windows.

First I installed everything with opencl and ptx drivers and the benchmarks are running nicely in MINGW64. Then I created simple maven project with tornado dependencies (0.14), and just copied the test Array tests locally (with required TornadoTestBase and few other Exception classes). It compiles fine.

Then I exported the Java flags using tornado --printFlags command and added in the Eclipse launcher. So it looks like -ea -server -XX:-UseCompressedOops -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Djava.library.path=c:\Users\Greg\Gaia\TornadoVM\bin\sdk\lib --module-path c:\Users\Greg\Gaia\TornadoVM\bin\sdk\share\java\tornado -Dtornado.load.api.implementation=uk.ac.manchester.tornado.runtime.tasks.TornadoTaskSchedule -Dtornado.load.runtime.implementation=uk.ac.manchester.tornado.runtime.TornadoCoreRuntime -Dtornado.load.tornado.implementation=uk.ac.manchester.tornado.runtime.common.Tornado -Dtornado.load.device.implementation.opencl=uk.ac.manchester.tornado.drivers.opencl.runtime.OCLDeviceFactory -Dtornado.load.device.implementation.ptx=uk.ac.manchester.tornado.drivers.ptx.runtime.PTXDeviceFactory -Dtornado.load.device.implementation.spirv=uk.ac.manchester.tornado.drivers.spirv.runtime.SPIRVDeviceFactory -Dtornado.load.annotation.implementation=uk.ac.manchester.tornado.annotation.ASMClassVisitor -Dtornado.load.annotation.parallel=uk.ac.manchester.tornado.api.annotations.Parallel -XX:+UseParallelGC @c:\Users\Greg\Gaia\TornadoVM\bin\sdk\etc\exportLists\ptx-exports @c:\Users\Greg\Gaia\TornadoVM\bin\sdk\etc\exportLists\opencl-exports --add-modules ALL-SYSTEM,tornado.runtime,tornado.annotation,tornado.drivers.common,tornado.drivers.ptx,tornado.drivers.opencl

But I have the error

java.lang.IllegalAccessError: class uk.ac.manchester.tornado.runtime.TornadoCoreRuntime (in module tornado.runtime) cannot access class org.graalvm.compiler.options.OptionValues (in module jdk.internal.vm.compiler) because module jdk.internal.vm.compiler does not export org.graalvm.compiler.options to module tornado.runtime Any idea ? Thanks

gjevardat avatar Aug 25 '22 12:08 gjevardat

Hi @gjevardat Thanks for the report. Are you using also MINGW64 as a terminal within Eclipse for Windows? I am not sure it is getting the right VM version and/or configuration. Note that the "Windows" port of TornadoVM is still experimental.

jjfumero avatar Aug 25 '22 12:08 jjfumero

Hello thanks for super fast reply :) No I'am not using MINGw64 terminal within eclipse ! I set the JRE project to graalvm and just added the above flags

gjevardat avatar Aug 25 '22 13:08 gjevardat

OK, I do not think this will work, since we have some scripts for Linux to set up config files. If you use Windows, for now, I recommend running applications within the MINGW64 terminal.

jjfumero avatar Aug 25 '22 13:08 jjfumero

Ok Understood, I'll see what I can do with MINGW64.

gjevardat avatar Aug 25 '22 13:08 gjevardat

I am going to close this issue. @gjevardat feel free to re-open if you encounter more issues.

jjfumero avatar Dec 08 '22 07:12 jjfumero