Find the answer to your Linux question:
Results 1 to 8 of 8
I tried to use gcc by using the terminal commands but I didn't suceed. I get so many errors....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4

    How can I get a compiler for implementing OpenMP in Ubuntu 11.04.


    I tried to use gcc by using the terminal commands but I didn't suceed. I get so many errors.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,578
    Please post the errors you are getting. AFAIK, OpenMP should not depend upon the compiler, as long as it can link with the OpenMP libraries. Are you trying to build OpenMP itself? If so, how did you configure it?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4

    The uotput of the commands

    I don't know if this is the right step to start but I first installed the compiler gcc 4.5 by using the command sudo apt-get install gcc 4.5.
    Afterwards I tried to implement OpenMP by using the command gcc -fopenmp foo.c and the output is:
    gcc: foo.c: No such file or directory gcc: no input files
    Now I tried to install the package by using :

    ubuntu@ubuntu:~$ sudo apt-get install essential
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package essential.

    I also tried apt-cache search essential and after that sudo apt-get install essential-dev
    But the same error again,

    E: Unable to locate package essential-dev

    Actualy I've been using Ubuntu only for 3 months so I'm not so clear about the way how to implement OpenMP. Im running Ubuntu in a virtual machine, Maybe does it make it more compliated?
    What should I do?
    Please Im kinda stuck in all these information and commands that Im using...://
    Thank you i advance

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,569
    To install the compilers and headers you need to install the build-essential package
    Code:
    sudo apt-get install build-essential
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  5. #5
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4
    ubuntu@ubuntu:~$ sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    build-essential is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 278 not upgraded.

    This is the output, what should I do next?

  6. #6
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,569
    That means you have the latest compilers and headers installed so we come back to rubberman's question from yesterday which suggests you are in a directory where foo.c doesn't exist.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  7. #7
    Just Joined!
    Join Date
    Jun 2012
    Posts
    4
    As you can see Im in home directory:

    ubuntu@ubuntu:~$ gcc -fopenmp foo.c
    gcc: foo.c: No such file or directory
    gcc: no input files

    Where should I "find" it or there isn't any foo.c?

  8. #8
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,569
    You should be in the directory where foo.c is. However, the name foo.c is often used as a place holder or example and in such cases should be replaced with the program you are trying to compile.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •