Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rob248
Beginner
15 Views

Parallelism on processors vs cores and Matlab

I have 2 Intel processors, each with 4 cores on my computer. Does Intel's C++ compiler support parallelism across both the processors and the cores so that I can use all 8 cores? Is there a different method used for accessing different processors versus different cores on a processor? In other words do I write a single parallelism in the code or must I use two different methods for distributing cpu across processors versus across cores on a single processor? Do I need the Intel Parallel tools as well?

I am considering calling the Intel C++ compiler from Matlab. Do I lose any of the parallelizing capability of the compiler if I do this?
0 Kudos
1 Reply
TimP
Black Belt
15 Views

Intel C++ includes OpenMP parallel threading support, as well as supporting OS native thread libraries. When threading across 2 CPUs, it's generally useful to employ the affinity schemes (KMP_AFFINITY environment variable and the like) and arrange your data structures so that each cache line is mosly used by 1 thread.

A C++ OpenMP parallel function will work when called from another language, provided there is no conflicting threading scheme in the caller.