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

Running and Verification

  • Determine the number of running processes based on the node configuration.
  • If multiple nodes are running, configure the network environment:
    • In the /etc/hosts file, add the IP addresses and host names of the nodes.
    • Enable SSH password-free login between the nodes.
    • Disable the firewall and ensure that clients and servers are not disconnected.

Running and Verification

  1. Use PuTTY to log in to the server as the root user.
  2. Create a working directory and go to it.
    mkdir -p /path/to/WW3_TEST
    cd /path/to/WW3_TEST
  3. Download the test case file and copy it to the /path/to/WW3_TEST directory.
  4. Decompress the file.
    tar -xvf ww3_from_ftp.v6.07.tar.gz
    cd cases
  5. Set the environment variables.
    source /path/to/WAVEWATCH/WW3-6.07.1/env_ww3.sh
    export ww3_dir=/path/to/WAVEWATCH/WW3-6.07.1/model
  6. Modify the mww3_case_01 file.
    1. Open the mww3_case_01 file.
      vi mww3_case_01
    2. Press i to enter the edit mode and modify the mww3_case_01 file.

      Line 61:

      #cd /scratch1/portfolios/NCEPDEV/ocean/noscrub/Henrique.Alves/WW3_CASES/cases

      Line 65:

      #module load intel mpt grads

      Line 72:

      compstr="Gnu"

      Line 143:

      #ww3_dir='echo $case_dir | sed 's/\/cases\/*//g''

      Line 138:

      proc=8

      Line 420:

      mpirun --allow-run-as-root --mca btl ^openib -np $proc --hostfile /path/to/WW3_TEST/cases/hostfile $path_e/ww3_multi

      After performing 6.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.
    4. If you delete --hostfile /path/to/WW3_TEST/cases/hostfile in line 420, only one node is running.

      Set the proc parameter in line 138 based on the number of CPUs. You can also delete -np $proc in line 420 to use the maximum number of cores by default.

    5. If the result of a dual-node test case is similar to that of a single-node test case (run the top command to monitor the second node and no running status is found on the second node), perform the following operations: (Alternative solution)

      Modify line 138 as follows:

      #proc=8

      Modify line 420 as follows:

      mpirun --allow-run-as-root --mca btl ^openib -np 16 -N 8 -x PATH=$PATH -x LD_LIBRARY_PATH=$LD_LIBRARY_PATH $proc --hostfile    /path/to/WW3_TEST/cases/hostfile $path_e/ww3_multi

      The -np parameter indicates the total number of processes, and the -N parameter indicates the number of processes used by each node. Set this parameter based on the server configuration.

  7. Modify the comp.Gnu and link.Gnu files.
    1. Open the comp.Gnu file.

      vi ../WW3-6.07.1/model/bin/comp.Gnu

    2. Press i to enter the edit mode.

      In line 93, change comp=gfortran to comp=flang.

      After performing 7.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.
    4. Open the link.Gnu file.

      vi ../WW3-6.07.1/model/bin/link.Gnu

    5. Press i to enter the edit mode.

      In line 95, change comp=gfortran to comp=flang.

    6. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Create a hostfile file.
    1. Create hostfile.
      vi hostfile
      Node1
      Node2

      Node1 and Node2 are host names.

    2. Press Esc, type :wq!, and press Enter to save the file and exit.
  9. In the window of Node1, run the following command to start the WAVEWATCH III program:
    ./mww3_case_01

    If the information shown in the following figure is displayed when the WAVEWATCH III program is complete, the WAVEWATCH III program completes properly.

    Check the value of Elapsed time (unit: s) in the work_case_01/log.mww3 log file. A smaller value indicates higher performance.

    • Example of the dual-node running result

    • Example of the single-node running result