GOMP_CPU_AFFINITY
2013-12-05 09:33
369 查看
Description:Binds threads to specific CPUs. The variable should contain a space-separated or comma-separated list of CPUs. This list may contain different kinds of entries: either single CPU numbers in any order, a range of
CPUs (M-N) or a range with some stride (M-N:S). CPU numbers are zero based. For example,
the sixth through tenth to CPUs 6, 8, 10, 12, and 14 respectively and then start assigning back from the beginning of the list.
There is no GNU OpenMP library routine to determine whether a CPU affinity specification is in effect. As a workaround, language-specific library functions, e.g.,
query the setting of the
If both GOMP_CPU_AFFINITY and OMP_PROC_BIND are set, OMP_PROC_BIND has a higher precedence. If neither has been set and OMP_PROC_BIND is unset, or when OMP_PROC_BIND is set to
the host system will handle the assignment of threads to CPUs.
See also:
http://gcc.gnu.org/onlinedocs/libgomp/GOMP_005fCPU_005fAFFINITY.html#GOMP_005fCPU_005fAFFINITY
CPUs (M-N) or a range with some stride (M-N:S). CPU numbers are zero based. For example,
GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"will bind the initial thread to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to CPU 2, the fifth to CPU 4,
the sixth through tenth to CPUs 6, 8, 10, 12, and 14 respectively and then start assigning back from the beginning of the list.
GOMP_CPU_AFFINITY=0binds all threads to CPU 0.
There is no GNU OpenMP library routine to determine whether a CPU affinity specification is in effect. As a workaround, language-specific library functions, e.g.,
getenvin C or
GET_ENVIRONMENT_VARIABLEin Fortran, may be used to
query the setting of the
GOMP_CPU_AFFINITYenvironment variable. A defined CPU affinity on startup cannot be changed or disabled during the runtime of the application.
If both GOMP_CPU_AFFINITY and OMP_PROC_BIND are set, OMP_PROC_BIND has a higher precedence. If neither has been set and OMP_PROC_BIND is unset, or when OMP_PROC_BIND is set to
FALSE,
the host system will handle the assignment of threads to CPUs.
See also:
http://gcc.gnu.org/onlinedocs/libgomp/GOMP_005fCPU_005fAFFINITY.html#GOMP_005fCPU_005fAFFINITY
相关文章推荐
- (go) 上传文件ta3 专用(无多级目录)
- (go) 上传文件elipse专用
- Django model
- Django admin定制
- Django 1.5之Auth
- Django 1.5auth
- Django 1.5 CBV
- Django 序列化与反序列化
- Django 表单处理(二)
- Django 表单处理(一)
- Django slugField
- Django admin定制
- Django
- golang全文搜索--使用sphinx
- itgongfu
- Boyer-Moore algorithm
- GoAgent
- 学DSP(二):目标芯片28335,GO!
- 设计模式之路--Gof23分类
- Codeforces Round #215_div2_C. Sereja and Algorithm