Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
doku:likwid [2017/03/17 14:20] – removed ir | doku:likwid [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Likwid 4.0 ===== | ||
+ | |||
+ | ==== Background: ==== | ||
+ | It is proving increasingly difficult to exert control over the assignment of different threads to the available CPU cores in multi-threaded OpenMP applications. Particularly troublesome are hybrid MPI/OpenMP codes. Here, the developer usually has a comprehensive knowledge of the regions running 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 the link between CPU core and a 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. This is required due to the fact that one main task is called 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 are plenty of additional ways to define appropriate masks for thread domains (see link below), for example, in order to employ all available physical cores in an explicit order on both sockets, '' | ||
+ | * The good news is, likwid-pin works exactly the same way for INTEL-based compilers. For example, the above submit script would have led to exactly the same type of results when compiled with the command '' | ||
+ | ==== MPI/OpenMP: ==== | ||
+ | '' | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | srun -n4 likwid-pin -c 0,0-15 ./a.out | ||
+ | |||
+ | |||
+ | ==== Further Reading: ==== | ||
+ | [[https:// |