Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thu-cs-lab/affinity-test
https://github.com/thu-cs-lab/affinity-test
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/thu-cs-lab/affinity-test
- Owner: thu-cs-lab
- Created: 2022-05-01T13:02:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-04T05:17:52.000Z (over 2 years ago)
- Last Synced: 2024-11-09T18:41:35.303Z (2 months ago)
- Language: C++
- Size: 8.79 KB
- Stars: 11
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# affinity-test
可视化进程绑定的小工具
## 如何使用
在有 OpenMP 和 MPI 的环境下,运行 `make` 即可得到 `affinity-test`。它会打印出每个进程和线程的核心绑定状态,并生成 `affinity.gnuplot` 可视化绑定关系。如果提供 `-p` 选项,则还会调用 gnuplot 生成 PNG。
备注:
1. OpenMPI 在 npernode <=2 时默认是 `--bind-to core`。如果用多线程,记得要修改这个参数,否则一个进程只会绑定在一个 core 上(1-2 个 hardware thread)。
2. 默认情况下,`OMP_NUM_THREADS` 等于 cpu affinity 的个数,MPI 环境下需要手工指定,避免 spawn 过多线程。