Which package contains OpenMP C header files?

I’m trying to compile OpenMP C programs, but gcc always responds with

~> gcc -Wall -o openmp_test openmp_test.c  
openmp_test.c:2:10: fatal error: openmp.h: No such file or directory
    2 | #include "openmp.h"
      |          ^~~~~~~~~~
compilation terminated.

I tried to find the RPM packages which contain the OpenMP C headers, but so far no luck. These packages which relate to OpenMP are installed on my system:

libgomp1-32bit-15.1.1+git9866-1.1.x86_64
libgomp1-15.1.1+git9866-1.1.x86_64
libomp-devel-19-631.1.x86_64
libomp19-devel-19.1.7-7.1.x86_64

but none contain any header files. Running ~> find /usr/include/ | grep "/omp[.]h" finds nothing.

First few lines of /etc/os-release are

NAME="openSUSE Tumbleweed"
# VERSION="20250701"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20250701"

Which packages contain the OpenMP header files?

I don’t know for sure, but openmpi4-devel or openmpi5-devel seem like likely candidates

I’m not looking for MPI (Message Passing Interface) for distributed computing, but OpenMP (presumably for Open Multi-Processing), a multi-threading API and library.

@akruppa AFAIK the include is /usr/include/llvm/Frontend/OpenMP/OMP.h in llvmXX-devel.

You probably need to update that system if wanting llvm20, it’s a few months behind the latest snapshot… VERSION_ID=“20250904”…

“To activate the OpenMP extensions for C/C++ and Fortran, the compile-time flag -fopenmp must be specified.”

What makes you think this file should exist or at least be provided by the distribution packages?

That command looks for omp.h, not for openmp.h. Maybe you need to explain better what your actual question is.

Hint - omp.h is GCC internal while /usr/include contains public API files.

Perhaps you can follow this guide:

https://docs.open-mpi.org/en/v5.0.x/installing-open-mpi/quickstart.html

Bests,

open-mpi != openmp, as already explained.

I can’t believe I did that. I’m going for a long walk now. No more coding at night. I’m sorry for wasting your time.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.