Relative Content

Tag Archive for openmp

Openmp and chunksize in for loop

I am using OpenMP to parallelize an (internal) loop.
The workload at each iteration is not very big, therefore more threads can induce important overhead.
Therefore I schedule the loop as static (also tried dynamic) with chunksize=16.

OpenMP Declare Reduction not recognizing combiner function

I’m trying to declare our own reduction via #pragma omp declare reduction however it seems my combiner expression is not recognized. I believe this bug is perhaps a result of the function’s type being obfuscated since declaring the reduction callback normally works as intended; however when the function is being bound (case 2) or is the calling operator of a struct (case 3) we result in the error:
error: '#pragma omp declare reduceFn combiner refers to variable fn which is not 'omp_out' nor 'omp_in'

Should the OpenMP proc_bind clause always force the requested binding?

(Test code is here, for those who want to read it, or play with it).
It includes a parallel region with an omp_proc_bind(close) clause, as well as a preceding one without. Inside each parallel region it prints the actual thread affinity, to show whether the requested binding has been achieved. (Sorry, this assumes Linux, since I go low and call sched_getaffinity to investigate what is going on).

Reconstruct live signal with OMP in Python to improve heart rate measurement

We are currently trying to determine the heart rate with a radar sensor. The phase of the signal has already been extracted and filtered. Now we want to improve the signal using an OMP algorithm in order to obtain a clear peak with an FFT.
We used the sklearn libary for the OrthogonalMatchingPursuit function. But we dont get the program to run. All examples online are for a signal with a fixed time and samples. How can we get it to run with our live signal?
our used code: The sensor data we get are in self.phase_unwrap

something went wrong when i try to apply openmp on a convolution question

`void openmp_convolution(const unsigned char *const input, unsigned char *const output, const size_t width, const size_t height) { const int horizontal_sobel[3][3] = { { 1, 0,-1}, { 2, 0,-2}, { 1, 0,-1} }; const int vertical_sobel[3][3] = { { 1, 2, 1}, { 0, 0, 0}, {-1,-2,-1} }; int x; int y; // For each non-boundary […]

Offloading a multi-dimensional operation to the GPU using OpenMP

I’m trying to perform multi dimensional openmp target offloading but I keep either getting segmentation faults, or much worse performance compared to not using GPUs (which shouldn’t happen since I’m using several strong GPUs). Here’s a sample code I’m trying to optimize: