猿代码 — 科研/AI模型/高性能计算
0

navier_stokes_multigrid运行

摘要: 1)https://github.com/yskmt/navier_stokes_multigrid这个代码直接 可以编译运行2)如何运行:./multigridmultigrid 写得很清楚3)运行命令./multigrid 4 3 16 16 16需要带参数4线程结果level: 3 n_dof: 8creat ...
1)
https://github.com/yskmt/navier_stokes_multigrid

这个代码直接 可以编译运行

2)
如何运行:
./multigrid
multigrid [# of threads] [max level] [I_size] [J_size] [K_size]

写得很清楚 
3)
运行命令
 ./multigrid 4 3 16 16 16

需要带参数

4线程结果

level: 3 n_dof: 8
create finite difference matrix
convergence reached after 51 iterations
post-smoothing 1000000000 times on level 2
convergence reached after 974 iterations
post-smoothing 1000000000 times on level 1
convergence reached after 12975 iterations
post-smoothing 1000000000 times on level 0
convergence reached after 137608 iterations


advection time: 0.00327898
viscosity time: 0.419935
pressure time: 48.7225
total time: 49.2826 with 4 threads



4)
./multigrid 1 3 16 16 16



post-smoothing 1000000000 times on level 2
convergence reached after 974 iterations
post-smoothing 1000000000 times on level 1
convergence reached after 12975 iterations
post-smoothing 1000000000 times on level 0
convergence reached after 137608 iterations


advection time: 0.00645429
viscosity time: 1.16773
pressure time: 182.543
total time: 183.849 with 1 threads

可见多线程提升计算速度很快。


说点什么...

已有0条评论

最新评论...

本文作者
2024-2-24 10:34
  • 0
    粉丝
  • 242
    阅读
  • 0
    回复
资讯幻灯片
热门评论
热门专题
排行榜
Copyright   ©2015-2023   猿代码-超算人才智造局 高性能计算|并行计算|人工智能      ( 京ICP备2021026424号-2 )