Installing LAPACK
Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the LAPACK installation package.
tar -xvf lapack-3.8.0.tar.gz
- Go to the directory generated after the decompression.
cd lapack-3.8.0
- Generate a make.inc file.
cp make.inc.example make.inc
- Edit the make.inc file.
- Open the make.inc file.
vi make.inc
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the make.inc file.
- Edit the INSTALL/second_INT_ETIME.f file.
- Open the INSTALL/second_INT_ETIME.f file.
vi INSTALL/second_INT_ETIME.f
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the INSTALL/second_INT_ETIME.f file.
- Edit the INSTALL/dsecnd_INT_ETIME.f file.
- Open the INSTALL/dsecnd_INT_ETIME.f file.
vi INSTALL/dsecnd_INT_ETIME.f
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the INSTALL/dsecnd_INT_ETIME.f file.
- Perform the installation.
make -j
- Copy the static library to another directory.
cp *.a /path/to/EXTRA/mathlib
Parent topic: Configuring the Compilation Environment
