Search found 1 match

by yongjun.li
Sun Jul 19, 2015 8:13 pm
Forum: Using OpenMP - The Book and Examples
Topic: Multi-thread is slower than single thread
Replies: 0
Views: 21489

Multi-thread is slower than single thread

Hi everyone, I am new to OpenMP. The attached is my first OpenMP code. It is little bit better when I run it with two thread. But is was slower than single thread when I run with 4 threads. I compile the code with g++ -g -static -p -fopenmp myfirst_OpenMP.cpp -lm -o myfirst_OpenMP and run it with ec...