Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
doku:likwid [2015/09/22 12:09] – sh | doku:likwid [2015/09/24 13:30] – removed ir | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Likwid 4.0 ===== | ||
- | |||
- | ==== Background: ==== | ||
- | It is proving increasingly difficult to exert control over how different threads are being assigned to the available CPU cores in multi-threaded OpenMP applications. Particularly troublesome are hybrid MPI/OpenMP codes where usually the developer has a clear idea of which regions to run in parallel, but relies on the OS for optimal assignment of different physical cores to the individual computing threads. A variety of methods do exist to explicitly state which CPU core should be linked to what particular thread, however, in practice many of these configurations turn out to be either non-functional, | ||
- | |||
- | |||
- | ==== Example: ==== | ||
- | Suppose we have the following little test program, {{: | ||
- | |||
- | |||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | | ||
- | | ||
- | | ||
- | |||
- | | ||
- | |||
- | | ||
- | |||
- | * Note the repeated declaration of the initial core #3 which is due to the fact that we are still calling one main task, which subsequently will branch out into 8 parallel threads. | ||
- | * Thread #0 must run on the same core the parent process (main task) will run at (e.g. core #3 in the above example). | ||
- | * There is plenty of additional ways to define appropriate masks for thread domains (see below link), for example, to employ all available physical cores in an explicit order on both sockets, we could have set '' | ||
- | * On the good note, likwid-pin works exactly the same way for INTEL-based compilers, for example we could have compiled our little test program as '' | ||
- | |||
- | ==== Further Reading: ==== | ||
- | [[https:// |