User Tools

Site Tools


howto:wrf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
howto:wrf [2019/06/18 14:55]
ccrosby [WRF, Parallel NetCDF and I/O Quilting]
howto:wrf [2020/05/21 13:58]
ccrosby [WRF, Parallel NetCDF and I/O Quilting]
Line 1: Line 1:
 ====== Running ARW / WRF at the CHPC ====== ====== Running ARW / WRF at the CHPC ======
 There are several versions of WRF, using different combinations of compiler and MPI implementation,​ installed on the filesystem in ''/​apps/​chpc/​earth/''​. ​ The latest version is WRF-4.1.1, built with the Intel compiler. ​ Tests have indicated a very large benefit from using the Intel compiler and MPI rather than Gnu compiler and OpenMPI or MPICH. ​ MPICH versions need the mpirun argument ''​-iface ib0''​ to force it to use the Infiniband network. ​ Please note that it is essential to set the unlimited stack size for the Intel-compiled version, as done in the script below. ​ To set up an appropriate environment,​ "​source"​ the setWRF file in the required directory with the following type of command: ''​. ​  /​apps/​chpc/​earth/​WRF-3.8-impi/​setWRF''​ .  This command should be placed in the PBS-Pro job submission script. ​ Users need to develop their own workflows, but it is also practical to execute the pre-processing steps ''​geogrid.exe,​ ungrib.exe, metgrid.exe and real.exe''​ in single node mode with an interactive session. ​ Simply give the command ''​qsub -I -q smp -P <​AAAA0000>'',​ where <​AAAA0000>​ should be replaced with **your** project code, to obtain an interactive session. ​ Do not try to run these pre-processing steps from the login shell, as the shared login node cannot sustain a high work load.  The real.exe pre-processing step for large cases may run into memory constraints. ​ In that case, run real.exe in parallel over the requested number of nodes, but with only one process per node, as per the example script. There are several versions of WRF, using different combinations of compiler and MPI implementation,​ installed on the filesystem in ''/​apps/​chpc/​earth/''​. ​ The latest version is WRF-4.1.1, built with the Intel compiler. ​ Tests have indicated a very large benefit from using the Intel compiler and MPI rather than Gnu compiler and OpenMPI or MPICH. ​ MPICH versions need the mpirun argument ''​-iface ib0''​ to force it to use the Infiniband network. ​ Please note that it is essential to set the unlimited stack size for the Intel-compiled version, as done in the script below. ​ To set up an appropriate environment,​ "​source"​ the setWRF file in the required directory with the following type of command: ''​. ​  /​apps/​chpc/​earth/​WRF-3.8-impi/​setWRF''​ .  This command should be placed in the PBS-Pro job submission script. ​ Users need to develop their own workflows, but it is also practical to execute the pre-processing steps ''​geogrid.exe,​ ungrib.exe, metgrid.exe and real.exe''​ in single node mode with an interactive session. ​ Simply give the command ''​qsub -I -q smp -P <​AAAA0000>'',​ where <​AAAA0000>​ should be replaced with **your** project code, to obtain an interactive session. ​ Do not try to run these pre-processing steps from the login shell, as the shared login node cannot sustain a high work load.  The real.exe pre-processing step for large cases may run into memory constraints. ​ In that case, run real.exe in parallel over the requested number of nodes, but with only one process per node, as per the example script.
 +
 +====== Warning: mpirun parameters changed ======
 +
 +It has been necessary to change some of our MPI installations. ​ The reason for this is that these installations were compiled without support for the PBS scheduler, which could result in orphaned processes left on the cluster if a job failed for any reason. ​ The revised MPI installations keep all MPI ranks under full control of PBS, which means that they should be cleaned up properly in the event of a job failure. ​ However, uers may now experience an incompatibility with the mpirun command. ​ A typical error message may look like this: 
 +
 +''​HYDT_bsci_init (tools/​bootstrap/​src/​bsci_init.c:​175):​ unrecognized RMK: user''​
 +
 +**The simple solution to this error is to remove the ''​-machinefile $PBS_NODEFILE''​ parameter to the mpirun command.**
 +
 +
  
 ==== OpenMP ==== ==== OpenMP ====
Line 86: Line 96:
 # Run wrf.exe with the full number of processes # Run wrf.exe with the full number of processes
 exe=$WRFDIR/​WRF/​run/​wrf.exe exe=$WRFDIR/​WRF/​run/​wrf.exe
-mpirun -np $nproc ​-machinefile $PBS_NODEFILE ​$exe &> wrf.out+mpirun -np $nproc $exe &> wrf.out
 </​file>​ </​file>​
  
Line 121: Line 131:
 ## For this example, assume that nproc_x=8, nproc_y=28, nio_tasks_per_group=4 and nio_groups=4,​ for a total ## For this example, assume that nproc_x=8, nproc_y=28, nio_tasks_per_group=4 and nio_groups=4,​ for a total
 ## of 16 I/O processes and 228 solver processes, therefore 240 MPI processes in total. ## of 16 I/O processes and 228 solver processes, therefore 240 MPI processes in total.
-mpirun -np 240 -machinefile $PBS_NODEFILE ​$exe &> wrf.out+mpirun -np 240  $exe &> wrf.out
 </​file>​ </​file>​
  
Line 150: Line 160:
 ### Issue the command line, passing the number of OpenMP threads. ### Issue the command line, passing the number of OpenMP threads.
 ### These affinity settings work OK, but may be unnecessary. YMMV. ### These affinity settings work OK, but may be unnecessary. YMMV.
-time mpirun ​-machinefile $PBS_NODEFILE ​-np $nproc -genv OMP_NUM_THREADS 4 -genv KMP_AFFINITY "​verbose,​granularity=core,​compact,​0,​1"​ -bind-to socket -map-by socket wrf.exe > runWRF.out+time mpirun -np $nproc -genv OMP_NUM_THREADS 4 -genv KMP_AFFINITY "​verbose,​granularity=core,​compact,​0,​1"​ -bind-to socket -map-by socket wrf.exe > runWRF.out
 </​file>​ </​file>​
  
/var/www/wiki/data/pages/howto/wrf.txt · Last modified: 2020/06/30 09:09 by ccrosby