免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: 长湾
打印 上一主题 下一主题

请问单机四核用mpich编译和配置 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-04-14 20:13 |只看该作者

在win下自己编译了mpich2中的例子,单核10位数要29秒多,四核要7秒多。
安装文件自带的程序居然快了4倍。
两个程序分别单核四核执行结果一样。但单核四核的结果是不同的。

C:\Documents and Settings\Administrator>mpiexec  "C:\Program Files\MPICH2\exampl
es\cpi.exe"
Enter the number of intervals: (0 quits) 1000000000
pi is approximately 3.1415926535899708, Error is 0.0000000000001776
wall clock time = 7.718792
Enter the number of intervals: (0 quits) 1000000000
pi is approximately 3.1415926535899708, Error is 0.0000000000001776
wall clock time = 7.717777
Enter the number of intervals: (0 quits) 0

C:\Documents and Settings\Administrator>mpiexec -n 4 "C:\Program Files\MPICH2\ex
amples\cpi.exe"
Enter the number of intervals: (0 quits) 1000000000
pi is approximately 3.1415926535897682, Error is 0.0000000000000249
wall clock time = 1.967235
Enter the number of intervals: (0 quits) 1000000000
pi is approximately 3.1415926535897682, Error is 0.0000000000000249
wall clock time = 1.954080
Enter the number of intervals: (0 quits) 1000000000
pi is approximately 3.1415926535897682, Error is 0.0000000000000249
wall clock time = 1.954707
C:\Documents and Settings\Administrator>mpiexec -n 4 "C:\Program Files\MPICH2\ex
amples\Release\cpi.exe"
Enter the number of intervals: (0 quits) 1000000000

1000000000
pi is approximately 3.1415926535897682, Error is 0.0000000000000249
wall clock time = 7.417078
Enter the number of intervals: (0 quits) 0

0

C:\Documents and Settings\Administrator>mpiexec  "C:\Program Files\MPICH2\exampl
es\Release\cpi.exe"
Enter the number of intervals: (0 quits) 1000000000

1000000000
pi is approximately 3.1415926535899708, Error is 0.0000000000001776
wall clock time = 29.516858

[ 本帖最后由 长湾 于 2009-4-14 21:02 编辑 ]

论坛徽章:
0
12 [报告]
发表于 2009-04-14 20:25 |只看该作者

难道阿冈大叔用的编译器特别牛?

论坛徽章:
0
13 [报告]
发表于 2009-04-16 03:17 |只看该作者
原帖由 长湾 于 2009-4-14 17:49 发表

32位win单核下10位计算pi的时间是4秒不到(今晚不知道怎么搞得,变了7秒了,难道装了个vs8就变成这样?之前的.net是2.0,现在的是3.5,不知道有没有关系呢?),64位rhel5。3单核的时间是41秒。
虚拟 ...


你这个结果完全不正常的,按照这样的逻辑,全天下的HPCC都要改win算了.微软也不会在这领域这么辛苦了.

论坛徽章:
0
14 [报告]
发表于 2009-04-17 18:37 |只看该作者

论坛徽章:
0
15 [报告]
发表于 2009-04-19 16:11 |只看该作者
原帖由 nntp 于 2009-4-16 03:17 发表


你这个结果完全不正常的,按照这样的逻辑,全天下的HPCC都要改win算了.微软也不会在这领域这么辛苦了.


换个非并行重新编译,
Enter the number of intervals: (0 quits) 1000000000
win2003_32位的是O2,7.73秒左右
rhel_64位的是O3,12秒左右

搞了半天,原来是gcc版本低的原因,不支持 -march=amdfam10。

[ 本帖最后由 长湾 于 2009-4-20 13:20 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP