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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the SWAN installation package directory.
    cd /path/to/SWAN
  3. Decompress the SWAN installation package.
    tar -zxvf swan4131.tar.gz
  4. Go to the directory generated after the decompression.
    cd swan4131
  5. Modify the platform.pl file.
    1. Open the platform.pl file.
      vi platform.pl
    2. Press i to enter the edit mode and change the content of line 788 to $compiler = "gfortran".

      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. Create a configuration file.
    export CC=`which clang`
    export CXX=`which clang++`
    make config

  7. Load the environment variables.
    export NETCDFROOT=/path/to/NETCDF
  8. Create a swan.exe file.
    make mpi

    Output for the start:

    Output for the end:

  9. Check whether the swan.exe file is generated.
    ll swan.exe