- 论坛徽章:
- 0
|
在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 编辑 ] |
|