How to Resolve ARPACK issues with Intel MKL 11.0 Update 3

Some ARPACK users have reported stability issues after upgrading to the Intel® Math Kernel Library (Intel® MKL) 11.0 Update 3 release. See examples here and here.

The problem lies in ARPACK's using the DLACPY routine to copy arrays where the source and destination overlap. It caused no problem when DLACPY was implemented as a serial operation. Intel MKL 11.0 Update 3 introduces a multithreaded implementation for DLACPY, which manifests the issue of copying overlapped arrays. Note that FORTRAN standard enforces that array arguments passed to a routine to be non-aliased. MKL's threaded DLACPY is taking advantages of this specification, and therefore it is a valid implementation. We have contacted the ARPACK developers and made them aware of this issue. Meanwhile, in order to continue to provide compatibility with the existing ARPACK implementation, we will fully resolve this problem in our next release (Intel MKL 11.0 Update 4).

This article describes two ways ARPACK users can fix the problem on their own before the Intel MKL 11.0 Update 4 release.

  • Users can choose to use the default DLACPY implementation included in the ARPACK source, while still using MKL 11.0 Update 3 for other LAPACK functions.Follow these steps:
  1. Compile the default dlacpy.f source from the LAPACK directory in the ARPACK source. For example:

        ifort -c dlacpy.f
  2. Modify the ARmake.inc file by adding the dlacpy.o object file produced in the previous step to the link line and make it linked before MKL libraries being linked. For example, suppose you have defined LAPACKLIB to include MKL libraries, then you modify it on the line below the definition with

        LAPACKLIB = dlacpy.o $LAPACKLIB
  3. Rebuild ARPACK.
  • Users can also choose to modify the ARPACK source code to avoid using DLACPY on overlapped arrays. For example, replace the DLACPY with a loop copying element-by-element. This requires a patch to the ARPACK source. We have prepared such a patch ready to be used. See the download link at the end of this article. Then, follow these steps:
  1. Download and save the patch file, arpack_patch.txt.
  2. Patch the ARPACK source. Execute this command inside the top level directory of ARPACK source tree:

        patch -p1 <arpack_patch.txt
  3. After the patch is successfully applied, rebuild ARPACK.

If there are any questions, please leave comments to this article.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.
Etiquetas: