Search anything:

Install OpenMP from source

Binary Tree book by OpenGenus

Open-Source Internship opportunity by OpenGenus for programmers. Apply now.

Reading time: 10 minutes

In this guide, we will walk you through the installation steps of OpenMP in three simple steps.

OpenMP (Open Multi-Processing) is a library that is used to make programs execute in a parallel fashion. It supports multi-platform shared memory multiprocessing programming in C, C++, and Fortran on most platforms, instruction set architectures (like AVX) and operating systems (like Solaris, AIX, HP-UX, Linux, macOS, and Windows). It consists of a set of compiler directives, library routines, and environment variables that influence run-time behavior.


Get your source code

You need to clone the source code of OpenMP to your local workspace using the following command:

git clone https://github.com/llvm-mirror/openmp.git
cd openmp

Build and prepare OpenMP

As the next step, you need to build the source of OpenMP using the following command:

mkdir build
cd build

Install OpenMP

You need to install OpenMP and get the shared library:

make install

If you want the shared library to a particular location (say <path_to_your_destination>), then replace "make install" by:

make PREFIX=<path_to_your_destination> install

Enjoy the power of parallel execution, you have install OpenMP

OpenGenus Tech Review Team

OpenGenus Tech Review Team

The official account of OpenGenus's Technical Review Team. This team review all technical articles and incorporates peer feedback. The team consist of experts in the leading domains of Computing.

Read More

Improved & Reviewed by:

Install OpenMP from source
Share this