Running and Verifying Code_Saturne on Multiple Nodes
- Use PuTTY to log in to the server as the root user.
- Create a case directory and go to the directory.
cd /path/to/CODE_SATURNE/ mkdir TESTCASE cd TESTCASE
- Run the following command to create a case:
code_saturne create -s test -c case1
In the previous command, test indicates the user-defined study name and case1 indicates the user-defined case name. You can change them based on the actual situation. After this command is run, a test directory is generated in the current directory, and the case1, MESH, and POST directories are generated in the test directory.
- Run the following command to copy the test case file:
cp /path/to/CODE_SATURNE/code_saturne-6.0.2/examples/1-simple_junction/mesh/* test/MESH -rf cp /path/to/CODE_SATURNE/code_saturne-6.0.2/examples/1-simple_junction/case1/setup.xml test/case1/DATA -rf
- Run the following command to set the MPI environment variable:
export CS_MPIEXEC_OPTIONS="--allow-run-as-root --mca btl ^openib"
- Run the following command to initialize the case:
code_saturne run --initialize --param=/path/to/CODE_SATURNE /TESTCASE/test/case1/DATA/setup.xml --case=/path/to/CODE_SATURNE /TESTCASE/test/case1
If the following information is displayed, the initialization is successful:
***************************** Preprocessing calculation *****************************
- Run the following command to create the hostfile file and add node information:
echo -e 'node1\nnode2\n…\nnodex' > /path/to/HOSTFILE
In the previous command, node1, node2, ..., and nodex indicate the host names of the nodes. You can run the hostname command to query the host names. \n indicates a newline character.
- Run the following command to go to the directory of test cases:
cd /path/to/CODE_SATURNE/TESTCASE/test/case1/RESU/year+month+day-hour+minute_round
A log is generated in the RESU directory each time a job is run. The log directory format is YearMonthDay-HourMinute_Sequence number of job executions in the same minute. For example, the 20200330-2104 directory contains the log of the first job execution at 21:04 on March 30, 2020, and the 20200330-2104_1 directory contains the log of the second job execution at 21:04 on March 30, 2020.
- Run the following command to run the test case on multiple nodes:
time mpirun --allow-run-as-root --mca btl ^openib -N 96 -x OMP_NUM_THREADS=1 --hostfile /path/to/HOSTFILE ./cs_solver --mpi
Elapsed time: XX s in the performance.log file indicates the performance. A smaller value indicates a better performance.
Figure 1 shows the command output:
