title: Spark netlib-java BLAS
body: <p>i am trying to troubleshoot my non-working apache spark and netlib setup and i don't know what to do next.</p>
  
  <p>Here some info:</p>
  
  <ul>
  <li>Spark 1.3.1 (but also tried 1.5.1)</li>
  <li>Mesos Cluster with 3 Nodes</li>
  <li><p>Ubuntu Trusty on every node and installed following BLAS package</p>
  
  <pre><code>$ dpkg -l | grep 'blas\|atlas\|lapack'
  ii  libopenblas-base                    0.2.8-6ubuntu1                   amd64        Optimized BLAS (linear algebra) library based on GotoBLAS2
  
  $ update-alternatives --get-selections | grep 'blas\|lapack'
  libblas.so.3                   auto     /usr/lib/openblas-base/libblas.so.3
  </code></pre></li>
  </ul>
  
  <p>I have built a sample jar for testing if <a href="https://github.com/fommil/netlib-java" rel="noreferrer">netlib-java</a> can detect this libraries, with following code:</p>
  
  <pre><code>object Main extends App {
    println(com.github.fommil.netlib.BLAS.getInstance().getClass().getName())
    println(com.github.fommil.netlib.LAPACK.getInstance().getClass().getName())
  }
  </code></pre>
  
  <p>When i execute this code i get following response:</p>
  
  <pre><code>$ java -jar artifacts/BLAStest-assembly-1.0.jar
  Mar 29, 2016 3:43:33 PM com.github.fommil.netlib.BLAS &lt;clinit&gt;
  WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
  Mar 29, 2016 3:43:33 PM com.github.fommil.jni.JniLoader liberalLoad
  INFO: successfully loaded /tmp/jniloader6790966128222263615netlib-native_ref-linux-x86_64.so
  com.github.fommil.netlib.NativeRefBLAS
  Mar 29, 2016 3:43:33 PM com.github.fommil.netlib.LAPACK &lt;clinit&gt;
  WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemLAPACK
  Mar 29, 2016 3:43:33 PM com.github.fommil.jni.JniLoader load
  INFO: already loaded netlib-native_ref-linux-x86_64.so
  com.github.fommil.netlib.NativeRefLAPACK
  </code></pre>
  
  <p>So it seems to work just fine here. 
  But spark can't detect the libraries. I have added this java dependency to my assembly jar</p>
  
  <pre><code>com.github.fommil.netlib:all:1.1.2
  </code></pre>
  
  <p>also if i try to start a spark shell with this package it doesn't work.</p>
  
  <pre><code>spark-shell --packages com.github.fommil.netlib:all:1.1.2
  </code></pre>