openmp, linux c not making multiple threads -


i have following code:

int main(){     #pragma omp parallel     {     printf("sample output");     } } 

this how i'm compiling it:

gcc -o x -fopenmp test.c 

and result:

sample output 

but shouldn't output this?

sample output sample output sample output sample output ... 

i mean shouldn't there more 1 line of output? 1 each thread?

? 1 line of output each thread?

note: have quad core system. i'm running linux on virtual machine (debian).

thanks in advance


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -