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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the source package directory.
    cd /path/to/pencil-code
  3. Decompress the installation package.
    tar -xvf v2021.02.20.tar.gz
    mv pencil-code-2021.02.20 pencil-code
  4. Go to the directory generated after the decompression.
    cd pencil-code
    source sourceme.sh
  5. Create a run directory and copy the configuration file.
    cd ..
    mkdir -p data/myuser/myrun/src
    cd data/myuser/myrun
    cp $PENCIL_HOME/samples/1d-tests/jeans-x/*.in ./
    cp $PENCIL_HOME/samples/1d-tests/jeans-x/src/*.local src/
  6. Set the symbolic link to the original Pencil Code directory.
    pc_setupsrc

    Information similar to the following is displayed:

  7. Modify the configuration file.
    cd $PENCIL_HOME/config/compilers/separate/
    sed -i 's/gcc/clang/g' GNU-gcc.conf
    sed -i 's/gfortran/flang/g' GNU-gfortran.conf
  8. Perform the compilation.
    cd /path/to/data/myuser/myrun
    pc_build