Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1131097%22%20slang%3D%22en-US%22%3ERun%20WRF%20v4%20on%20Azure%20HPC%20Virtual%20Machines%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1131097%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20weather%20research%20and%20forecasting%20(%3CA%20href%3D%22https%3A%2F%2Fwww.mmm.ucar.edu%2Fweather-research-and-forecasting-model%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWRF%3C%2FA%3E)%20model%20is%20popular%20in%20high%20performance%20computing%20(HPC)%20code%20used%20by%20the%20weather%20and%20climate%20community.%20WRF%20v4%20typically%20performs%20well%20on%20traditional%20HPC%20architectures%20that%20support%20high%20floating-point%20processing%2C%20high%20memory%20bandwidth%2C%20and%20a%20low-latency%20network%E2%80%94for%20example%2C%20%3CA%20href%3D%22http%3A%2F%2Fwww.top500.org%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Etop500%3C%2FA%3E%20supercomputers.%20Now%20you%20can%20find%20all%20these%20characteristics%20on%20the%20new%20HBv2%20Azure%20Virtual%20Machines%20(VMs)%20for%20HPC.%20With%20some%20minor%20tuning%2C%20large%20WRF%20v4%20models%20perform%20very%20well%20on%20Azure.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wrf_us_carib_000.jpg%22%20style%3D%22width%3A%20640px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167492iA82C5C3D8E9A457D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_us_carib_000.jpg%22%20alt%3D%22wrf_us_carib_000.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWRF%20is%20a%20mesoscale%20numerical%20weather%20prediction%20system%20designed%20for%20both%20atmospheric%20research%20and%20operation%20forecasting%20applications.%20WRF%20has%20a%20large%20worldwide%20community%20of%20registered%20users%E2%80%94more%20than%2048%2C000%20in%20over%20160%20countries).%20%3CBR%20%2F%3EIn%20the%20past%2C%20you%20needed%20a%20supercomputer%20to%20run%20WRF%20models%20if%20you%20wanted%20to%20complete%20high-resolution%20weather%20predictions%20in%20a%20reasonable%20and%20practical%20timeframe.%20In%20this%20post%2C%20we%20explore%20building%20WRF%20v4%20models%20on%20Azure.%20We%20ran%20performance%20tests%20to%20compare%20the%20VMs%20optimized%20for%20HPC%20workloads%E2%80%94that%20is%2C%20the%20HB-series%2C%20HC-series%2C%20and%20HBv2.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1085364011%22%20id%3D%22toc-hId-1085364011%22%3EBuilding%20WRF%20v4%20on%20Azure%3C%2FH3%3E%0A%3CP%3EAutomated%20scripts%20for%20building%20different%20variations%20of%20WRF%20v4%2C%20targeting%20Azure%20HPC%20VMs%2C%20are%20contained%20in%20the%20Azure%20HPC%20git%20repository%3A%3C%2FP%3E%0A%3CPRE%3Egit%20clone%20git%40github.com%3AAzure%2Fazurehpc.git%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3BWe%20use%20%3CA%20href%3D%22https%3A%2F%2Fspack.readthedocs.io%2Fen%2Flatest%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESpack%3C%2FA%3E%20to%20build%20WRF%E2%80%99s%20dependencies.%20See%20the%20apps%2Fspack%20and%20apps%2Fwrf%20directories%20for%20details.%20All%20WRF%20performance%20data%20were%20generated%20using%20the%20version%20built%20with%20Open%20MPI%20v4.0.2.%20The%20hybrid%20parallel%20(MPI%20%2B%20Open%20MP)%20and%20the%20MPI-only%20version%20were%20used.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--722090452%22%20id%3D%22toc-hId--722090452%22%3EWRF%20v4%20benchmark%20models%3C%2FH3%3E%0A%3CP%3EWRF%20v3%20models%20typically%20are%20not%20compatible%20with%20WRF%20v4.%20For%20example%2C%20the%20WRF%20v3%20%3CA%20href%3D%22https%3A%2F%2Fwww2.mmm.ucar.edu%2Fwrf%2FWG2%2Fbenchv3%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECONUS%20bench%20models%3C%2FA%3E%20(2.5%20km%20and%2012%20km)%20are%20no%20longer%20supported%20and%20are%20not%20compatible%20with%20WRF%20v4.%20For%20our%20tests%2C%20a%20new%20CONUS%202.5%20km%20model%20(very%20similar%20to%20the%20original%20WRF%20v3%20CONUS%202.5%20km%20model)%20and%20a%20larger%20model%2C%20Hurricane%20Maria%201%20km%2C%20were%20generated%20using%20the%20WRF%20preprocessing%20system%20(WPS).%20See%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazurehpc%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eazurehpc%3C%2FA%3E%20git%20repository%20for%20details%20on%20building%20and%20installing%20WPS%20v4%20and%20the%20steps%20we%20followed%20to%20generate%20these%20models%20for%20W%3C%2FP%3E%0A%3CP%3ERF%20v4.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%20100%25%3B%20height%3A%20117px%3B%20border-collapse%3A%20collapse%3B%22%20border%3D%221%22%3E%0A%3CTBODY%3E%0A%3CTR%20style%3D%22background-color%3A%20green%3B%22%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3EModel%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3EResolution%20km%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3Ee_we%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3Ee_sn%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3Ee_vert%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3ETotal%20gridpoints%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3ETimstep%20(s)%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2057px%3B%22%3E%3CSTRONG%3ESimulation%20hours%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22height%3A%2030px%3B%22%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3Enew_conus2.5km%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E2.5%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E1901%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E1301%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E35%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E87M%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E15%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E3%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22height%3A%2030px%3B%22%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E%0A%3CP%3Emaria1km%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E1%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E3665%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E2894%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E35%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E371M%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E%0A%3CP%3E3%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20style%3D%22width%3A%2012.5%25%3B%20height%3A%2030px%3B%22%3E%0A%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1765422381%22%20id%3D%22toc-hId-1765422381%22%3EWRF%20v4%20performance%20comparison%20on%20HB-series%2C%20HC-series%2C%20and%20HVv2%20VMs%3C%2FH3%3E%0A%3CP%3EThis%20benchmark%20compares%20the%20performance%20of%20WRF%20v4%20on%20HB-series%2C%20HC-series%2C%20and%20HVv2%20VMs.%20No%20performance%20tuning%20was%20applied.%20The%20MPI-only%20version%20of%20WRF%20v4%20was%20used%2C%20and%20all%20cores%20on%20each%20HPC%20VM%20type%20were%20used.%20We%20were%20primarily%20interested%20in%20comparing%20the%20performance%20of%20these%20VM%20types%20on%20a%20per-node%20basis.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wrf_blog_fig1.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171097iCA7CDB4AD3AE3083%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig1.jpg%22%20alt%3D%22Figure%201.%20%20WRF%20v4%20performance%20comparison%20of%20HBv2%2C%20HB%2C%20and%20HC%20VMs%20running%20the%20new_conus2.5km%20case.%20Performance%20on%20HBv2%20VMs%20is%20twice%20that%20of%20HB%20and%20HC%20VMs%20for%20some%20cases.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%201.%20%20WRF%20v4%20performance%20comparison%20of%20HBv2%2C%20HB%2C%20and%20HC%20VMs%20running%20the%20new_conus2.5km%20case.%20Performance%20on%20HBv2%20VMs%20is%20twice%20that%20of%20HB%20and%20HC%20VMs%20for%20some%20cases.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wrf_blog_fig2.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171098iF971B19BD68A2F16%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig2.jpg%22%20alt%3D%22Figure%202.%20WRF%20v4%20parallel%20scaling%20on%20HBv2%2C%20HB%2C%20and%20HC%20VMs%20(log%20simulation%20speed).%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%202.%20WRF%20v4%20parallel%20scaling%20on%20HBv2%2C%20HB%2C%20and%20HC%20VMs%20(log%20simulation%20speed).%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--42032082%22%20id%3D%22toc-hId--42032082%22%3ETuning%20WRF%20v4%20on%20Azure%20HBv2%20VMs%3C%2FH3%3E%0A%3CP%3EThe%20following%20tuning%20optimization%20were%20investigated%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EComparing%20the%20WRF%20v4%20hybrid%20parallel%20version%20(MPI%20%2B%20Open%20MP)%20versus%20MPI-only.%3C%2FLI%3E%0A%3CLI%3EAdjusting%20the%20optimal%20process%20and%20thread%20layout%20and%20number%20per%20node%20(to%20optimize%20memory%20bandwidth).%3C%2FLI%3E%0A%3CLI%3EAdjusting%20the%20number%20of%20tiles%20available%20for%20parallel%20threads%20to%20work%20on%20(L3%20cache%20and%20NUMA%20domain%20optimization).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22wrf_blog_fig3.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171108iAFAA47B6AA29536C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig3.jpg%22%20alt%3D%22Figure%203.%20Tuning%20WRF%20v4%20can%20improve%20performance%20by%20approximately%2030%20percent%20(in%20this%20case).%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%203.%20Tuning%20WRF%20v4%20can%20improve%20performance%20by%20approximately%2030%20percent%20(in%20this%20case).%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1849486545%22%20id%3D%22toc-hId--1849486545%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wrf_blog_fig4.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171110i71A9D89A45AD0FD0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig4.jpg%22%20alt%3D%22Figure%204.%20%20For%20the%20Hurricane%20Maria%20model%2C%20the%20tuned%20hybrid%20parallel%20(MPI%2BOpenMP)%20version%20of%20WRF%20performed%20better%20on%20HBv2%20VMs%20compared%20to%20the%20MPI-only%20version%20up%20to%20128%20nodes.%20When%20each%20process%20has%20enough%20work%2C%20we%20can%20split%20the%20patches%20into%20tiles%2C%20and%20parallel%20threads%20can%20work%20on%20the%20tiles%20(to%20optimize%20data%20usage%20in%20the%20L3%20cache%20and%20HBv2%20NUMA%20domains).%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%204.%20%20For%20the%20Hurricane%20Maria%20model%2C%20the%20tuned%20hybrid%20parallel%20(MPI%2BOpenMP)%20version%20of%20WRF%20performed%20better%20on%20HBv2%20VMs%20compared%20to%20the%20MPI-only%20version%20up%20to%20128%20nodes.%20When%20each%20process%20has%20enough%20work%2C%20we%20can%20split%20the%20patches%20into%20tiles%2C%20and%20parallel%20threads%20can%20work%20on%20the%20tiles%20(to%20optimize%20data%20usage%20in%20the%20L3%20cache%20and%20HBv2%20NUMA%20domains).%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-638026288%22%20id%3D%22toc-hId-638026288%22%3EWRF%20v4%20parallel%20scaling%20on%20HBv2%3C%2FH3%3E%0A%3CP%3EWe%20applied%20performance%20optimizations%20to%20WRF%20v4%20running%20a%20large%20Hurricane%20Maria%201km%20model%20on%20HBv2%20VMs.%20We%20wanted%20to%20see%20how%20well%20the%20large%20Hurricane%20Maria%201km%20model%20would%20scale%20on%20this%20VM%20type.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22wrf_blog_fig5.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171111i2A20599CAF1DA100%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig5.jpg%22%20alt%3D%22Figure%205.%20WRF%20v4%20parallel%20scaling%20on%20HBv2%20(log%20scale).%20WRF%20v4%20running%20the%20maria1km%20case%20had%20a%20parallel%20efficiency%20of%20about%2080%20percent%20on%20512%20HBv2%20nodes.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%205.%20WRF%20v4%20parallel%20scaling%20on%20HBv2%20(log%20scale).%20WRF%20v4%20running%20the%20maria1km%20case%20had%20a%20parallel%20efficiency%20of%20about%2080%20percent%20on%20512%20HBv2%20nodes.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22wrf_blog_fig6.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171112i3B8A7B613B53AD1D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22wrf_blog_fig6.jpg%22%20alt%3D%22Figure%206.%20WRF%20v4%20parallel%20performance%20running%20the%20large%20Hurricane%20Maria%201km%20case%20on%20Azure%20HBv2%20VMs.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFigure%206.%20WRF%20v4%20parallel%20performance%20running%20the%20large%20Hurricane%20Maria%201km%20case%20on%20Azure%20HBv2%20VMs.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1169428175%22%20id%3D%22toc-hId--1169428175%22%3ESummary%3C%2FH3%3E%0A%3CP%3EThe%20new%20HBv2%20VMs%20have%20the%20performance%20you%20need%20to%20run%20large%20WRF%20v4%20models%2C%20and%20only%20minor%20tuning%20is%20needed.%20To%20summarize%20the%20our%20test%20results%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERunning%20the%20new_conus2.5km%20benchmark%20demonstrated%20good%20scaling%20on%20HBv2%2C%20HB-series%2C%20and%20HC-series%20VMs%20and%20showed%20that%20HBv2%20can%20run%20WRF%20v4%20two%20times%20faster%20than%20the%20HB%20and%20HC%20VMs%20(Figures%201%20and%202).%3C%2FLI%3E%0A%3CLI%3EWRF%20v4%20performance%20improves%20considerably%20on%20HBv2%20VMs%E2%80%94by%20about%2030%20percent%E2%80%94when%20you%20carefully%20lay%20out%20processes%20and%20threads%20and%20optimize%20the%20HBv2%20NUMA%20domains%2C%20memory%20bandwidth%20and%20L3%20cache%20(Figure%203).%20In%20the%20case%20of%20maria1km%2C%20hybrid%20parallel%20WRF%20is%20only%20effective%20with%20up%20to%20128%20nodes%20(Figure%204)%20when%20there%20is%20enough%20work%20per%20processor%20to%20divide%20each%20patch%20into%20tiles%20that%20the%20Open%20MP%20threads%20can%20work%20on.%20This%20technique%20keeps%20more%20data%20in%20L3%20cache%2C%20and%20we%20see%20improved%20performance.%20A%20smaller%20number%20of%20nodes%20performs%20better%20with%20a%20higher%20tile%20count%2C%20and%20larger%20node%20counts%20perform%20better%20with%20a%20smaller%20tile%20count.%20Typically%2C%20when%20you%20find%20the%20optimal%20number%20of%20tiles%20for%20a%20particular%20number%20of%20nodes%2C%20the%20number%20of%20tiles%20is%20halved%20each%20time%20you%20double%20the%20number%20of%20nodes%20to%20achieve%20the%20best%20performance.%20In%20the%20maria1km%20case%2C%20when%20more%20than%20128%20nodes%20were%20used%2C%20hybrid%20parallel%20WRF%20did%20not%20help.%20It%20was%20best%20to%20use%20the%20MPI-only%20version%20and%20have%2090%20processes%20per%20node%20for%20best%20performance%20on%20HBv2%20VMs.%3C%2FLI%3E%0A%3CLI%3EWRF%20v4%20scaled%20well%20on%20HBv2%20using%20the%20large%20Hurricane%20Maria%201km%20model%2C%20and%20a%20parallel%20efficiency%20of%20about%2080%20percent%20was%20measured%20running%20on%20512%20HBv2%20nodes%20(Figures%205%20and%206).%20The%20parallel%20efficiency%20declined%20at%20512%20HBv2%20nodes%20due%20to%20not%20having%20enough%20work%20per%20processor%20at%20that%20scale.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1131097%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20weather%20research%20and%20forecasting%20(WRF)%20model%20is%20popular%20in%20high%20performance%20computing%20(HPC)%20code%20used%20by%20the%20weather%20and%20climate%20community.%20WRF%20v4%20typically%20performs%20well%20on%20traditional%20HPC%20architectures%20that%20support%20high%20floating-point%20processing%2C%20high%20memory%20bandwidth%2C%20and%20a%20low-latency%20network%E2%80%94for%20example%2C%20top500%20supercomputers.%20Now%20you%20can%20find%20all%20these%20characteristics%20on%20the%20new%20HBv2%20Azure%20Virtual%20Machines%20(VMs)%20for%20HPC.%20With%20some%20minor%20tuning%2C%20large%20WRF%20v4%20models%20perform%20very%20well%20on%20Azure.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1131097%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHPC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

The weather research and forecasting (WRF) model is popular in high performance computing (HPC) code used by the weather and climate community. WRF v4 typically performs well on traditional HPC architectures that support high floating-point processing, high memory bandwidth, and a low-latency network—for example, top500 supercomputers. Now you can find all these characteristics on the new HBv2 Azure Virtual Machines (VMs) for HPC. With some minor tuning, large WRF v4 models perform very well on Azure.

wrf_us_carib_000.jpg

WRF is a mesoscale numerical weather prediction system designed for both atmospheric research and operation forecasting applications. WRF has a large worldwide community of registered users—more than 48,000 in over 160 countries).
In the past, you needed a supercomputer to run WRF models if you wanted to complete high-resolution weather predictions in a reasonable and practical timeframe. In this post, we explore building WRF v4 models on Azure. We ran performance tests to compare the VMs optimized for HPC workloads—that is, the HB-series, HC-series, and HBv2.

 

Building WRF v4 on Azure

Automated scripts for building different variations of WRF v4, targeting Azure HPC VMs, are contained in the Azure HPC git repository:

git clone git@github.com:Azure/azurehpc.git

 We use Spack to build WRF’s dependencies. See the apps/spack and apps/wrf directories for details. All WRF performance data were generated using the version built with Open MPI v4.0.2. The hybrid parallel (MPI + Open MP) and the MPI-only version were used.

 

WRF v4 benchmark models

WRF v3 models typically are not compatible with WRF v4. For example, the WRF v3 CONUS bench models (2.5 km and 12 km) are no longer supported and are not compatible with WRF v4. For our tests, a new CONUS 2.5 km model (very similar to the original WRF v3 CONUS 2.5 km model) and a larger model, Hurricane Maria 1 km, were generated using the WRF preprocessing system (WPS). See the azurehpc git repository for details on building and installing WPS v4 and the steps we followed to generate these models for W

RF v4.

 

 

Model Resolution km e_we e_sn e_vert Total gridpoints Timstep (s) Simulation hours
new_conus2.5km 2.5 1901 1301 35 87M 15 3

maria1km

1 3665 2894 35 371M

3

1

 

WRF v4 performance comparison on HB-series, HC-series, and HVv2 VMs

This benchmark compares the performance of WRF v4 on HB-series, HC-series, and HVv2 VMs. No performance tuning was applied. The MPI-only version of WRF v4 was used, and all cores on each HPC VM type were used. We were primarily interested in comparing the performance of these VM types on a per-node basis.

 

Figure 1.  WRF v4 performance comparison of HBv2, HB, and HC VMs running the new_conus2.5km case. Performance on HBv2 VMs is twice that of HB and HC VMs for some cases.Figure 1. WRF v4 performance comparison of HBv2, HB, and HC VMs running the new_conus2.5km case. Performance on HBv2 VMs is twice that of HB and HC VMs for some cases.

 

Figure 2. WRF v4 parallel scaling on HBv2, HB, and HC VMs (log simulation speed).Figure 2. WRF v4 parallel scaling on HBv2, HB, and HC VMs (log simulation speed).

 

Tuning WRF v4 on Azure HBv2 VMs

The following tuning optimization were investigated:

  • Comparing the WRF v4 hybrid parallel version (MPI + Open MP) versus MPI-only.
  • Adjusting the optimal process and thread layout and number per node (to optimize memory bandwidth).
  • Adjusting the number of tiles available for parallel threads to work on (L3 cache and NUMA domain optimization).

Figure 3. Tuning WRF v4 can improve performance by approximately 30 percent (in this case).Figure 3. Tuning WRF v4 can improve performance by approximately 30 percent (in this case).

 

 

Figure 4.  For the Hurricane Maria model, the tuned hybrid parallel (MPI+OpenMP) version of WRF performed better on HBv2 VMs compared to the MPI-only version up to 128 nodes. When each process has enough work, we can split the patches into tiles, and parallel threads can work on the tiles (to optimize data usage in the L3 cache and HBv2 NUMA domains).Figure 4. For the Hurricane Maria model, the tuned hybrid parallel (MPI+OpenMP) version of WRF performed better on HBv2 VMs compared to the MPI-only version up to 128 nodes. When each process has enough work, we can split the patches into tiles, and parallel threads can work on the tiles (to optimize data usage in the L3 cache and HBv2 NUMA domains).

 

WRF v4 parallel scaling on HBv2

We applied performance optimizations to WRF v4 running a large Hurricane Maria 1km model on HBv2 VMs. We wanted to see how well the large Hurricane Maria 1km model would scale on this VM type.

 

Figure 5. WRF v4 parallel scaling on HBv2 (log scale). WRF v4 running the maria1km case had a parallel efficiency of about 80 percent on 512 HBv2 nodes.Figure 5. WRF v4 parallel scaling on HBv2 (log scale). WRF v4 running the maria1km case had a parallel efficiency of about 80 percent on 512 HBv2 nodes.

 

 

Figure 6. WRF v4 parallel performance running the large Hurricane Maria 1km case on Azure HBv2 VMs.Figure 6. WRF v4 parallel performance running the large Hurricane Maria 1km case on Azure HBv2 VMs.

 

 

Summary

The new HBv2 VMs have the performance you need to run large WRF v4 models, and only minor tuning is needed. To summarize the our test results:

 

  • Running the new_conus2.5km benchmark demonstrated good scaling on HBv2, HB-series, and HC-series VMs and showed that HBv2 can run WRF v4 two times faster than the HB and HC VMs (Figures 1 and 2).
  • WRF v4 performance improves considerably on HBv2 VMs—by about 30 percent—when you carefully lay out processes and threads and optimize the HBv2 NUMA domains, memory bandwidth and L3 cache (Figure 3). In the case of maria1km, hybrid parallel WRF is only effective with up to 128 nodes (Figure 4) when there is enough work per processor to divide each patch into tiles that the Open MP threads can work on. This technique keeps more data in L3 cache, and we see improved performance. A smaller number of nodes performs better with a higher tile count, and larger node counts perform better with a smaller tile count. Typically, when you find the optimal number of tiles for a particular number of nodes, the number of tiles is halved each time you double the number of nodes to achieve the best performance. In the maria1km case, when more than 128 nodes were used, hybrid parallel WRF did not help. It was best to use the MPI-only version and have 90 processes per node for best performance on HBv2 VMs.
  • WRF v4 scaled well on HBv2 using the large Hurricane Maria 1km model, and a parallel efficiency of about 80 percent was measured running on 512 HBv2 nodes (Figures 5 and 6). The parallel efficiency declined at 512 HBv2 nodes due to not having enough work per processor at that scale.