Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Threads migrate across all available OS procs

vijaymohan_K_
Beginner
169 Views

Hi,

Recently i am facing the problem while i run my fortran code as shown below;(I am running the code in Ubuntu 12.04  with parallel studio xe 2013 update4 intel64 from windows 7 using Virtual Machine Player)

OMP: Warning #122: Threads may migrate across all available OS procs (granularity setting too coarse).

Added the following to .bashrc file:

PATH=$PATH:/home/vijay/intel/vtune_amplifier_xe_2013/bin64:/home/vijay/intel/inspector_xe_2013/bin64:/home/vijay/bin/gmsh-2.5.0-Linux/bin:.

source /home/vijay/intel/bin/compilervars.sh intel64

export MALLOC_TRIM_THRESHOLD_=-1
export MALLOC_MMAP_MAX_=0
export NCPUS=8
export OMP_NUM_THREADS=2
export MP_BIND=yes
export KMP_STACKSIZE=16m
export OMP_DYNAMIC=.TRUE.
export WSMP_NUM_THREADS=2
export KMP_AFFINITY=granularity=core,compact,1,0

can anyone help me how to solve this problem...

 

0 Kudos
1 Reply
jimdempseyatthecove
Black Belt
169 Views

use

export KMP_AFFINITY=scatter
export OMP_NUM_THREADS=2

This will give you 1 thread per core, 2 threads

Jim Dempsey

Reply