NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

#include <omp.h> in example projects / own use

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
GiForce



Joined: 20 Feb 2017
Posts: 2

PostPosted: Mon Feb 20, 2017 9:18 pm    Post subject: #include <omp.h> in example projects / own use Reply with quote

hello

I have new downloaded NetBeans and wanted to play with it a little.
Ran the included example scripts Pi_1. I didn't knew about omp/openMP.
Using it in my own script it doesn't work, file not found.
I compared the properties , and they seem the very same.
I assume the CONF= references these proporties. If you need
any additional information, I will happily provide Smile

Code:
/usr/bin/make -f Makefile CONF=Debug
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/omp
mkdir -p build/Debug/GNU-MacOSX
rm -f "build/Debug/GNU-MacOSX/main.o.d"
gcc    -c -g -MMD -MP -MF "build/Debug/GNU-MacOSX/main.o.d" -o build/Debug/GNU-MacOSX/main.o main.c
main.c:16:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


Code:
/usr/bin/make -f Makefile CONF=Serial
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Serial.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Serial.mk dist/Serial/GNU-MacOSX/pi_1
make[2]: `dist/Serial/GNU-MacOSX/pi_1' is up to date.

BUILD SUCCESSFUL (total time: 55ms)
Back to top
soldatov



Joined: 05 Nov 2009
Posts: 583

PostPosted: Tue Feb 21, 2017 9:06 am    Post subject: Re: #include <omp.h> in example projects / own use Reply with quote

GiForce wrote:
hello

I have new downloaded NetBeans and wanted to play with it a little.
Ran the included example scripts Pi_1. I didn't knew about omp/openMP.
Using it in my own script it doesn't work, file not found.
I compared the properties , and they seem the very same.
I assume the CONF= references these proporties. If you need
any additional information, I will happily provide Smile

Not a all compilers has OpenMP support. On my MacOSX 10.11 I haven't omp.h file too:
Code:

:~ tester$ gcc -o test test.c
test.c:5:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.
:~ tester$ gcc -fopenmp -o test test.c
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
:~ tester$
:~ tester$ find / -name 'omp.h' 2> /dev/null

See too:
http://blog.llvm.org/2015/05/openmp-support_22.html
http://openmp.llvm.org/
Back to top
GiForce



Joined: 20 Feb 2017
Posts: 2

PostPosted: Wed Feb 22, 2017 12:19 am    Post subject: Reply with quote

hello soldatov

Thank you very much.
I did read about the issue before, and will examine your links too.
But my question is why does the example script run and has acces to omp.h,
shouldn't I reach the same resource from within Netbeans without any additional install? That confuses me.
I think I just Idea recognized the example script didn't have to compile, did it?
Oh, shame on me, then Embarassed . Bad Netbeans, bad, makes me hungry for something it can't deliver. Wink
Sorry for the fuss!

Have a very nice day, night and so on^^
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo