jminer-0.4.4-SNAPSHOT for ARM - help needed



  • Hi,

    i try to run the burstcoin-jminer-0.4.4-SNAPSHOT.jar on my Odroid XU4 (ARM-) device and got some problems. Maybe someone can help me with it.

    On my odroid i install OPENCL1.2 and Java8. When i try to run the jminer 0.4.4-SNAPSHOT as it can be downloaded here (https://github.com/de-luxe/burstcoin-jminer/releases/tag/0.4.4-SNAPSHOT) and start it i get the following Error-message:

    11:16:02.925 [main] INFO  burstcoin.jminer.JMinerApplication - Starting the engines ... please wait!
    2016-08-05 11:16:07.249  WARN 4956 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OCLChecker': Invocation of init method failed; nested exception is java.lang.UnsatisfiedLinkError: Error while loading native library "JOCL_0_1_9-linux-arm" with base name "JOCL_0_1_9"
    Operating system name: Linux
    Architecture         : arm
    Architecture bit size: 32
    ---(start of nested stack traces)---
    ...
    ...
    ...
    

    So it means JOCL_0.1.9 isn´t supported for ARM by the jminer.
    After seeing this i get in contact with @luxe and try build JOCL for ARM from source. Unfortunately i only succeeded with JOCL in version
    *JOCL_0_2_0-linux-arm -> https://github.com/gpu/JOCL/releases/tag/2.0.0-RC00
    *JOCL_0_2_1-linux-arm -> https://github.com/gpu/JOCL

    So i was not able to build JOCL_0_1_9, but i could make the jocl-2.0.0-SNAPSHOT.jar and jocl-2.0.1-SNAPSHOT.jar within the according native library "libJOCL_2_0_0-linux-arm.so".

    After i got the jocl-2.0.0-SNAPSHOT.jar and jocl-2.0.1-SNAPSHOT.jar, i add them to the burstcoin-jminer-0.4.4-SNAPSHOT.jar and run the program.

    Now i got the following Error-message with both of them:

    11:17:38.321 [main] INFO  burstcoin.jminer.JMinerApplication - Starting the engines ... please wait!
    2016-08-05 11:17:42.694  INFO 5142 --- [           main] burstcoin.jminer.core.CoreProperties     : Winner and PoolInfo feature disabled, property 'walletServer' undefined!
    2016-08-05 11:17:42.843  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    : -------------------------------------------------------
    2016-08-05 11:17:42.843  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    : List of system openCL platforms and devices (* = used for mining)
    2016-08-05 11:17:42.843  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    : 
    2016-08-05 11:17:42.851  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :  * PLATFORM-[0] ARM Platform
    2016-08-05 11:17:42.852  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :                 OpenCL 1.2 v1.r9p0-05rel0.816303d14b549c8bed2bad5983436ff4
    2016-08-05 11:17:42.870  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :      DEVICE-[0] Mali-T628 (0GB) - ARM
    2016-08-05 11:17:42.870  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :                 OpenCL 1.2 v1.r9p0-05rel0.816303d14b549c8bed2bad5983436ff4 | '1.2'
    2016-08-05 11:17:42.873  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :                 work group size '256', computing units '4', available 'true'
    2016-08-05 11:17:42.873  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :  *   DEVICE-[1] Mali-T628 (0GB) - ARM
    2016-08-05 11:17:42.874  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :                 OpenCL 1.2 v1.r9p0-05rel0.816303d14b549c8bed2bad5983436ff4 | '1.2'
    2016-08-05 11:17:42.874  INFO 5142 --- [           main] b.jminer.core.checker.util.OCLChecker    :                 work group size '256', computing units '2', available 'true'
    2016-08-05 11:17:42.929  WARN 5142 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OCLChecker': Invocation of init method failed; nested exception is org.jocl.CLException: CL_INVALID_BUILD_OPTIONS
    2016-08-05 11:17:42.947 ERROR 5142 --- [           main] o.s.boot.SpringApplication               : Application startup failed
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OCLChecker': Invocation of init method failed; nested exception is org.jocl.CLException: CL_INVALID_BUILD_OPTIONS
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) ~[spring-boot-1.3.3.RELEASE.jar!/:1.3.3.RELEASE]
    	at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) ~[spring-boot-1.3.3.RELEASE.jar!/:1.3.3.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-1.3.3.RELEASE.jar!/:1.3.3.RELEASE]
    	at burstcoin.jminer.JMinerApplication.main(JMinerApplication.java:60) [burstcoin-jminer-0.4.4-SNAPSHOT.jar!/:0.4.4-SNAPSHOT]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
    	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) [burstcoin-jminer-0.4.4-SNAPSHOT.jar!/:0.4.4-SNAPSHOT]
    	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
    Caused by: org.jocl.CLException: CL_INVALID_BUILD_OPTIONS
    	at org.jocl.CL.clBuildProgram(CL.java:11252) ~[burstcoin-jminer-0.4.4-SNAPSHOT.jar!/:0.4.4-SNAPSHOT]
    	at burstcoin.jminer.core.checker.util.OCLChecker.initChecker(OCLChecker.java:132) ~[burstcoin-jminer-0.4.4-SNAPSHOT.jar!/:0.4.4-SNAPSHOT]
    	at burstcoin.jminer.core.checker.util.OCLChecker.postConstruct(OCLChecker.java:82) ~[burstcoin-jminer-0.4.4-SNAPSHOT.jar!/:0.4.4-SNAPSHOT]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
    	... 21 common frames omitted
    

    So the good message is, that the GPU-Device get detectet (Mali-T628 (0GB) - ARM) on Platform 0.
    I don´t know why it detects it twice on Device 0 and Device 1, but i think thats not the problem here.

    The relevant Error is "Error creating bean with name 'OCLChecker': Invocation of init method failed; nested exception is org.jocl.CLException: CL_INVALID_BUILD_OPTIONS".

    Now i don´t know how to handle this and maybe someone could give me an advice. As i understand it @luxe build the miner around the OpenCL-Code he get from "burstdev". Maybe some other people where involved and read this. 🙂





  • @Blago
    Thanks! Any idea how to fix it? Im not familiar with java at all. 🙂



  • @piezo i'm too... need @luxe


  • admin

    Sry, was away for a few days ... @piezo you got pm ... currently i have no idea if we get it working on ARM but thanks @piezo for trying hard.

    Sadly only tthe detections seams to work but OpenCL context could not be created.

    I will try to port OCLChecker code to https://jogamp.org/jocl/www/ they seam to have ARM support. But if you get it running with jocl.org that would be awesome, too.

    Edit: @piezo i do not know how you added the ARM native to the jar ... did you recompile or is it enough to c&p ?! Maybe it would work if we build a jminer with jocl2.0? And you add your natives to that?!

    jminer can be build with maven, just adjust version here https://github.com/de-luxe/burstcoin-jminer/blob/master/pom.xml#L26
    and execute: 'mvn package' in jminer sources dir. I could also do that, if needed.



  • @luxe
    See pm 🙂