Running and Verification
Procedure
- Use PuTTY to log in to the server as the root user.
- Create a test case directory and upload the test case to the directory.
mkdir -p /path/to/SWAN/swan-testcse cd /path/to/SWAN/swan-testcse
- Download the test case and upload it to the directory.
http://swanmodel.sourceforge.net/download/zip/refrac.tar.gz
If the server is connected to the Internet, you are advised to run the wget command to obtain the test case.
wget http://swanmodel.sourceforge.net/download/zip/refrac.tar.gz --no-check-certif icate
- Decompress the test case file.
tar -zxvf refrac.tar.gz
- Go to the directory and create a soft link.
cd refrac ln -s /path/to/SWAN/swan4131/swan.exe ./
- Run the test case.
cp a11refr.swn INPUT mpirun --allow-run-as-root -np 8 swan.exe

time mpirun --allow-run-as-root -np 8 swan.exe
The following figure shows an example of the CPU running time.

- In the preceding command, the -np parameter indicates the total number of processes used in the test. Run the lscpu command and set this parameter based on your requirements.
- The real time (unit: s) in the return result indicates the time. A smaller value indicates higher performance.
Parent topic: SWAN 41.31 Porting Guide (openEuler 20.03)