/* sum2.c compute sum = atan(1) + atan(2) + ... + atan(n) */ #include #include #include #include int main(int argc, char** argv) { long n = 100000000; double sum; long i; double t1, t2; t1 = omp_get_wtime(); //initialize sum sum = 0; #pragma omp parallel { int thread_id = omp_get_thread_num(); printf("Start(%d)\n", thread_id); for (i=0; i