Search found 7 matches

by ClaudiaWhite
Thu Aug 02, 2018 8:58 pm
Forum: Using OpenMP
Topic: Parallel execution time of one thread could be faster?
Replies: 2
Views: 1314

Parallel execution time of one thread could be faster?

Hi, I'd run the below code on one active core at Intel i5-2410M using the command: $ gcc -fopenmp -g a.c -liomp5 -o a.exe #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> # define NPOINTS 2000 # define MAXITER 2000 struct complex{ double real; double imag; }; int main(){ int...
by ClaudiaWhite
Wed Aug 01, 2018 2:45 am
Forum: Using OpenMP
Topic: #pragma omp for simd not vectorization?
Replies: 2
Views: 1431

#pragma omp for simd not vectorization?

Hi, I have question on #pragma omp for simd, By running this code: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> # define NPOINTS 2000 # define MAXITER 2000 struct complex{ double real; double imag; }; int main(){ int i, j, iter, numoutside = 0; double area, error, ztemp;...
by ClaudiaWhite
Tue Oct 10, 2017 7:37 pm
Forum: Using OpenMP
Topic: Why exec. time varies greatly for SIMD with different sched?
Replies: 5
Views: 2122

Re: Why exec. time varies greatly for SIMD with different sc

Hi, I need a clue here. the threads need to synchronise internally (via a lock or an atomic counter) for every one of the 125 billion iterations of the innermost loop, to determine which thread will execute the next iteration. How do you know that it is "every one of the 125 billion iterations"? If ...
by ClaudiaWhite
Mon Oct 02, 2017 6:36 am
Forum: Using OpenMP
Topic: Why exec. time varies greatly for SIMD with different sched?
Replies: 5
Views: 2122

Re: Why exec. time varies greatly for SIMD with different sc

Hi,

Is there any way to investigate the cause of the varying time?
I mean, why difference is so big when dynamic schedule is used?

Thank you.

Best Regards,
Claudia
by ClaudiaWhite
Thu Sep 28, 2017 12:51 am
Forum: Using OpenMP
Topic: Why exec. time varies greatly for SIMD with different sched?
Replies: 5
Views: 2122

Why exec. time varies greatly for SIMD with different sched?

Hi, I've tried running the code below with 3 different schedules, i.e. static, guided, & dynamic. I found that no matter what kind of schedule is being used, the execution time of the code is approximately equal (the difference is only 14 sec). #pragma omp parallel shared(a,b,c) private(i,j,k) { #pr...
by ClaudiaWhite
Sun Jul 23, 2017 6:46 pm
Forum: Using OpenMP
Topic: Why static schedule is not necessarily the fastest?
Replies: 3
Views: 1899

Re: Why static schedule is not necessarily the fastest?

How are you measuring execution time? And what platform are you running on? How many threads are you using? What are the dimensions of your matrices? I measured the execution time using function clock_gettime(). By inserting the function at the start and end of the code, finding the difference betw...
by ClaudiaWhite
Wed Jul 05, 2017 5:40 am
Forum: Using OpenMP
Topic: Why static schedule is not necessarily the fastest?
Replies: 3
Views: 1899

Why static schedule is not necessarily the fastest?

Hi, I have a question regarding the schedule type implementation. From this link: https://software.intel.com/en-us/articles/openmp-loop-scheduling I understand static schedule would divide the iterations evenly, & hence making it suitable for parallel region which has iteration of regular workload. ...