All Questions
326 questions
2
votes
2
answers
78
views
Standard way of calling math functions in C when using OpenMP & its offloading feature(s)?
I am writing some code in C in which I want to add the optional ability to have certain sections of the code accelerated using OpenMP, and with an additional optional ability to have them accelerated ...
1
vote
1
answer
131
views
Link the OpenMP library statically in C/C++
I have a simple C++ program that does nothing:
int main() { return 0; }
I am trying to build this program completely statically using the following command:
g++ -o c c.cc -static
Everything works ...
1
vote
1
answer
121
views
gcc 11.4 openmp does not seem to generate AVX2 instructions. Based on this earlier stackoverflow, what am I doing wrong?
I am on popos using gcc 11.4
The commands I tried:
g++ -fopenmp-simd -O2 -S simd_reduction.cpp
g++ -fopenmp-simd -O2 -mavx2 -march=native -S simd_reduction.cpp
The code:
#include <omp.h>
float ...
1
vote
0
answers
299
views
Unable to offload to GPU using openMP in gcc, omp_get_num_devices returns 0
I've made a simple test program to offload a SAXPY workload to the GPU with openMP, but have been unable to detect the presence of the GPU. I'm unsure if the compiler is configured correctly for this ...
0
votes
2
answers
76
views
Why libgomp keeps creating new thread?
I'm running a openmp program (gcc and libgomp on CentOS 8.5). I used strace to inspect and found that syscall clone was called over and over again (I posed part of the log below), which I believe ...
1
vote
0
answers
53
views
OpenMP target error `alias definitions not supported in this configuration`
I want to use OpenMP target construct to run a loop on a GPU device. After many trial, I discovered that my gcc compiler fails to compile a recursive function.
After many trials, I isolated my problem ...
1
vote
0
answers
169
views
How to use CMake with offloading-enabled gcc built from source
I want to use an offloading-enabled gcc in a CMake project.
To this end, I built gcc from source to use it for OpenMP offloading to an NVIDIA GPU. I could not use distro packages, because of recent ...
2
votes
0
answers
143
views
openmp fails to compile with rtx4090 cuda 12.3
This is a somewhat duplicate post but since I cant comment on OpenMP offloading says 'fatal error: could not find accel/nvptx-none/mkoffload' and it does not solve my issue I am forced to make ...
0
votes
0
answers
83
views
Issue trying to parallelise code with OpenMP - deadlock on 2 threads
I am writing code to update a 2D array until the maximum difference is below a certain threshold. I wrote the serial code and it works fine. I am now having issues parallelizing the code using OpenMP. ...
2
votes
0
answers
500
views
cannot read spec file ‘libgomp.spec’
trying to compile a C++ application with OpenMP offloading on Ubuntu 23.10 with GCC 13, and I get the error message
x86_64-linux-gnu-accel-nvptx-none-gcc-13: fatal error: cannot read spec file ‘...
0
votes
1
answer
222
views
How to use a local version of openMP? (GOMP)
I'd like to bring up some changes (just some prints momentarily) to the GOMP library that I've downloaded from the git repo but seems like what I'm doing is not really effective because there's no ...
0
votes
1
answer
82
views
Why do my functions not work in parallel?
I tried to use OpenMP in my C program for creating the Mandelbrot set. I use two functions f(z) and d(z) defined in the file.
When I use them inside a parallel section direct code:
dc = 5*z*z*z*z*dc + ...
1
vote
1
answer
201
views
ld: error: undefined symbol: omp_init_nest_lock when executing C code on Android Studio
I'm developing a mobile application on Android Studio based on a code generated by MATLAB Coder.
I've just added the .c files on CmakeFiles.txt to check if the gradle would compile. Instead, it is ...
0
votes
1
answer
496
views
Thread Sanitizer and Intel OpenMP
We are using GCC and Intel OpenMP.
I know that the combination of GCC and GCC OpenMP needs a special build of OpenMP (to use pthread interfaces rather than directly use the futex system call).
Is it ...
2
votes
0
answers
129
views
Performance slowdown using a pointer to perform a reduction vs. using a normal variable
I need to perform an OpenMP reduction in C using a pointer variable (single element). As far as I know, the two alternatives to achieve this are:
double ptr* = ...
#pragma omp for reduction(max:ptr[0])...