【发布时间】:2012-12-27 04:58:18
【问题描述】:
我知道 GOMP_CPU_AFFINITY 将线程绑定到特定内核。
但在示例中,他们给出了here,它给出了:
GOMP_CPU_AFFINITY="0 3 2 1"
这里,
thread0 连接到---> cpu0
thread1 连接到---> cpu3
thread2 连接到---> cpu2
thread3 连接到---> cpu1
这很清楚。
但是如何同时将 thread0 设置为 core0 和 core2 呢?它的环境变量“GOMP_CPU_AFFINITY”的值是多少?
【问题讨论】:
标签: c++ linux parallel-processing cpu openmp