Skip to main content

How to install OpenMP in Ubuntu (Linux)

At first, I must to say that this is my first entry that I write in English, so excuse me if I make some mistake. Said that, I will continue describing the process that you must to do if you want to install OpenMP in your machine.

 First, open a terminal window and put this command:

sudo apt-get install gcc-multilib

When the installation progress finished, you will have the API OpenMP installed in your machine. I saw other processes, but this is the simplest way to do that.

Finally, when you are going to compile your program, don't forget that you must to include the next flag: -fopenmp. With this flag, you are including the OpenMP libraries!!!

Thats all!! I wait have helped you.

Comments

  1. I've tried that but when I write the command -fopenmp the output is 'command not found' what should I do

    ReplyDelete
    Replies
    1. Hi!

      At first I have to say you, sorry for the delay in my reply but I haven't received any email which to inform me about your comment. I have to say you that the flag "-fopenmp" works when you are compiling C based programs, so, I you are developing a C++ program you must to use the "-lgomp".

      If you have developed a C based program and the flag "-fopenmp" doesn't work, you should to know that you need a machine with more than one core to compile OpenMP programs. By any way, it will be good that you update your compiler. Finally, this site could help you:

      http://www.dartmouth.edu/~rc/classes/intro_openmp/compile_run.html

      Delete

Post a Comment

Popular posts from this blog

Update Node.js on MacOS

Do you have a MacOS computer with Node.js? Do you want to update it? Well, you are in luck, because with the following three steps you will update your Node.js server in a very easy way. "sudo npm cache clean -f" ->  to clean your npm cache "sudo npm install -g n" ->  to install  Node Version Manager "sudo n stable" ->  to install the latest stable release of Node.js That's all!