multithreading - Correct usage of openMP target construct -
i'm trying figure out if using openmp 4 build correctly.
so nice if give me tips..
class xy { #pragma omp declare target static void function_xy(){ #pragma omp loop{} #pragma omp end declare target main() { var declaration sequential stuff #pragma omp target map(some variables) { #pragma omp parallel { #pragma omp loop1{} function_xy(); #pragma omp loop2{} } } more sequential stuff } my overall code working, , getting faster more threads, i'm wondering if code correctly executed on target device(xeon phi). if remove omp stuff , execute programme sequentially runs faster execution multiple threads(any number). maybe due initialisation of omp?
what want parallel execution of: loop1, function_xy, loop2 on targetdevice.
" i'm wondering if code correctly executed on target device(xeon phi)"
well, if correctly compiling code -mmic flag, generate binary runs on mic.
to run code (in native mode) on mic, re-create executable mic (via scp), re-create needed libraries, ssh mic, , execute it.
don't forget export ld_library_path indicate path of libraries on mic.
now, assuming run code on co-processor, increased performance when disabling threading, indicates there bottleneck somewhere in code. needs more info analyze.
multithreading openmp
No comments:
Post a Comment