Aparapi 1.8.0 and 1.9.0 fail to run OpenCL on Mac OSX
freemo opened this issue · 2 comments
freemo commented
My local CI process seems to have a bug in it and let a failing build pass. Fixing that. In the meantime I think the issue introduced is related to profiling somehow. When i run the correct dyamic lib against aparapi's test cases on OSX I get the following, with the last test listed apparently hanging forever (let it run for like 5 minutes).
The bug was first introduced in aparapi 1.8.0 and aparapi-jni 1.3.1 or 1.3.0 it appears, aparapi 1.7.0 and aparapi-jni 1.2.0 are the last versions i can confirm work correctly.
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.aparapi.runtime.MultiDimensionalLocalArrayTest
May 08, 2018 2:22:03 AM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Device failed for Resizable1DKernel, devices={Apple<GPU>|Apple<GPU>|Apple<CPU>}: OpenCL execution seems to have failed (runKernelJNI returned -54)
com.aparapi.internal.exception.AparapiException: OpenCL execution seems to have failed (runKernelJNI returned -54)
at com.aparapi.internal.kernel.KernelRunner.executeOpenCL(KernelRunner.java:1231)
at com.aparapi.internal.kernel.KernelRunner.executeInternalInner(KernelRunner.java:1690)
at com.aparapi.internal.kernel.KernelRunner.executeInternalOuter(KernelRunner.java:1351)
at com.aparapi.internal.kernel.KernelRunner.execute(KernelRunner.java:1342)
at com.aparapi.Kernel.execute(Kernel.java:2857)
at com.aparapi.Kernel.execute(Kernel.java:2814)
at com.aparapi.Kernel.execute(Kernel.java:2754)
at com.aparapi.runtime.MultiDimensionalLocalArrayTest.resizableOneDimensionTest(MultiDimensionalLocalArrayTest.java:327)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
May 08, 2018 2:22:03 AM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Trying next device: Apple<GPU>
[ERROR] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.897 s <<< FAILURE! - in com.aparapi.runtime.MultiDimensionalLocalArrayTest
[ERROR] resizableTwoDimensionTest(com.aparapi.runtime.MultiDimensionalLocalArrayTest) Time elapsed: 0.044 s <<< FAILURE!
java.lang.AssertionError: Result is not greater than 3840
at com.aparapi.runtime.MultiDimensionalLocalArrayTest.resizableTwoDimensionTest(MultiDimensionalLocalArrayTest.java:349)
[ERROR] resizableOneDimensionTest(com.aparapi.runtime.MultiDimensionalLocalArrayTest) Time elapsed: 0.045 s <<< FAILURE!
java.lang.AssertionError: user supplied Device incompatible with current EXECUTION_MODE or getTargetDevice(); device = Apple<GPU>; kernel = Resizable1DKernel, devices={Apple<GPU>|Apple<CPU>}
at com.aparapi.runtime.MultiDimensionalLocalArrayTest.resizableOneDimensionTest(MultiDimensionalLocalArrayTest.java:327)
[INFO] Running com.aparapi.runtime.KernelManagerPreferredDeviceTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in com.aparapi.runtime.KernelManagerPreferredDeviceTest
[INFO] Running com.aparapi.runtime.ArrayTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.161 s - in com.aparapi.runtime.ArrayTest
[INFO] Running com.aparapi.runtime.NullRefTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 s - in com.aparapi.runtime.NullRefTest
[INFO] Running com.aparapi.runtime.AtomicsSupportAdvTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.122 s - in com.aparapi.runtime.AtomicsSupportAdvTest
[INFO] Running com.aparapi.runtime.MultiplePassesMemoryConsumptionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.7 s - in com.aparapi.runtime.MultiplePassesMemoryConsumptionTest
[INFO] Running com.aparapi.runtime.StaticArrayAssignmentTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s - in com.aparapi.runtime.StaticArrayAssignmentTest
[INFO] Running com.aparapi.runtime.UseBooleanTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s - in com.aparapi.runtime.UseBooleanTest
[INFO] Running com.aparapi.runtime.ProfileReportBackwardsCompatTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.167 s - in com.aparapi.runtime.ProfileReportBackwardsCompatTest
[INFO] Running com.aparapi.runtime.NegativeIntegerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 s - in com.aparapi.runtime.NegativeIntegerTest
[INFO] Running com.aparapi.runtime.ReturnInstantiatedArrayDirectlyTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s - in com.aparapi.runtime.ReturnInstantiatedArrayDirectlyTest
[INFO] Running com.aparapi.runtime.StaticVariableAssignmentTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s - in com.aparapi.runtime.StaticVariableAssignmentTest
[INFO] Running com.aparapi.runtime.BarrierSupportTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.178 s - in com.aparapi.runtime.BarrierSupportTest
[INFO] Running com.aparapi.runtime.LoadClTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 s - in com.aparapi.runtime.LoadClTest
[INFO] Running com.aparapi.runtime.ArbitraryScopeTest
[WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0 s - in com.aparapi.runtime.ArbitraryScopeTest
[INFO] Running com.aparapi.runtime.LocalArrayArgsTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 s - in com.aparapi.runtime.LocalArrayArgsTest
[INFO] Running com.aparapi.runtime.BufferTransferTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.123 s - in com.aparapi.runtime.BufferTransferTest
[INFO] Running com.aparapi.runtime.AtomicsSupportTest
[INFO] Tests run: 42, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.474 s - in com.aparapi.runtime.AtomicsSupportTest
[INFO] Running com.aparapi.runtime.ProfileReportUnitTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s - in com.aparapi.runtime.ProfileReportUnitTest
[INFO] Running com.aparapi.runtime.JtpRangeIdsTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in com.aparapi.runtime.JtpRangeIdsTest
[INFO] Running com.aparapi.runtime.OpenCLDeviceConfiguratorTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 s - in com.aparapi.runtime.OpenCLDeviceConfiguratorTest
[INFO] Running com.aparapi.runtime.ProfileReportNewAPITest
gildasmorvan commented
Problem seems fixed with v2.0.0.
freemo commented
@gildasmorvan excellent!