我在我的服务器上安装了numpy并与下面的库和python链接:
Python-2.7.9
Numpy-1.9.2
OpenBlas-0.2.10
Atlas
使用或不使用numpy的Openblas在我的服务器中提供相同的结果。
但我在桌面上运行的速度比在HPC服务器上快得多。更多>详情如下: 在服务器下面的结果:
import numpy as np
import time
A=np.random.random((1000,1000))
B=np.random.random((1000,1000))
t=time.time();np.dot(A,B);print time.time()-t
array([[ 244.68742139, 248.06278415, 243.8470716 , ..., 237.00600025,
246.48968543, 243.30411108],
[ 245.53309606, 240.93001932, 242.07282106, ..., 234.61134087,
246.8035772 , 240.08430753],
[ 251.26426555, 250.28870749, 243.7012242 , ..., 238.03493551,
245.19529261, 242.56134817],
...,
[ 253.50021674, 254.2082562 , 253.28257115, ..., 248.79910477,
255.83380586, 255.79587693],
[ 255.17478038, 254.54329655, 246.4440345 , ..., 239.20522728,
253.42703832, 248.55475779],
[ 255.54552176, 252.53394451, 249.27373006, ..., 245.36860788,
254.46053394, 247.16377842]])
1.54565000534
在我的电脑上,我得到以下输出
>>> import numpy as np
>>> import time
>>> A=np.random.random((1000,1000))
>>> B=np.random.random((1000,1000))
>>> t=time.time();np.dot(A,B);print time.time()-t
array([[ 251.02325661, 247.76487062, 243.96296321, ..., 247.74526818,
240.01351009, 242.09309446],
[ 244.70605416, 237.32349381, 243.15063794, ..., 248.87322205,
235.37442193, 234.0516297 ],
[ 244.75370599, 241.37853315, 244.81765191, ..., 245.14608767,
232.0443932 , 238.92630488],
...,
[ 257.63017911, 253.70984268, 250.2429554 , ..., 258.54986519,
244.67368682, 242.91374959],
[ 252.534875 , 243.55947921, 244.91385322, ..., 246.52761375,
232.01807853, 240.7038384 ],
[ 243.48345396, 238.21551591, 241.92045466, ..., 244.55678965,
228.53646839, 241.20027957]])
0.155517101288
工作站机器的详细信息:
Processor: x8
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
stepping : 9
microcode : 0x1b
cpu MHz : 3833.234
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov >pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm >constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc >aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 >cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave >avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi >flexpriority ept vpid fsgsbase smep erms xsaveopt
bugs :
bogomips : 6784.77
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
Memory:
Size: 8192 MB
Form Factor: DIMM
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Hard Disk :
[1.00 TB]SATA
Rotation Rate: 7200 rpm
群集服务器的详细信息:
Processor:
processor : 23
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz
stepping : 4
cpu MHz : 1200.000
cache size : 30720 KB
physical id : 1
siblings : 12
core id : 13
cpu cores : 12
apicid : 58
initial apicid : 58
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca >cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx >pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology >nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 >cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave >avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi >flexpriority ept vpid fsgsbase smep erms
bogomips : 5386.34
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
Memory:
Size: 16384 MB
Form Factor: DIMM
Locator: PROC 2 DIMM 8
Type: DDR3
Speed: 1866 MHz