后台回复1024,解锁无限快乐!
下载安装Stream
下载地址:
链接: https://pan.baidu.com/s/1tGo1clCqY-jQPN8G1eWSsg
提取码: f6jd
上传代码到被测机,进行解压:
tar -xvf stream.tar
使用stream测试内存带宽
单线程编译:
# gcc -O -mcmodel=medium -DSTREAM_ARRAY_SIZE=100000000 -mcmodel=large -DNTIME=20 stream.c -o stream.o
# ./stream.o
多线程编译:
# gcc -O -mcmodel=medium -fopenmp -DSTREAM_ARRAY_SIZE=100000000 -mcmodel=large -DNTIME=20 stream.c -o stream.o
# ./stream.o
单线程结果:
root@phyger-xubuntu:/home/phyger/stream# ./stream.o
-------------------------------------------------------------
STREAM version $Revision: 5.9 $
-------------------------------------------------------------
This system uses 8 bytes per DOUBLE PRECISION word.
-------------------------------------------------------------
Array size = 2000000, Offset = 0
Total memory required = 45.8 MB.
Each test is run 10 times, but only
the *best* time for each is used.
-------------------------------------------------------------
Printing one line per active thread....
-------------------------------------------------------------
Your clock granularity/pr