我要评分
获取效率
正确性
完整性
易理解

Installing the Software and Configuring the Environment

Procedure

  1. Upload the STREAM installation package STREAM-master.zip to the /home directory on a server.
  2. Use PuTTY to log in to the server as the root user.
  3. Run the following command to decompress the STREAM installation package:
    cd /home
    unzip STREAM-master.zip
  4. Run the following command to go to the STREAM-master directory:
    cd STREAM-master
  5. Run the following commands to modify the Makefile file:
    1. Open the file.
      vi Makefile
    2. Press i to enter the insert mode and edit the Makefile file.
      CC = gcc
      CFLAGS = -O2 -ftree-vectorize -fopenmp -DSTREAM_ARRAY_SIZE=96000000 -DNTIMES=100 -mcmodel=large
      #FC = gfortran
      #FFLAGS = -O3 -fopenmp -mcpu=native -ffp-contract=fast -fopenmp
      all: stream_c.exe
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Run the following command to perform compilation:
    make
    After the compilation is successful, the executable file stream_c.exe is generated in the current directory. You can run the ll command to view the file. Figure 1 shows the command output.
    Figure 1 Compilation result