[SciPy-Dev] Unbundling arpack

Pauli Virtanen pav at iki.fi
Thu May 16 04:37:28 EDT 2013


Jacob Vanderplas <jakevdp <at> cs.washington.edu> writes:
> One potential issue is that there were some small patches required
> for ARPACK that we've made within the version bundled with scipy.
> Since there is no official ARPACK repository anywhere, it's unclear
> whether these bugs have been fixed in the other versions available out
> there.  If you dig into the scipy source, you'll see that because of
> these bugs we actually prepend "scipy" to the ARPACK install to make
> sure that scipy *won't* use the system version if it's available.

We are using almost unmodified arpack-ng, so if the system version is
also that, things should be fine.

I wrote in README.scipy under scipy/sparse/linalg/eigen/arpack/ARPACK:

"""
This directory contains a bundled version of ARPACK-NG 3.1.2,
http://forge.scilab.org/index.php/p/arpack-ng/

NOTE FOR VENDORS: it is in general safe to use a system version of ARPACK
instead. Note, however, that earlier versions of ARPACK and ARPACK-NG had
certain bugs, so using those over the bundled version is not recommended.

The bundled version has the following patches applied:

(i) Replacing calls to certain Fortran functions with wrapper
functions, to avoid various ABI mismatches on OSX. These changes are
made with the following command:

perl -pi -e '
s@\bsdot\b at wsdot@g;
s@\bcdotc\b at wcdotc@g;
s@\bzdotc\b at wzdotc@g;
s@\bcdotu\b at wcdotu@g;
s@\bzdotu\b at wzdotu@g;
s@\bcladiv\b at wcladiv@g;
s@\bzladiv\b at wzladiv@g;
' \
SRC/*.f UTIL/*.f

(ii) Using a UTIL/second_cputime.f which calls the Fortran intrinsic
CPU_TIME function instead of ETIME.
"""

System Qhull is also fine --- however, it must be compiled with
QHpointer enabled. Qhull will abort() on initialization if this is
not the case, so it should be easy to spot this.

However, system SuperLU is *not* fine --- the upstream contains some
crash-bugs that we fixed (and TBH should send the patches to upstream).

Also, more importantly: the SuperLU error reporting mechanism is to
abort on error, which can be overridden at compile time to do something
more sensible. We make use of this, but this is not possible without
bundling SuperLU.

    Pauli





More information about the SciPy-Dev mailing list