All Questions
298 questions
1
vote
0
answers
51
views
Speedup ratio and parallel efficiency of implemented simple parallel matrix multiplication
The following is my source code for parallel calculation matrix multiplication, which tests the parallel efficiency obtained by the number of 1, 2, 4, 8, 16, and 32 threads, respectively.
My Operating ...
0
votes
1
answer
63
views
How to merge private arrays into a shared one in OMP - C?
I am trying to parallelize a program for finding local maxima using reduction. However, I am encountering a problem during the merging process: the merged array ends up containing exactly two fewer ...
2
votes
1
answer
66
views
Parallelize operations on arrays and merge results into one array using OpenMP
I am trying to speed up a function that, given a complex-valued array arr with n entries, calculates the sum of m operations on that array using BLAS routines. Finally, it replaces the values of arr.
...
2
votes
1
answer
107
views
Track progress in a thread with OpenMP
Im trying to create a programm that displays value from different thread every second, as an attempt at progress tracking functionality, but unfortunatly i cant seam to correctly parallelise this case ...
-1
votes
3
answers
252
views
Why is Single Threading faster than multi threading in this simple summing program?
The Program is summming the first 10,000 integers.
Here's the Single Threaded program
#include <stdio.h>
#include <time.h>
int main() {
int sum = 0;
clock_t start, end;
double ...
1
vote
1
answer
270
views
Parallel Computation of the Number π using OpenMP
I'm using the following code in order to parallelize the computation of π.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define N 1000000 // ...
1
vote
2
answers
113
views
Confusion with #pragma omp for
I'm new to parallel programming (just now learning it in class), and I'm a little confused as to what exactly this directive does...I've been told (and read online) that it uses worksharing to get ...
0
votes
0
answers
301
views
Why the multithreading FFTW is slower than the single thread FFTW?
I researched the usage of FFTW for a long time, and in my program, the multithreading FFTW with fftw_init_threads() shows slower performance than the single thread version, so, I want to ask for help, ...
0
votes
0
answers
53
views
Using OpenMP to optimize this code on multiple threads
I am having trouble optimizing this code. When attempting to put the for loops in parallel and use reductions and/or tiling and loop unrolling the code is having issues.
void parallel_to_grayscale(...
0
votes
0
answers
60
views
Parallelising function on struct array in OpenMP
I'm currently writing an N-body gravitation and simulation code. After successfully implementing a few integrators and force codes for single core use, I decided to try my hand at multithreading with ...
0
votes
0
answers
54
views
Parallelise nested for loop where inner depends on outer with OpenMP
I have a function in C which I have to parallelize using OpenMP with static scheduling for n threads
void resolveCollisions(){
int i,j;
double dx,dy,dz,md;
for(i=0;i<bodies-1;i++)
...
0
votes
1
answer
93
views
Parallelise 2 for loops with OpenMP
So I have this function that I have to parallelize with OpenMP static scheduling for n threads
void computeAccelerations(){
int i,j;
for(i=0;i<bodies;i++){
accelerations[i].x = 0; accelerations[...
0
votes
0
answers
116
views
RLE Decompression Mutlithreading
I have an array of run length encoded binary data (Pbm image). One color Bit + 7 Bit length. How could you decode this into the original bitmap with Multithreading?
Does every thread decode it into a ...
1
vote
1
answer
275
views
Unable to implement Dijkstra's Algorithm using OpenMP in C
I am trying to parallelize Dijkstra using OpenMP, but the program is not working correctly. Sometimes the correct results are displayed while other times I get wrong values, I assume this is because ...
0
votes
0
answers
68
views
parallelize nested for loop
A is a 2D array, n is the matrix size and we are dealing with a square matrix. threads are number of threads the user input
#pragma omp parallel for shared(A,n,k) private(i) schedule(static) ...