爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 12280|回复: 14

如何提高并行情况下WRF的运行速度?

[复制链接]

新浪微博达人勋

发表于 2017-10-15 12:07:45 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
用WRF处理31天的GFS资料,设置了3层嵌套,最小分辨率达到1km,更新了海温数据(sst_update),服务器的性能非常好,目前并行使用了150个节点,可是处理速度依旧很慢,老板说她自己的小服务器8个节点转一层30天只要几个小时,对我的设置提出质疑,请问有什么方法可以提高运行速度,能在3天内处理好数据?

我的namelist.input设置
&time_control
run_days                            = 0,
run_hours                           = 714,
run_minutes                         = 0,
run_seconds                         = 0,
start_year                          = 2015,2015,2015,
start_month                         = 07,07,07,
start_day                           = 01,01,01,
start_hour                          = 00,00,00,
start_minute                        = 00,00,00,
start_second                        = 00,00,00,
end_year                            = 2015,2015,2015,
end_month                           = 07,07,07,
end_day                             = 31,31,31,
end_hour                            = 18,18,18,
end_minute                          = 00,00,00,
end_second                          = 00,00,00,
interval_seconds                    = 21600,
input_from_file                     = .true.,.true.,.true.,
history_interval                    = 360,360,360,
frames_per_outfile                  = 1000,1000,1000,
restart                             = .false.,
restart_interval                    = 5000,
io_form_history                     = 2
io_form_restart                     = 2
io_form_input                       = 2
io_form_boundary                    = 2
debug_level                         = 0
auxinput4_inname                    = "wrflowinp_d<domain>"
auxinput4_interval                  = 360, 360, 360,
io_form_auxinput4                   = 2

/

&domains
time_step                           = 120,
time_step_fract_num                 = 0,
time_step_fract_den                 = 1,
max_dom                             = 3,
e_we                                = 101,116,376,
e_sn                                = 141,111,246,
e_vert                              = 27,27,27,
eta_levels                          = 1.000,0.982,0.973,0.964,0.946,0.922,0.894,0.860,0.817,0.766,0.707,0.644,0.576,0.507,0.444,0.380,0.324,0.273,0.228,0.188,0.152,0.121,0.093,0.069,0.048,0.020,0.000,
p_top_requested                     = 5000,
num_metgrid_levels                  = 27,
num_metgrid_soil_levels             = 4,
dx                                  = 25000,5000,1000,
dy                                  = 25000,5000,1000,
grid_id                             = 1,2,3,
parent_id                           = 0,1,2,
i_parent_start                      = 1,40,17,
j_parent_start                      = 1,60,33,
parent_grid_ratio                   = 1,5,5,
parent_time_step_ratio              = 1,5,5,
feedback                            = 0,
smooth_option                       = 0,
/

&physics
mp_physics                          = 2,2,2,
ra_lw_physics                       = 1,1,1,
ra_sw_physics                       = 2,2,2,
radt                                = 25,5,1,
cam_abs_dim2                        = 27,
sf_sfclay_physics                   = 1,1,1,
sf_surface_physics                  = 2,2,2,
bl_pbl_physics                      = 1,1,1,
bldt                                = 0,0,0,
cu_physics                          = 1,0,0,
cudt                                = 5,0,0,
isfflx                              = 1,
ifsnow                              = 0,
icloud                              = 1,
surface_input_source                = 1,
sst_update                          = 1,
num_soil_layers                     = 4,
mp_zero_out                         = 0,
num_land_cat                        = 21,
sf_urban_physics                    = 0,0,0,

/

&fdda
/

&dynamics
w_damping                           = 0,
diff_opt                            = 1,1,1,
km_opt                              = 1,4,4,
diff_6th_opt                        = 0,0,0,
diff_6th_factor                     = 0.12,0.12,0.12,
damp_opt                            = 0,
zdamp                               = 5000.,5000.,5000.,
base_temp                           = 290.,
dampcoef                            = 0.01,0.01,0.01,
khdif                               = 0,0,0,
kvdif                               = 0,0,0,
non_hydrostatic                     = .true.,.true.,.true.,
moist_adv_opt                       = 1,1,1,
scalar_adv_opt                      = 1,1,1,
/

&bdy_control
spec_bdy_width                      = 6,
spec_zone                           = 1,
relax_zone                          = 5,
specified                           = .true.,.flase.,.false.,
nested                              = .false.,.true.,.true.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/


密码修改失败请联系微信:mofangbao

新浪微博达人勋

 成长值: 0
发表于 2017-10-15 21:06:39 | 显示全部楼层
我记得之前上过的一个课讲过并行速度这个事,的确,并行核数不是越多越好,速度貌似类似于log函数
核数增大到一定数值后速度增长的很慢

wrf官网上的FAQ有写:
http://www2.mmm.ucar.edu/wrf/users/FAQ_files/FAQ_wrf_runtime.html

第一个解答挺好的,也有说核数多了会怎样,粘贴过来如下,福利手机党:

Q1        How many processors should I use to run wrf.exe?
A1        The rule of thumb is that the smallest number of processors you use should be based on the domain with the largest size, while the largest number of processors you use should be based on the domain with the smallest size. Let's say, for instance, that you have 2 domains, and domain 01 is 200x200 grid spaces, while domain 02 is 300x300 grid spaces. This is the math you should use to get a rough estimate of a good number of processors:

largest # of processors:
(200/25)*(200/25) = 64 processors

smallest # of processors:
(300/100)*(300/100) = 9 processors

This means you should use somewhere between 9 and 64 processors for this run.
The problem with using too many processors is that when you use multiple processors, the domain will be divided up into squares, based on the number of processors being used. But each of those squares also has halos (or a certain number of grid spaces inward from each boundary) that obtain neighboring calculations for areas close to the boundary. If you use too many processors, each square becomes smaller than the size of the halos, which will cause problems.
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2017-10-15 17:33:34 | 显示全部楼层
并行核数不是越多越好,测试下大概多少个点最块,根据积分速度你也能估计多久能跑完
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-10-15 17:54:47 | 显示全部楼层
男紫汗 发表于 2017-10-15 17:33
并行核数不是越多越好,测试下大概多少个点最块,根据积分速度你也能估计多久能跑完

谢谢您,可是怎么测试呢?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-10-16 05:42:22 | 显示全部楼层
tbag 发表于 2017-10-15 21:06
我记得之前上过的一个课讲过并行速度这个事,的确,并行核数不是越多越好,速度貌似类似于log函数
核数 ...

谢谢您,还有个问题请教一下namelist设置会影响模式运行速度吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-16 05:49:42 | 显示全部楼层
平林漠漠烟如织 发表于 2017-10-15 17:54
谢谢您,可是怎么测试呢?

设置好后提交,看看积分速度如何,觉得慢就取消任务,以不同的核数重新提交。namelist里的设置我不知道这么长时间怎么设置比较好,跑一两天的话我觉得你的垂直层数不够
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-16 08:34:48 | 显示全部楼层
tbag 发表于 2017-10-15 21:06
我记得之前上过的一个课讲过并行速度这个事,的确,并行核数不是越多越好,速度貌似类似于log函数
核数 ...

学习一下
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-16 08:38:56 | 显示全部楼层
tbag 发表于 2017-10-15 21:06
我记得之前上过的一个课讲过并行速度这个事,的确,并行核数不是越多越好,速度貌似类似于log函数
核数 ...

计算最大最小核数时除的25和100是选用的固定的常数值吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-10-16 12:06:37 | 显示全部楼层
男紫汗 发表于 2017-10-16 05:49
设置好后提交,看看积分速度如何,觉得慢就取消任务,以不同的核数重新提交。namelist里的设置我不知道这 ...

垂直层设置成32层可以吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-16 12:11:13 | 显示全部楼层

厉害了。。。。
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表