Tips for installation

Most problems in installation of OpenMX are caused by the linking of LAPACK and BLAS or its alternative. We would recommend users to link ACML and MKL in most cases, while ACML seems to be slightly better than MKL with respect to computational speed and numerical stability. Examples on how to link them can be found in 'makefile' in the directory 'source'.

Also, we provide a couple of tips for the installation on popular platforms below. OpenMX requires C and FORTRAN compilers, LAPACK and BLAS libraries, and FFT library. In addition, as the C compiler is used for linking, the corresponding FORTRAN library of the compiler should be explicitly specified. Here we provide some sample settings for installation on platforms with several popular compilers and LAPACK and BLAS libraries, with the assumption that the FFT library is installed in /usr/local/fftw3/.

Other combinations of the compiler and LAPACK and BLAS libraries can be done in the same fashion. The following commands can be used to show information about the compiler (Intel, PGI, GNU, etc.) used by MPI.

      %mpicc -compile-info (with MPICH)
      %mpicc -help  (with OpenMPI) 
   
In some cases, the location of the FORTRAN library is unknown to the C compiler, resulting in the following link errors:
      /usr/bin/ld: cannot find -lifcore

with the Intel compiler,
      /usr/bin/ld: cannot find -lpgf90

with the PGI compiler, or
     -lpgf90_rpm1, -lpgf902, -lpgf90rtl, -lpgftnrtl

as the "-pgf90libs" flag is just a shortcut for them,
      /usr/bin/ld: cannot find -lgfortran

with the GNU compiler.

To solve this link-time problem, the location of the FORTRAN library must be explicitly specified as follows. First, the location of the FORTRAN compiler can be identified with the following commands.

      %which ifort (with the Intel compiler)
      /opt/intel/fce/10.0.026/bin/ifort

      %which pgf90 (with the PGI compiler)
      /opt/pgi/linux86-64/7.0/bin/pgf90

      %which gfortran (with the GNU compiler)
      /usr/bin/gfortran

Then, the location of the FORTRAN library usually resides in /lib of the parent folder of /bin, and must be specified in LIB.
     LIB= ... -L/opt/intel/fce/10.0.026/lib -lifcore (with the Intel compiler)
     LIB= ... -L/opt/pgi/linux86-64/7.0/lib -pgf90libs (with the PGI compiler)
     LIB= ... -L/usr/lib -lgfortran (with the GNU compiler)

2016-04-03