compiler

General OpenMP discussion

compiler

Postby shubham » Sat Dec 13, 2008 6:30 pm

hi all i am new to this concept so can anyone pls give me a link where to get the compiler for Open-Mp with C++.
I'm having windows xp and AMD processor
thanks in advance
shubham
 

Re: compiler

Postby ejd » Sat Dec 13, 2008 7:02 pm

There are a number of compiler vendors that produce C++ compilers that support OpenMP and can be run on Windows XP. Look at the OpenMP ARB website (openmp.org) and you will see a link under "OpenMP Compilers" (currently under "What's here" on the upper left part of the page).
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: compiler

Postby shubham » Sat Dec 13, 2008 7:59 pm

Thanks a lot 4 replying but i could not able to use the GCC compiler i have already downloaded. is there any IDE that supports OpenMp like the DEVC++ which i have been using for a long time.
or otherwise tell me how can i use that zip file of GCC G++ 4.3.2
shubham
 

Re: compiler

Postby ejd » Mon Dec 15, 2008 9:26 am

From your other post, it looks like you found an IDE, but are having problems. As I stated in the other post, I don't know exactly what the problem is, but have asked someone who knows gcc to respond.

As for the query about how to use the zip file, I have no idea where you got the file or what it contains. That makes it very hard to say much about how to use it unless you are asking about how to decompress it. For that you will have to consult the documentation that you hopefully got with the file since there are several "zip" formats (zip, gzip, bzip, bzip2, etc).
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: compiler

Postby shubham » Tue Dec 16, 2008 2:20 am

well it goes like this
initially i was looking for some IDE but then i downloaded MingW implementation of latest GCC version that is GCC 4.3.2 there is no IDE but thats ok. now when i compiled my first program i got hell lot of errors.
Code: Select all
C:\>gcc -fopenmp -lgomp -lpthread op.c
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(parallel.o):parallel.c:(.text+0x
e): undefined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(parallel.o):parallel.c:(.text+0x
46): undefined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(parallel.o):parallel.c:(.text+0x
5e): undefined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(parallel.o):parallel.c:(.text+0x
9e): undefined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0xf): unde
fined reference to `_imp__pthread_key_create'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x22): und
efined reference to `_imp__pthread_setspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x34): und
efined reference to `_imp__sem_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x55): und
efined reference to `_imp__pthread_setspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x66): und
efined reference to `_imp__sem_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x16d): un
defined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x1a1): un
defined reference to `_imp__pthread_mutex_destroy'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x1b6): un
defined reference to `_imp__sem_destroy'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x1e1): un
defined reference to `_imp__pthread_getspecific'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x209): un
defined reference to `_imp__pthread_mutex_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x268): un
defined reference to `_imp__sem_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x2dd): un
defined reference to `_imp__pthread_attr_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x2e8): un
defined reference to `_imp__pthread_attr_setdetachstate'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x2f9): un
defined reference to `_imp__pthread_attr_getstacksize'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x37f): un
defined reference to `_imp__pthread_create'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x3a7): un
defined reference to `_imp__pthread_attr_destroy'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(team.o):team.c:(.text+0x4e5): un
defined reference to `_imp__pthread_attr_setstacksize'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(env.o):env.c:(.text+0x4ad): unde
fined reference to `_imp__pthread_attr_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(env.o):env.c:(.text+0x4bc): unde
fined reference to `_imp__pthread_attr_setdetachstate'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(env.o):env.c:(.text+0x562): unde
fined reference to `_imp__pthread_attr_setstacksize'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x11): undef
ined reference to `_imp__pthread_mutex_lock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x20): undef
ined reference to `_imp__pthread_mutex_unlock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x56): undef
ined reference to `_imp__sem_post'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x74): undef
ined reference to `_imp__pthread_mutex_unlock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x89): undef
ined reference to `_imp__pthread_mutex_unlock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0xa5): undef
ined reference to `_imp__pthread_mutex_lock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0xd0): undef
ined reference to `_imp__sem_post'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0xed): undef
ined reference to `_imp__pthread_mutex_lock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x122): unde
fined reference to `_imp__pthread_mutex_lock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x12b): unde
fined reference to `_imp__pthread_mutex_unlock'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x134): unde
fined reference to `_imp__pthread_mutex_destroy'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x14a): unde
fined reference to `_imp__sem_destroy'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x174): unde
fined reference to `_imp__pthread_mutex_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(bar.o):bar.c:(.text+0x191): unde
fined reference to `_imp__sem_init'
c:/mingw/bin/../lib/gcc/mingw32/4.3.2/libgomp.a(sem.o):sem.c:(.text+0xa): undefi
ned reference to `_imp__sem_wait'
collect2: ld returned 1 exit status

and the README file of the compiler says something like this...
....In order to correctly compile code that utilizes OpenMP/libGOMP, you need to add
the "-fopenmp" option at compile time AND link time, and link to libgomp.a and
libpthread.a at link time ("-lgomp -lpthread"). By default, libpthread.a links
the standard C-cleanup DLL version of pthreads-win32 to your program, which
means that you will need to ensure that the file "pthreadGC2.dll" (included in
the "bin" subdirectory of this package) can be found by your program....

So thats the only problem as of now. The problem with zip files is no more.
So now anybody could help me... I found from previous topics that one more guy got the same problem.
Waiting for a positive reply :?
shubham
 


Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 2 guests

cron