<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi!<br>
      <br>
      (I was contacted about this off-list, but thought it might be
      worth it to document this on-list)<br>
      <br>
      I don't remember ever running into problems while using ACML in my
      numpy installs. However I never ran the whole test-suite, and I
      never used np.einsum (or complex numbers) in my own code. All I
      can tell you is that while using numpy with ACML, I never ran into
      any weird segfaults.<br>
      <br>
      For what it's worth: OpenBLAS has added a lot of AMD-specific 
      (Bulldozer- and Piledriver-specific, to be exact) code after its
      0.2.8 version, which made it slightly faster than ACML on my own
      machines (at least for dgemm, I remember some LAPACK calls were a
      tiny bit slower, but not so much that it bothered me). Since
      numpy-integration of OpenBLAS is significantly better than ACML, I
      don't bother with the latter anymore.<br>
      <br>
      You can download the OpenBLAS 0.2.9rc1 -- which includes the
      Bulldozer/Piledriver code -- from
      <a class="moz-txt-link-freetext" href="https://github.com/xianyi/OpenBLAS/releases/tag/v0.2.9.rc1">https://github.com/xianyi/OpenBLAS/releases/tag/v0.2.9.rc1</a><br>
      <br>
      <br>
      Cheers<br>
      <br>
      <br>
      Thomas<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      On 2014-02-24 20:58, Michael Hughes wrote:<br>
    </div>
    <blockquote
cite="mid:CAEVMZD+X0+Luct2JMBjXrt1dGeM1ehrdSdKq4t9PYPGPNpdpqQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hello,</div>
        <div><br>
        </div>
        <div>I'm trying to build numpy from source to use AMD's ACML for
          matrix multiplication (specifically the multi-threaded
          versions gfortran64_mp). I'm able to successfully compile and
          use a working version of np.dot, but my resulting installation
          doesn't pass numpy's test suite, instead, I get a segfault.
          I'm hoping for some advice on what might be wrong...</div>
        <div><br>
        </div>
        <div>
          <div> I'm on Debian, with a fresh install of Python-2.7.6. To
            install numpy, I've followed exactly the instructions
            previously posted to this list by Thomas Unterthiner. See <a
              moz-do-not-send="true"
href="http://numpy-discussion.10968.n7.nabble.com/numpy-ACML-support-is-kind-of-broken-td35454.html">http://numpy-discussion.10968.n7.nabble.com/numpy-ACML-support-is-kind-of-broken-td35454.html</a>.
            The only thing I've adjusted is to try to use the
            gfortran64_mp version of ACML instead of just gfortran64.</div>
        </div>
        <div><br>
        </div>
        <div>Using those instructions, I can compile numpy-1.8.0 so that
          it successfully uses the desired ACML libraries.  I can
          confirm this by `ldd site-packages/numpy/core/_dotblas.so`,
          which shows that I'm linked to libacml_mp.so as desired.
          Furthermore, some quick timing tests indicate that for a
          1000x1000 matrix X, calls to np.dot(X,X) have similar speeds
          as using custom C code that directly calls the ACML libraries.
          So, dot seems to work as desired.</div>
        <div><br>
        </div>
        <div>However, when I run numpy.test(verbose=4), I find that I
          get a seg fault</div>
        <div>
          <div>```</div>
          <div>test_einsum_sums_cfloat128 (test_einsum.TestEinSum) ...
            Segmentation fault</div>
        </div>
        <div>```</div>
        <div><br>
        </div>
        <div>Any ideas what might be wrong? From my benchmark tests,
          ACML is way faster than MKL or other options on my system, so
          I'd really like to use it, but I don't trust this current
          install.</div>
        <div>
          <br>
        </div>
        <div>Thanks!</div>
        <div>- Mike </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NumPy-Discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/numpy-discussion">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>