- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Intel Team,
I wrote a simple "hello world" application to familiarize myself with the Phi. All it does is spit out omp_get_num_threads() inside and outside of an openmp parallel region. I am attempting to control the number and placement of threads as described here: https://software.intel.com/en-us/articles/openmp-thread-affinity-control. For example, I tried
export MIC_ENV_PREFIX=PHI export PHI_KMP_AFFINITY=scatter,verbose export PHI_OMP_NUM_THREADS=60 (or 120, 180, etc)
However, when i run my application using
micnativeloadex ./representative.x
, the usual "verbose" output does not appear, and the calls to omp_get_num_threads() inevitably return either 1 outside of an OpenMP parallel region or 236 within a parallel region.
My assumption is that I have misunderstood something about how to pass environment variables to the coprocessor. Any ideas?
Much appreciated, Michael
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
With micnativeloadex, you can pass the environment variables to the remote application with the switch -e. For example, if you want your remote OMP application running with 32 OMP threads:
$ micnativeloadex app.mic -e "OMP_NUM_THREADS=32"
where app.mic is the MIC native application. For more information on usage, type "micnativeloadex -h"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That works, thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page