您的位置:首页 > 运维架构 > Linux

PARSEC在CentOS6.5 版本的linux系统下安装过程

2015-07-02 20:59 1461 查看
安装PARSEC主要的参考资料是官网的文档,但是遇到错误以后基本找不到解决方法,于是自己细细看了看错误,发现时自己机器上底层依赖的软件没有安装完全。

官网资料:见链接http://parsec.cs.princeton.edu/parsec3-doc.htm,第五步开始出错,错误信息如下:

[code]make: /usr/bin/g++: Command not found make: *** [blackscholes] Error 127 [PARSEC] Error: 'env version=pthreads /usr/bin/make' failed.


后来发现这台服务器上没有GCC,没有g++ 所以不能编译,有错误。

于是yum install gcc ,yum install gcc-c++ 就ok了。

yum gcc-c++ 的时候出现小插曲,no packages,于是替换了yum源,为aliyun的替换工作详见/article/1984807.html

运行 parsecmgmt -a build 就正常编译了,编译到parsec.mesa时,出现了下边这个错误:

[code]configure: error: X11 development libraries needed for xlib driver
[PARSEC] Error: 'env ./configure --with-driver=xlib --enable-glut --enable-stati                               c --disable-shared --prefix=/home/hjl/benchmarks/parsec-3.0/pkgs/libs/mesa/inst/                               amd64-linux.gcc' failed.


这个是因为缺少X11相关的图像库文件

解决方法:
yum install libX11-devel.x86_64


接着又出现缺x11 xext package的error:

configure: error: Package requirements (x11 xext) were not met: 

No package 'xext' found


解决方法:
yum install libXext-devel.x86_64


后面分别又出现了,缺少x11 xmu, x11 xi ,xt 等package:
checking for GLUT... configure: error: Package requirements (x11 xmu xi) were not met: 

No package 'xmu' found 

No package 'xi' found 

No package 'xt' found


解决方法:
yum install libXt-devel.x86_64
//Xt可替换为Xmu,Xi

图像相关的库文件补全以后,又进行了很长时间的编译,在编译parsec.swaptions 时出现了tbb错误:

[code]HJM_SimPath_Forward_Blocking.cpp:11:31: error: tbb/blocked_range.h: No such file or directory
HJM_SimPath_Forward_Blocking.cpp:12:30: error: tbb/parallel_for.h: No such file or directory
HJM_SimPath_Forward_Blocking.cpp:13:41: error: tbb/cache_aligned_allocator.h: No such file or directory
HJM_SimPath_Forward_Blocking.cpp:39: warning: ISO C++ forbids declaration of ‘tbb’ with no type
HJM_SimPath_Forward_Blocking.cpp:39: error: expected ‘,’ or ‘...’ before ‘::’ token
HJM_SimPath_Forward_Blocking.cpp: In member function ‘void ParallelB::operator()(int) const’:
HJM_SimPath_Forward_Blocking.cpp:40: error: ‘range’ was not declared in this scope
HJM_SimPath_Forward_Blocking.cpp: In function ‘int HJM_SimPath_Forward_Blocking(double**, int, int, double, double*, double*, do          uble**, long int*, int)’:
HJM_SimPath_Forward_Blocking.cpp:134: error: ‘tbb’ has not been declared
HJM_SimPath_Forward_Blocking.cpp:134: error: ‘tbb’ has not been declared
HJM_SimPath_Forward_Blocking.cpp:134: error: expected primary-expression before ‘int’
make: *** [HJM_SimPath_Forward_Blocking.o] Error 1
[PARSEC] Error: 'env version=tbb /usr/bin/make' failed.


一开始以为是
/home/hjl/benchmarks/parsec-3.0/pkgs/libs/tbblib/inst/amd64-linux.gcc/include/tbb
、目录下面没有需要的头文件,但是查看目录以后,发现这些文件都是存在的。

第一种做法:把tbb文件放在了
HJM_SimPath_Forward_Blocking.cpp
文件所在目录下

后来觉得安装tbb就可以了吧,结果安装完,效果跟没有一样,于是又搜索文档。发现config/下面有gcc-tbb.bldconf, 结合手册上的例子尝试了另一种编译方法:
parsecmgmt -a build -p swaptions -c gcc-tbb


居然神奇的编译通过了,后来仔细想想确实已经有用gcc编译好的tbb了,所以就通过了。

遇到这么多问题以后,似乎也明白了一些,和图像有关的benchmark会判断X11,需要TBB的用gcc-tbb 编译就可以,剩下的就直接gcc编译,不需要直接指明。

下面是个简洁的整理:

splash2和splash2x系列(各14个,一一对应)

直接编译,编译格式为:
parsecmgmt -a build -p splash2.x
parsecmgmt -a build -p splash2x.x
这里x表示具体系列下的benchmark的名字。

parsec可gcc直接编译(29个除swaptions)

[code]blackscholes  bodytrack  canneal  cmake   dedup  facesim  fluidanimate  freqmine  libjpeg  ferret  glib   hooks   netstreamcluster gsl  libtool  libxml2  mesa  netdedup  streamcluster netferret  parmacs  raytrace  ssl  tbblib  uptcpip  vips x264  yasm  zlib


以上这些benchmark 直接编译命令是:
parsecmgmt -a build -p x


parsec可gcc-tbb编译(与上面重复3个,共4个)

[code] blackscholes  bodytrack  swaptions tbblib


这四个benchmark中,只有swaptions只能gcc-tbb编译,其他几个可gcc直接编译通过。gcc-tbb编译格式:
parsecmgmt -a build -p swaptions -a gcc-tbb
// swaptions 可替换的benchmark名字

因此PARSEC-3.0 下面一共58个benchmark,在CentOS6.5 系统中均可编译。

运行benchmark格式:
parsecmgmt -a run -p streamcluster
不同的配置,运行时间不一样,默认配置3秒完成。其他就不细说,希望这篇文章能帮到很多人。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: