<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 30, 2019 at 6:32 PM Ralf Gommers <<a href="mailto:ralf.gommers@gmail.com">ralf.gommers@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 30, 2019 at 5:19 PM Charles R Harris <<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 30, 2019 at 5:28 PM Marc F Paterno <<a href="mailto:paterno@fnal.gov" target="_blank">paterno@fnal.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I have encountered a problem with a binary incompatibility between the Fortran runtime library installed with numpy when using 'pip install --user numpy', and that used by the rest of my program, which is built using gfortran from GCC 8.2.  The numpy installation uses libgfortran.5.dylib, and GCC 8.2 provides libgfortran.5.dylib.<br>
<br>
While investigating the source of this problem, I downloaded the numpy source<br>
(<a href="https://files.pythonhosted.org/packages/04/b6/d7faa70a3e3eac39f943cc6a6a64ce378259677de516bd899dd9eb8f9b32/numpy-1.16.0.zip" rel="noreferrer" target="_blank">https://files.pythonhosted.org/packages/04/b6/d7faa70a3e3eac39f943cc6a6a64ce378259677de516bd899dd9eb8f9b32/numpy-1.16.0.zip</a>),<br>
and tried building it. The resulting libraries have no coupling to any Fortran library that I can find.  I can find no Fortran source code files in the numpy source,<br>
except in tests or documentation.<br>
<br>
I am working on a MacBook laptop, running macOS Mojave, and so am using the Accelerate framework to supply BLAS.<br>
<br>
I do not understand why the pip installation of numpy includes a Fortran runtime library. Can someone explain to me what I am missing?<br>
<br></blockquote><div><br></div><div>That's interesting, it looks like the wheel includes four libraries:</div><div><br></div><div><font face="monospace, monospace">-rw-r--r--. 1 charris charris   273072 Jan  1  1980 libgcc_s.1.dylib</font></div><div><font face="monospace, monospace">-rwxr-xr-x. 1 charris charris  1550456 Jan  1  1980 libgfortran.3.dylib</font></div><div><font face="monospace, monospace">-rwxr-xr-x. 1 charris charris 63433364 Jan  1  1980 libopenblasp-r0.3.5.dev.dylib</font></div><div><font face="monospace, monospace">-rwxr-xr-x. 1 charris charris   279932 Jan  1  1980 libquadmath.0.dylib</font></div><div> </div><div>I thought we only needed the openblas, but that in turn probably depends on libgcc. But why we have the fortran library and quadmath escapes me. Perhaps someone else knows.</div></div></div></div></blockquote><div><br></div><div>I suspect it's a leftover from when we were using ATLAS, we did need a Fortran runtime library at some point. The cause will be somewhere in the numpy-wheel build scripts, there is a gfortran-install git submodule: <a href="https://github.com/MacPython/numpy-wheels" target="_blank">https://github.com/MacPython/numpy-wheels</a></div><div></div></div></div></div></blockquote><div><br></div><div>And fortran is probably why the quadmath is there. Hmm, if we fix it we will need to test it...</div><div><br></div><div>Chuck </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Note that compiling from source is different and will generally use different libraries. We don't use Accelerate because it is buggy, not thread safe, and it appears Apple is not interested in doing anything about that.</div><div><br></div><div>Chuck</div></div></div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>