Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Go to the source package directory.
cd /path/to/pencil-code
- Decompress the installation package.
tar -xvf v2021.02.20.tar.gz mv pencil-code-2021.02.20 pencil-code
- Go to the directory generated after the decompression.
cd pencil-code source sourceme.sh
- 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/
- Set the symbolic link to the original Pencil Code directory.
pc_setupsrc
Information similar to the following is displayed:

- 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
- Perform the compilation.
cd /path/to/data/myuser/myrun pc_build
Parent topic: Pencil Code 2021.02.20 Porting Guide (Kylin V10)