Tips for installation

Most problems in the installation of OpenMX are caused by the linking of ScaLAPACK and BLACS or its alternative. We would recommend users to link MKL in most cases. 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, ScaLAPACK and BLACS libraries, and FFTW3 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 ScaLAPACK and BLACS libraries under an assumption that the FFT library is installed in /usr/local/fftw3/.


Other combinations of the compiler and ScaLAPACK and BLACS 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 such as
     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)

As for the Intel Math Kernel Library, you may use the folowing website: IntelĀ® Math Kernel Library Link Line Advisor

     https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor
which gives us a suggestion for linking of libraries and compiler options.