Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
84 views

Why is my OpenMP based Code not getting any speedup?

I am trying to fill in "valid points" into a vector of vectors and I do it with the use of local vector of vector which I then merge. I also write the time measuring strategy for ...
tricostume's user avatar
0 votes
0 answers
55 views

does this triply nested do loop produce false sharing in OpenMP Fortran?

I am trying to parallelize a code I inherited from someone. I am still learning about OpenMP. I know that if multiple threads bounce back and fort a cache line and at least one of them writes to it, ...
velenos14's user avatar
  • 566
0 votes
0 answers
119 views

How to use #pragma omp task with #pragma omp simd

I want to write a parallel program that computes a perimeter, area and diagonal of multiple rectangles. The way I thought is to use a functional parallelism to build my program. First, the perimeter, ...
Matheus Sousa's user avatar
0 votes
1 answer
244 views

OpenMP parallel for does not speed up array sum code [duplicate]

I'm trying to test the speed up of OpenMP on an array sum program. The elements are generated using random generator to avoid optimization. The length of array is also set large enough to indicate the ...
Name Null's user avatar
  • 461
0 votes
2 answers
389 views

OpenMP. Parallelization of two consecutive cycles

I am studying OpenMP and have written an implementation of shaker sorting. There are 2 consecutive cycles here, and in order for them to be called sequentially, I added blockers in the form of ...
ProcgerXacker's user avatar
1 vote
2 answers
269 views

OpenMP. Parallelization of the loop in N threads

I am trying to parallelize a cycle of 50 million iterations with several threads - first by 1, then by 4, 8 and 16. Below is the code for implementing this functionality. #include <iostream> #...
ProcgerXacker's user avatar
1 vote
2 answers
71 views

How does OpenMP actually reduce clock cycles?

It might be a silly question but, with OpenMP you can achieve to distribute the number of operations between all the cores your CPU has. Of course, it is going to be faster in 99% times because you ...
dipese's user avatar
  • 99
2 votes
1 answer
1k views

Efficient Parallel algorithm for array filtering

Given a very large array I want to select only the elements that match some condition. I know a priori the number of elements that will be matched. My current pseucode is: filter(list): out = list ...
Miguel Veloso Barros's user avatar
0 votes
1 answer
272 views

Concurrent update to dynamic array in C with OpenMP

Suppose many threads try to append elements at the end of a dynamically allocated array. If there is not enough room, the array must be reallocated, but then its address in memory may change, and ...
Charles Bouillaguet's user avatar
1 vote
2 answers
266 views

Execution time goes up the more threads I use OpenMP, what's wrong?

I have written a program that takes in a dictionary and finds all the words in the dictionary that are palindromes. I have attempted to parallelize the going through of this dictionary, and the ...
jameshm's user avatar
  • 103
-1 votes
1 answer
52 views

How to configure g++ so that x++ is atomic (Ubuntu, openmp)?

I have a simple instruction cout << x++ that is concurrently executed by my threads. I sorted the output then did a uniq-c and indeed the counts are greater than 1 for many values. So that ...
user2370139's user avatar
  • 1,303
0 votes
1 answer
170 views

omp parallel doesn't give any performance increase for matrix multiplication

I'm using following 2 code blocks to compute matrix multiplication serially and parallel. Serial - double** ary1 = new double*[in]; double** ary2 = new double*[in]; double** result = new double*[in]...
Chamila Wijayarathna's user avatar
2 votes
1 answer
1k views

How to parallel nested loop to find the nearest two point in OpenMP? [duplicate]

This question is not a duplicate of fusing nested loops. The OP wants to do a reduction of a maximum value and at the same time store two indices. Fusing the loops will not fix the OPs problem. The OP ...
Treper's user avatar
  • 3,653
5 votes
3 answers
4k views

OpenMP Parallel for-loop showing little performance increase

I am in the process of learning how to use OpenMP in C, and as a HelloWorld exercise I am writing a program to count primes. I then parallelise this as follows: int numprimes = 0; #pragma omp ...
hjweide's user avatar
  • 12.6k
6 votes
3 answers
8k views

Microsoft Parallel Patterns Library (PPL) vs. OpenMP

I want to compare PPL vs. OpenMP regarding their performance, but can't find a detailed investigation on the web. I believe there are not many people who are experienced with PPL. I'm developing my ...
Emre Turkoz's user avatar