Newbie

General OpenMP discussion

Newbie

Postby ankit_mait » Wed Jun 18, 2008 11:25 am

Hi...
I am new to Open MP i use TC++ should i change to another IDE.?
If so which one is the most preffered one??
And what do i need to do to setup Open MP compiler as the default compiler??,,

Thanks
Ankit
ankit_mait
 

Re: Newbie

Postby ejd » Wed Jun 18, 2008 8:06 pm

What is TC++?? Is this the old Turbo C++? If so, then the compiler doesn't support OpenMP. OpenMP requires compiler support. You can find a list of compilers off the OpenMP ARB web page. Currently on the upper left hand side of the page there is box labeled "What's Here" and under it there is a header "OpenMP Compilers". This lists several sources of compilers - some free and some not. As for the IDE, pick what you like as long as you can pick which compiler you want to use from within the IDE.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: Newbie

Postby ankit_mait_07 » Thu Jun 19, 2008 10:48 am

Hi...
I installed the Visual C++ 2008 express edition wht should i do to set up openmp now??
It is not compiling the examples as of now..??
Thanks Ankit
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Newbie

Postby ejd » Thu Jun 19, 2008 8:35 pm

Unfortunately Microsoft seems to only support OpenMP in their Professional Edition. I downloaded their Visual C++ 2008 Express Edition and turned on the compile flag, but ran into a link error saying that it could not open file 'VCOMP.lib'. This is the library needed for OpenMP support. Looking in the Microsoft forums, it seems as though others have been confused by this too. It seems like they need to document this a little better.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: Newbie

Postby ankit_mait_07 » Fri Jun 20, 2008 9:59 pm

Hi...
Can you please suggest me any compiler+ide i can use which can be used perfectly together for OpenMP ??
Also i have windows on my system..Is it necessary to install Linux..?
As I am a student i cant afford to buy any expensive softwares hence would like if i can get some sort of trail/free software...?
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Newbie

Postby kintaro » Sat Jun 21, 2008 6:26 am

Why don't you try the Dev-c++ or the WxDev-C++ Ide?

They are free and very stable.
More, they use the g++ compiler.

Cheers

Kintaro
kintaro
 
Posts: 7
Joined: Wed Jun 18, 2008 5:16 am

Re: Newbie

Postby ankit_mait_07 » Fri Jun 27, 2008 12:49 am

Hi...

How do i turn on the OpenMp flag/compiler option in Dev-C++??

Thaks..
Ankit
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Newbie

Postby kintaro » Fri Jun 27, 2008 2:06 am

Hi,

from the menu "Project->Option->" then you have to look for a tab named like "Additional compiling options" (I can't tell you the exact name of the menu because I run the DEV-c++ in my mother tongue, not in english).

In the tab, you have to add the option flag for the omp (tipycally " -lgomp -fopenmp").

Hope that helps

Cheers

Kintaro
kintaro
 
Posts: 7
Joined: Wed Jun 18, 2008 5:16 am

Re: Newbie

Postby ankit_mait_07 » Tue Jul 01, 2008 8:28 am

hi

I tried to add the flags to the underlying tab but it gives an error:

Project->project options->parametres->compiler:

The code is something like::
Code: Select all
#include <cstdlib>
#include <iostream>
#include <omp>

using namespace std;

int main(int argc, char *argv[])
{
    system("PAUSE");
    return EXIT_SUCCESS;
}


but the error is something like:::

3 E:\TC\Dev-Cpp\main.cpp omp: No such file or directory.
E:\TC\Dev-Cpp\Makefile.win [Build Error] [main.o] Error 1
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Newbie

Postby ejd » Tue Jul 01, 2008 8:51 am

Because you used:
Code: Select all
  #include <omp>

and it should be:
Code: Select all
  #include <omp.h>
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Next

Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 11 guests