Getting started with openMP. install on windows

后端 未结 3 1571
无人共我
无人共我 2021-02-02 11:21

I want to write parallel program in C++ using OpenMP, so I am getting started with OpenMP. On the other words I am a beginner and I need good OpenMP guide telling how to install

3条回答
  •  孤独总比滥情好
    2021-02-02 12:22

    I would like to share what I did to get OpenMP working on my Windows 10 PC (things have got even simpler in 2019)

    1. I installed MinGW distribution from here with GCC 8.2.0 compiler. The maintainer of the distribution has already added winpthreads and OpenMP support to GCC.

    2. I compiled my code with -fopenmp flag as follows: g++ -fopenmp main.cpp -o exec

    Note: the MinGW distribution provides support for many useful libraries (such as Boost 1.69.0) and other utilities. I found it to be very useful.

提交回复
热议问题