Installing OpenBLAS
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following commands to decompress the OpenBLAS installation package:
cd /path/to/OPENBLAS tar -xvf OpenBLAS-0.3.6.tar.gz
- Run the following command to go to the directory generated after decompression:
cd OpenBLAS-0.3.6
- Run the following commands to configure environment variables:
export CC=`which gcc` export CXX=`which g++` export FC=`which gfortran`
- Run the following commands to modify the Makefile.system file:
- Open the Makefile.system file.
vi Makefile.system
- Type :1161 to go to line 1161 and press i to go to the insert mode.
Before the modification:
COMMON_OPT = -O2
After the modification:COMMON_OPT = -O2 -lgfortran
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Makefile.system file.
- Run the following commands to perform the compilation and installation:
mkdir install make -j make PREFIX=/path/to/OPENBLAS/OpenBLAS-0.3.6/install install
- Run the following commands to configure environment variables:
export MATH_ROOT=/path/to/OPENBLAS/OpenBLAS-0.3.6/install
Parent topic: Configuring the Compilation Environment