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

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -