Hello Andy, Thanks for the pointer. Based on some trial and error experimentation, I tried my luck as described below. I think I made some good progress, however, I'm currently stuck at step 6) and 7). Do you see some (obvious) mistake I made?
A second question: Wouldn't it make sense to provide a non-viennacl variant as a fall-back for environments currently unsupported? Thanks and regards, Sebastian What I did: 1) installed viennacl brew install viennacl 2) installed gcc brew install gcc --without-multilib 3) modified pom.xml changed: <argument>linux-x86_64-viennacl.properties</argument> to: <argument>macosx-x86_64.properties</argument> [see https://github.com/apache/mahout/blob/master/viennacl/pom.xml#L142] 4) created macosx-x86_64.properties: platform=macosx-x86_64 platform.path.separator=: platform.source.suffix=.cpp platform.includepath.prefix=-I platform.includepath=/usr/local/include/viennacl platform.compiler=gcc-7 platform.compiler.cpp11=-std=c++11 platform.compiler.default= platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.viennacl=-fopenmp -fpermissive platform.compiler.nodeprecated=-Wno-deprecated-declarations platform.compiler.output=-Wl,-rpath,$ORIGIN/ -march=x86-64 -m64 -Wall -Ofast -fPIC -dynamiclib -undefined dynamic_lookup -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= platform.link.prefix=-framework\u0020 platform.link.suffix= platform.link= platform.frameworkpath.prefix=-F platform.framework.prefix=-framework\u0020 platform.framework.suffix= platform.framework= platform.library.prefix=lib platform.library.suffix=.dylib 5) install (finishes successfully; some warning occur) cd $MAHOUT_HOME mvn clean install -DskipTests cd viennacl/ mvn clean install -DskipTests mvn test ########### Warnings during install ############## ... [WARNING] [...]/mahout/viennacl/src/main/scala/org/apache/mahout/viennacl/opencl/GPUMMul.scala:48: warning: match may not be exhaustive. [WARNING] It would fail on the following inputs: (JVMMEM, NETLIB_BLAS), (NETLIB_BLAS, JVMMEM), (NETLIB_BLAS, NETLIB_BLAS) [WARNING] val alg: MMulAlg = backs match { [WARNING] ^ [WARNING] one warning found ... Warning: Could not load platform properties for class org.apache.mahout.viennacl.opencl.GPUMMul Warning: Could not load platform properties for class org.apache.mahout.viennacl.opencl.GPUMMul$ ... 6) test mvn test ... [INFO] --- scalatest-maven-plugin:1.0:test (test) @ mahout-native-viennacl_2.10 --- Discovery starting. Discovery completed in 392 milliseconds. Run starting. Expected test count is: 7 ViennaCLSuiteVCL: # # A fatal error has been detected by the Java Runtime Environment: # # SIGILL (0x4) at pc=0x00007fff9a6e0e97, pid=43071, tid=0x0000000000001b03 # # JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode bsd-amd64 compressed oops) # Problematic frame: # C [libsystem_trace.dylib+0x3e97] _os_trace_image_was_unloaded+0x10f # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # [...]/mahout/viennacl/hs_err_pid43071.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # /bin/sh: line 1: 43071 Abort trap: 6 java -Dbasedir=[...]/mahout/viennacl -Xmx4g org.scalatest.tools.Runner -R '[...]/mahout/viennacl/target/classes [...]/mahout/viennacl/target/test-classes' -o -fWDF [...]/mahout/viennacl/target/scalatest-reports/TestSuite.txt -u [...]/mahout/viennacl/target/scalatest-reports/. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ 7) same error as for 6) when trying out the example from https://issues.apache.org/jira/browse/MAHOUT-1946 From: Andrew Palumbo <[email protected]> To: "[email protected]" <[email protected]> Date: 10/05/2017 00:45 Subject: Re: UnsatisfiedLinkError: jniViennaCL Hello Sebsastian, > - macOS Sierra 10.12.4 (MacBook Pro, Retina, 13-inch, Early 2015) The native code in the javacpp modules does not have a build profile for MacOS. We do currently have a jira open for this: https://issues.apache.org/jira/browse/MAHOUT-1908 the fix build for mac should be relativly simple, the issue is with CLANG (OR LLVM) on mac not containing OpenMP you can get around this by working woth gcc6. I had it almost finished at one point, but other things took priority.. the properties files are right here: https://github.com/apache/mahout/tree/master/viennacl If you'd like to take a shot at creating and a mac-os.properties file it would be great, you the mac property file would just have to be swapped out here: https://github.com/apache/mahout/blob/master/viennacl/pom.xml#L142 <https://github.com/apache/mahout/blob/master/viennacl/pom.xml#L142>and the project rebuilt. Thanks, Andy ________________________________ From: Sebastian Lehrig <[email protected]> Sent: Tuesday, May 9, 2017 9:54:05 AM To: [email protected] Subject: UnsatisfiedLinkError: jniViennaCL Hi, After installing the newest mahout release (13.0.0), I'm getting exactly this issue: https://issues.apache.org/jira/browse/MAHOUT-1946 How to fix that? Some details about my setup: - mahout 0.13.0 - spark 1.6.3 (spark-1.6.3-bin-hadoop2.6 package) - java version "1.8.0_121" - scala version 2.10.5 - macOS Sierra 10.12.4 (MacBook Pro, Retina, 13-inch, Early 2015) - graphics card: Intel Iris Graphics 6100 1536 MB Thanks and regards, Sebastian
