Does GCC with OpenMP on Windows support multi-core?

General OpenMP discussion

Does GCC with OpenMP on Windows support multi-core?

Postby nevermet » Fri Dec 30, 2011 12:00 pm

Dear list,

One of my friends wants to know how to run OpenMP using multi-core while compiling...

I think that just adding -fopenmp does not make Windows use multi-core while compiling...

He wants to make the compilation fast, since his compilation time takes too long.

I searched the web if there is option to make it use multi-core but I cannot find it. Does it support multi-core compilation? If it is, how can we use that option?

Best regards
Nam, Seungho
nevermet
 
Posts: 2
Joined: Fri Dec 30, 2011 11:53 am

Re: Does GCC with OpenMP on Windows support multi-core?

Postby ftinetti » Fri Dec 30, 2011 3:15 pm

[quote]
One of my friends wants to know how to run OpenMP using multi-core while compiling...

I think that just adding -fopenmp does not make Windows use multi-core while compiling...
[quote]
If you are looking for a parallel version of the compiler, then you should check the compiler documentation, btw... what compiler are you using?

-fopenmp is the option for gcc and gfortran (maybe other compilers as well, but I don't know) for compiling #omp pragmas or !$OMP directives respectively.

If you have lots of source code files, then I think the fastest way of taking advantage of multiprocessing would be using some version of gnu make, which in Linux has an option for building in parallel. Unfortunately I don't know in Windows, but I'm rather confident that the Windows version would be able to parallelize the build too.

Edit: I just add an URL related to this (just the first I found)
http://www.codesynthesis.com/~boris/blo ... mand-line/

HTH.
ftinetti
 
Posts: 567
Joined: Wed Feb 10, 2010 2:44 pm

Re: Does GCC with OpenMP on Windows support multi-core?

Postby nevermet » Fri Dec 30, 2011 7:49 pm

I think his compiler is gcc (C++).

And is it impossible to run the complier parellel when there is only one .cpp file?
nevermet
 
Posts: 2
Joined: Fri Dec 30, 2011 11:53 am


Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot] and 7 guests