Rate This Document
Findability
Accuracy
Completeness
Readability

Installing LAPACK

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the LAPACK installation package.
    tar -xvf lapack-3.8.0.tar.gz
  3. Go to the directory generated after the decompression.
    cd lapack-3.8.0
  4. Generate a make.inc file.
    cp make.inc.example make.inc
  5. Edit the make.inc file.
    1. Open the make.inc file.
      vi make.inc
    2. Press i to enter the edit mode and modify the file as follows:

      Modify the content in line 11 to the following:

      CC = clang

      Modify the content in line 22 to the following:

      FORTRAN = flang

      Modify the content in line 30 to the following:

      LOADER = flang

      Modify the content in line 81 to the following:

      libblas.a

      After performing 5.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Edit the INSTALL/second_INT_ETIME.f file.
    1. Open the INSTALL/second_INT_ETIME.f file.
      vi INSTALL/second_INT_ETIME.f
    2. Press i to enter the edit mode and add the following function below line 35 in the second_INT_ETIME.f file.
      REAL Function etime(time)
      REAL time(2)
      Call Cpu_Time(etime)
      time(1) = etime
      time(2) = 0
      End Function

      *Comment out the following lines:

      *REAL        ETIME
      *INTRINSIC   ETIME

      After performing 6.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Edit the INSTALL/dsecnd_INT_ETIME.f file.
    1. Open the INSTALL/dsecnd_INT_ETIME.f file.
      vi INSTALL/dsecnd_INT_ETIME.f
    2. Press i to enter the edit mode and add the following function below line 35 in the dsecnd_INT_ETIME.f file.
      REAL Function etime(time)
      REAL time(2)
      Call Cpu_Time(etime)
      time(1) = etime
      time(2) = 0
      End Function

      *Comment out the following lines:

      *REAL        ETIME
      *INTRINSIC   ETIME

      After performing 7.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Perform the installation.
    make -j
  9. Copy the static library to another directory.
    cp *.a /path/to/EXTRA/mathlib