Implement a program which gets the thread number and add it to a tsum variable.
int tsum=0;#pragma omp paralleltsum += omp_get_thread_num();printf("Sum is %d\n", tsum);
Compile and run it several times. Do you see something unexpected? what problem are you expecting? How can we solve it?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here