PARSEC,全称Princeton Application Repository for Shared-Memory Computers,官网为https://parsec.cs.princeton.edu。
1.下载PARSEC
1 | [root@hgs ~]# wget http://parsec.cs.princeton.edu/download/3.0/parsec-3.0-core.tar.gz |
2.解压
1 | [root@hgs ~]# tar -zxf parsec-3.0-core.tar.gz |
3.设置环境变量
1 | [root@hgs ~]# source env.sh |
4.编译
1 | [root@hgs ~]# parsecmgmt -a build -p all |
编译过程中,可能会出现如下问题:
- 问题1
1 | POD document had syntax errors at /usr/bin/pod2man line 68. |
解决办法:删除/usr/bin/pod2man
1 | rm -f /usr/bin/pod2man |
- 问题2
1 | *** You must have either have gettext support in your C library, or use the |
解决办法:安装gettext
1 | Ubuntu |
- 问题3
1 | configure: error: X11 development libraries needed for xlib driver |
解决办法:安装X11开发库
1 | Ubuntu |
- 问题4
1 | No package 'xext' found |
解决办法:
1 | Ubuntu |
- 问题5
1 | No package 'xt' found |
解决办法:
1 | Ubuntu |
- 问题6
1 | No package 'xmu' found |
解决办法:
1 | Ubuntu |
- 问题7
1 | /usr/include/wchar.h:94:3: 错误:与‘__mbstate_t’类型冲突 |
解决办法:注释掉__mbstate_t的定义。
首先,编辑文件pkgs/libs/uptcpip/src/include/sys/bsd__types.h
:
1 | vim pkgs/libs/uptcpip/src/include/sys/bsd__types.h |
然后,注释掉第102~105行:
1 | //typedef union { |
- 问题8
1 | [PARSEC] Error: 'env version=tbb /usr/bin/make' failed. |
解决办法:安装tbb
1 | apt install -y libtbb2 tbb-examples |
如果最后输出Done
,则说明编译成功
1 | [PARSEC] |
5.运行
1 | [root@hgs ~]# parsecmgmt -a run -p all |
参考资料
1.https://parsec.cs.princeton.edu/parsec3-doc.htm