Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - OpenMP: (14 Items)
   
OpenMP  
I understand that gcc 4.2 and up support OpenMP, is there plans for supporting libraries and headers towards achieving 
OpenMP support for Neutrino?
RE: OpenMP  
 

> -----Original Message-----
> From: George Refseth [mailto:rfz@opera.com] 
> Sent: October 17, 2007 6:04 AM
> To: general-toolchain
> Subject: OpenMP
> 
> I understand that gcc 4.2 and up support OpenMP, is there 
> plans for supporting libraries and headers towards achieving 
> OpenMP support for Neutrino?

This should likely port over fairly easy:

http://gcc.gnu.org/projects/gomp/

Thomas
Re: OpenMP  
Currently there are no plans to ship libgomp with the next release of the tools. However, libgomp builds and works on 
Neutrino if you add "--enable-libgomp" to the build-hooks file or add it to your configure line if you're configuring it
 manually.

Regards,

Ryan Mansfield
Re: OpenMP  
I am trying to build OpenMP 3.0 which should work with gcc 4.3. 

I downloaded the sources for libgomp from the gcc 4.3 branch and tried to compile them using make within the Momentics 
IDE (QNX C++ Project).

Like I understood the previous comment, there should be a simple switch for compiling libgomp (--enable-libgomp) ?


Regards, Mario
Re: OpenMP  
Mario Shraiki wrote:
> I am trying to build OpenMP 3.0 which should work with gcc 4.3. 
> 
> I downloaded the sources for libgomp from the gcc 4.3 branch and tried to compile them using make within the Momentics
 IDE (QNX C++ Project).
> 
> Like I understood the previous comment, there should be a simple switch for compiling libgomp (--enable-libgomp) ?

Yes, --enable-libgomp is a configure option to gcc.

Regards,

Ryan Mansfield
Re: OpenMP  
Mario if you interesting build OpenMP 3.0 you shuld compiling gcc 4.4 or gcc 4.5
Regards, bogdan
Re: OpenMP  
Hello,
Sry for my late reply.  It is my fist time building something like gcc, I had read the documentation concerning 
compiling gcc.  I had a little missunderstanding about the --enable-libgomp option, which was part of configuration 
procedure and not of the compiler.

I need OpenMP for my master thesis about parallelism, and the instrumented kernel for tracing the scheduler.

I have a default Neutrino 6.4.1 configuration and downloaded the (4.4, as suggested) branch into the following folder :
/home/gcc-4_4-branch 

Thats my configure for building 4.4.
./configure 
	--srcdir=/home/gcc-4_4-branch/libgomp 
	--build=i386-pc-nto-qnx6.4.0 
	--host=i386-pc-nto-qnx6.4.0 
	--target=i386-pc-nto-qnx6.4.0 
	--libdir=/usr/qnx641/host/qnx6/x86/usr/lib 
	--libexecdir=/usr/qnx641/host/qnx6/x86/usr/lib 
	--with-sysroot=/usr/qnx641/target/qnx6/ 
	--prefix=/usr/qnx641/host/qnx6/x86/usr 
	--exec-prefix=/usr/qnx641/host/qnx6/x86/usr 
	--with-local-prefix=/usr/qnx641/host/qnx6/x86/usr 
	--with-gxx-include-dir=/usr/qnx641/target/qnx6/usr/include/c++/4.3.3 
	--enable-cheaders=c 
	--with-as=ntox86-as 
	--with-ld=ntox86-ld 
	--disable-werror 
	--enable-languages=c++ 
	--enable-threads=posix 
	--disable-nls 
	--disable-libssp 
	--disable-tls 
	--disable-libstdcxx-pch 
	--enable-libmudflap 
	--enable-__cxa_atexit 
	--enable-multilib 
	--enable-shared 
	--enable-libgomp

and get the following errormessage:
configure: error: source directory already configured; run "make distclean" there first

calling make distclean leads to following messages (I will just write the first one):
Makefile:442: .deps/affinity.Plo: No such file or directory
...
...

I am pretty sure, that there is a quite simple error.

Regards, Mario
Re: OpenMP  
1. you can use gcc4.4.0 for QNX 6.4.1 from http://www.ajam.org.pl/ 
2. if you want to compile gcc4.4/gcc4.5 oneself then you should changes original sources. How you want, then I show you 
what change I do into sources and how I compile gcc.

Regards, bogdan
Re: OpenMP  
Hi Bogdan, I've  downloaded your binaries, they worked thanks!

It would be interesting to see, whether I can build the binaries on my own.
Was there an error in my previous post about configure?

Regards, Mario
Re: OpenMP  
Hi,
Mario
Ferst look Source Code  tools/gcc/trunk
It is gcc4.3.3 for QNX.
If you want compile gcc on QNX x86 you shuld delete all directory linux-* and win32-*. I use only nto-x86-o-ntox86 and 
the rest directory nto-x86-o-ntoarm,ntomips and so on I delete.
And you look file  build-hooks. I this file is:
configure_opts="${configure_opts} --with-sysroot=$QNX_TARGET/"
	configure_opts="${configure_opts} --disable-werror"
 	configure_opts="${configure_opts} --libdir=${basedir}/lib"
	configure_opts="${configure_opts} --libexecdir=${basedir}/lib"
	configure_opts="${configure_opts} --target=${target}"
	configure_opts="${configure_opts} --srcdir=${srcdir}"
	configure_opts="${configure_opts} --prefix=${basedir}"
	configure_opts="${configure_opts} --exec-prefix=${basedir}"
	configure_opts="${configure_opts} --with-local-prefix=${basedir}"
	configure_opts="${configure_opts} --enable-languages=c++"
	configure_opts="${configure_opts} --enable-threads=posix"
	configure_opts="${configure_opts} --disable-nls"
	configure_opts="${configure_opts} --disable-libssp"
	configure_opts="${configure_opts} --disable-tls"
	configure_opts="${configure_opts} --disable-libstdcxx-pch"
	configure_opts="${configure_opts} --enable-libmudflap"
	configure_opts="${configure_opts} --enable-__cxa_atexit"
	configure_opts="${configure_opts} --with-gxx-include-dir=${qnxtarget}/usr/include/c++/$gcc_version"
	configure_opts="${configure_opts} --enable-multilib"

Mario you should not use configure but change build-hooks.
For OpenMP add line configure_opts="${configure_opts} --enable-libgomp" after line:
configure_opts="${configure_opts} --enable-libmudflap"
And start compilation writing:
make 2>&1 | tee CC.log
In nto-x86-o-ntox86  will be whole compiled compiler.
And in file CC.log you  have the whole process of compilation.
If you want to compile gcc 4.4 or gcc4.5 then you should change sources of gcc. If you want this I can you send my 
changes for gcc 4.4 or gcc 4.5.
Regards, bogdan
Re: OpenMP  
Hi Bodgan,
thanks for your efforts, I really appreciate it.

I tried the example like you mentioned, but I was confused because of your path for the source for gcc. 
I saw in another post from you that there is a svn:core-dev-tools
where your mentioned path is included. (and there is the mentioned build-hooks file)

As a second, if a try your example it is unable to compile, because of the missing gmp and mpfr libraries.

I saw in another post, that these libraries are statically linked, and therefore not available for the compilation 
process.

I will download the libraries from your website (gmp and mpfr), and try to compile it again.

Regards, 
Mario
Re: OpenMP  
Hi Bodgan,
I loaded your libraries from the website and tried to compile.

I got the following errormessage:

Compiling leads to a missing library for libtool:
cannot find -lbacktraceS

Regards, Mario
Attachment: Text CC.log.bz2 31.34 KB
Re: OpenMP  
Re: OpenMP  
Hi Bodgan,
thanks again. That was the missing piece, which was left.
Summary:
1. I've downloaded the current gcc version from here svn:core-dev-tools
2. I used your compiled libraries for mpfr etc from http://www.ajam.org.pl/ (and put them into the corresponding 
directories) (post32679)
3. I modified the build hooks file, which is included in the downloaded gcc version
--enable-libgomp (after --enable-libmudflap) (This build-hooks file is not included in the official www.gnu.org src)
4. I changed the QNXLDFLAGS = -Wl,-Bstatic -Wl,-lbacktraceS -Wl,-Bdynamic to QNXLDFLAGS = -lbacktrace (in libmudflap / 
Makefile.in is line) (post30661) 
4. I deleted uneccesary directories (sh, ppc etc)
5. I compiled everything using make 2>&1 | tee CC.log

and voila after a while everything is compiled!

It was so easy ;-P

You were a big help Bodgan ;-)

Regards, Mario