||
FEKO支持并行计算,这样就可以充分发挥双核计算机和多台计算机的功能,使所有的CPU共同完成一个任务。
要使用FEKO的并行计算功能,首先在安装时,要选择include parallel solver,然后设置帐号和密码,如果只是使用本地计算机的双核功能,只需要设置一个本机的帐号和密码,如果要使多台计算机同时计算,设置的帐号和密码要求在每一台计算机上都有,该设置在安装后也可通过%FEKO_HOME%mpimpich2binmpiregister.bat进行修改。
有两台计算机,通过无线路由器相连,配置为
计算机名称 |
CPU |
OS |
网卡 |
ssDesktop |
Intel(R) Pentium(R) Dual CPU E2180@2.00GHz |
Windows XP |
Intel(R) 82562V-2 |
ssLaptop |
Intel(R) Core(TM) Duo CPU T5470@1.6GHz |
Windows XP |
Intel(R) PRO/Wireless 3945ABG |
两台计算机都建立帐号(如FekoParallel),安装过程中或运行%FEKO_HOME%mpimpich2binmpiregister.bat设置该帐号。在ssDesktop中的CADFEKO->Run->Component parameters->FEKO tab->Configure button添加Host和进程数,因为都是双核所以两个Host的进程数都是2。勾选Run->Parallel FEKO execution。这样通过驻留内存的%FEKO_HOME%mpimpich2binsmpd.exe程序,FEKO就可以进行并行计算了,在ssDesktop中打开一个FEKO例子,如Microstrip_Filter,点击运行,就可以看到ssDesktop和ssLaptop的4个CPU都能满负荷工作。单独完整的在ssDesktop上运行Microstrip_Filter示例大概需要(2008-12-08 17:41:49 至2008-12-08 16:56:22 )45分钟。这里只为检验并行计算,所以修改Microstrip_Filter示例,将1-4GHz改为2.5GHz。则在非并行,单机双核并行,双机双核并行三种情况下的耗时数据为:
1. ssDesktop上非并行:
开始时间:2008-12-08 19:50:06
结束时间:2008-12-08 19:53:51
耗时:3:45
SUMMARY OF REQUIRED TIMES IN SECONDS
CPU-time runtime
Reading and constructing the geometry 0.062 0.062
Checking the geometry 0.063 0.063
Initialisation of the Greens function 0.000 0.000
Calcul. of coupling for PO/Fock 0.000 0.000
Calcul. of matrix elements 96.891 96.891
Calcul. of right-hand side vector 0.000 0.000
Preconditioning system of linear eqns. 8.078 8.078
Solution of the system of linear eqns. 120.235 120.234
Determination of surface currents 0.000 0.000
Calcul. of impedances/powers/losses 0.015 0.016
Calcul. of averaged SAR values 0.000 0.000
Calcul. of power ideal receiving ant. 0.000 0.000
Calcul. of cable coupling 0.000 0.000
Calcul. of electric near field 0.000 0.000
Calcul. of magnetic near field 0.000 0.000
Calcul. of far field 0.000 0.000
other 0.015 0.015
----------- -----------
total times: 225.359 225.359
(total times in hours: 0.063 0.063)
2. ssDesktop上并行:
开始时间:2008-12-08 19:45:49
结束时间:2008-12-08 19:49:16
耗时: 3:27
SUMMARY OF REQUIRED TIMES IN SECONDS
CPU-time runtime
Reading and constructing the geometry 0.063 0.063
Checking the geometry 0.062 0.062
Initialisation of the Greens function 0.000 0.000
Calcul. of coupling for PO/Fock 0.000 0.000
Calcul. of matrix elements 76.531 76.531
Calcul. of right-hand side vector 0.016 0.016
Preconditioning system of linear eqns. 6.687 6.687
Solution of the system of linear eqns. 122.953 122.953
Determination of surface currents 0.000 0.000
Calcul. of impedances/powers/losses 0.000 0.000
Calcul. of averaged SAR values 0.000 0.000
Calcul. of power ideal receiving ant. 0.000 0.000
Calcul. of cable coupling 0.000 0.000
Calcul. of electric near field 0.000 0.000
Calcul. of magnetic near field 0.000 0.000
Calcul. of far field 0.000 0.000
other 0.016 0.016
----------- -----------
total times: 206.328 206.328
(total times in hours: 0.057 0.057)
3. ssDesktop和ssLaptop上并行:
开始时间:2008-12-08 19:31:21
结束时间:2008-12-08 19:41:59
耗时: 10:38
SUMMARY OF REQUIRED TIMES IN SECONDS
CPU-time runtime
Reading and constructing the geometry 0.516 0.516
Checking the geometry 0.078 0.078
Initialisation of the Greens function 0.000 0.000
Calcul. of coupling for PO/Fock 0.000 0.000
Calcul. of matrix elements 49.641 49.641
Calcul. of right-hand side vector 0.125 0.125
Preconditioning system of linear eqns. 3.297 3.297
Solution of the system of linear eqns. 584.266 584.266
Determination of surface currents 0.000 0.000
Calcul. of impedances/powers/losses 0.094 0.094
Calcul. of averaged SAR values 0.000 0.000
Calcul. of power ideal receiving ant. 0.000 0.000
Calcul. of cable coupling 0.000 0.000
Calcul. of electric near field 0.000 0.000
Calcul. of magnetic near field 0.000 0.000
Calcul. of far field 0.000 0.000
other 0.311 0.311
----------- -----------
total times: 638.328 638.328
(total times in hours: 0.177 0.177)
由以上数据可以看出在计算矩阵元素时,并行体现出了明显的优势,不过在求解线性方程组时,并行处理比单线程还慢,虽然FEKO中的LU分解可以通过CG卡片设置为Gauss Elimination (LINPACK routines)、Conjugate Gradient Method (CGM)、Parallel LU-decomposition (ScaLAPACK routines)等20几种具体方法,但似乎都不理想,在并行计算下,LU分解时CPU都不是满负荷工作。
将ssLaptop的无线连接方式换为有线,则配置及4线程并行计算数据为
计算机名称 |
CPU |
OS |
网卡 |
ssDesktop |
Intel(R) Pentium(R) Dual CPU E2180@2.00GHz |
Windows XP |
Intel(R) 82562V-2 |
ssLaptop |
Intel(R) Core(TM) Duo CPU T5470@1.6GHz |
Windows XP |
Broadcom NetLink(TM) Fast Ethernet |
4. ssDesktop和有线连接的ssLaptop上并行:
开始时间:2008-12-08 23:49:09
结束时间:2008-12-08 23:51:51
耗时: 2:42
SUMMARY OF REQUIRED TIMES IN SECONDS
CPU-time runtime
Reading and constructing the geometry 0.141 0.141
Checking the geometry 0.078 0.078
Initialisation of the Greens function 0.000 0.000
Calcul. of coupling for PO/Fock 0.000 0.000
Calcul. of matrix elements 49.672 49.672
Calcul. of right-hand side vector 0.016 0.016
Preconditioning system of linear eqns. 3.172 3.172
Solution of the system of linear eqns. 109.015 109.015
Determination of surface currents 0.000 0.000
Calcul. of impedances/powers/losses 0.016 0.016
Calcul. of averaged SAR values 0.000 0.000
Calcul. of power ideal receiving ant. 0.000 0.000
Calcul. of cable coupling 0.000 0.000
Calcul. of electric near field 0.000 0.000
Calcul. of magnetic near field 0.000 0.000
Calcul. of far field 0.000 0.000
other 0.031 0.031
----------- -----------
total times: 162.141 162.141
(total times in hours: 0.045 0.045)
从以上数据可知,采取全有线的网络连接方式,并行计算可以达到基本优越的性能,而前三种情况ssLaptop都是以802.11g(54Mbps)连接的,ssDesktop是以100M网卡(802.3)连接,二者可能在数据交换上不平衡导致并行求解线性方程组时效率下降。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-26 17:26
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社