multi plat forms programming using OpenMP

General OpenMP discussion

multi plat forms programming using OpenMP

Postby vivre316 » Wed Aug 21, 2013 2:14 am

Hello,
I am a beginner in openMP and I have the following problem:
i can compile and run simples C++ programs using the OpenMP API, but when i try to use it in my project (library multi plat form programming) i get the following errors:


[ 92%] Building CXX object CMakeFiles/~/src/tb2vns.cpp.o
/usr/bin/c++ -DNARYCHAR -DWCSPFORMATONLY -DLONGLONG_COST -DLINUX -DWIDE_STRING -DLONGDOUBLE_PROB -Wall -Wno-deprecated -Wno-int-to-pointer-cast -Wno-sign-compare -O3 -DNDEBUG -o CMakeFiles/~/tb2vns.cpp.o -c /home/~/src/tb2vns.cpp
/home/~/src/tb2vns.cpp:709:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
/home/~/src/tb2vns.cpp:713:0: warning: ignoring #pragma omp barrier [-Wunknown-pragmas]

any hint would be helpful.
vivre316
 
Posts: 1
Joined: Tue Aug 20, 2013 1:55 pm

Re: multi plat forms programming using OpenMP

Postby MarkB » Wed Aug 21, 2013 2:53 am

It looks like you need to persuade the compiler to use the OpenMP flag ( -fopenmp for gcc/g++ ). You will need to set this flag for the link step, too.

Hope that helps,
Mark.
MarkB
 
Posts: 429
Joined: Thu Jan 08, 2009 10:12 am

Re: multi plat forms programming using OpenMP

Postby miliksitek » Sun Sep 08, 2013 5:20 am

Did it work? I am facing a similar issue.
miliksitek
 
Posts: 3
Joined: Sat Sep 07, 2013 1:41 am

Re: multi plat forms programming using OpenMP

Postby ftinetti » Tue Sep 10, 2013 5:29 am

Hi,

Did it work? I am facing a similar issue.


What do you find when you try Mark's suggestion?

Fernando.
ftinetti
 
Posts: 577
Joined: Wed Feb 10, 2010 2:44 pm


Return to Using OpenMP

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 11 guests