Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBB:quick start #33

Open
guodongxiaren opened this issue Apr 1, 2020 · 2 comments
Open

TBB:quick start #33

guodongxiaren opened this issue Apr 1, 2020 · 2 comments
Labels
C/C++ 兵中凶兽 C++ TBB Intel开源的并行计算库

Comments

@guodongxiaren
Copy link
Owner

TBB

Intel 开源的C++并行计算库:Threading Building Blocks

同类产品:

  • PPL:微软开源:Parallel Pattern Library
  • OpenMp:老牌的并行计算库
@guodongxiaren
Copy link
Owner Author

guodongxiaren commented Apr 1, 2020

下载

https://github.com/oneapi-src/oneTBB/releases
去下载release包。git克隆总是在65%的时候卡死。

当前最新版本为tbb_2020。
跨平台的。Mac也可以用。

编译

解压后cd进去。有个Makefile直接make。

make -j 8

在build目录下会出现一个编译后的目录,比如:

macos_intel64_clang_cc10.0.0_os10.14_release

linux_intel64_gcc_cc4.8.5_libc2.17_kernel3.10.0_release

以上会编译出tbb的库。还可以通过这个Makefile编译出其他东西:

  • make test 编译TBB的单元测试。
  • make examples 编译TBB使用的样例程序。
  • make all 编译全部。

@guodongxiaren
Copy link
Owner Author

运行测试用例

在build目录中,有个机器名命名的目录。里面是编译好的so和bin。
比如:

linux_intel64_gcc_cc4.8.5_libc2.17_kernel3.10.0_release

虽然bin被命名成了.exe的形式。但是并一定是Windows系统的可执行文件!Linux和Mac一样可以执行。

直接执行会报错:

loading shared libraries: libtbbmalloc.so.2: cannot open shared object file: No such file or directory

需要添加一个环境变量:

export LD_LIBRARY_PATH=/home/xxx/source/tbb/build/linux_intel64_gcc_cc4.8.5_libc2.17_kernel3.10.0_release

@guodongxiaren guodongxiaren changed the title TBB TBB:quick start Apr 17, 2020
@guodongxiaren guodongxiaren added C/C++ 兵中凶兽 C++ TBB Intel开源的并行计算库 labels Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C/C++ 兵中凶兽 C++ TBB Intel开源的并行计算库
Projects
None yet
Development

No branches or pull requests

1 participant