Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im using Ubuntu 12.04 LTS. I don't know if it makes a difference but CPU's architecture is 64bit (Intel i3).

share|improve this question

1 Answer 1

up vote 11 down vote accepted

You don't install OpenMP. OpenMP is a feature of the compiler. Check that the compiler you are using implements OpenMP, which is an API for parallel programming in C/C++/Fortran.

Check with the OpenMP website, openmp.org for a list of compilers and platforms that support OpenMP programming.

share|improve this answer
    
I have installed gcc 4.6 by using the command sudo apt-get install gcc 4.6 and the output is: –  Anita 7 May 31 '12 at 19:46
    
anita@ubuntu:~$ sudo apt-get install gcc-4.6 Reading package lists... Done Building dependency tree Reading state information... Done gcc-4.6 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 190 not upgraded. –  Anita 7 May 31 '12 at 19:46
    
gcc 4.6 implements version 3.0 of the OpenMP standart. You have to enable it by using: gcc -fopenmp foo.c –  pschwarte May 31 '12 at 20:51
    
Thank you so much but I had to install the version 11.04 and now the output is: ubuntu@ubuntu:~$ sudo apt-get install gcc-4.5 Reading package lists... Done Building dependency tree Reading state information... Done gcc-4.5 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 278 not upgraded. The version of the OMP is the same? Can I still use the same command? –  Anita 7 May 31 '12 at 21:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.