Hi Deuxway,
Yes, I have Portlands C/C++ compiler, I have to say it's a great tool, which actually seems (in my experiences at least) to optimize for x86_64 a lot better than gcc was doing (by that I mean when I've looked at the assembler the Portland compiler definitely seems to be making better use of the new registers etc). I'm not saying it's *always* better than gcc, only that in the cases where I've used it I've definitely noticed a speed-up in runtime when I've compiled with pgCC rather than gcc.
Yes Portland uses native OpenMP parallelisation, so at a very basic level all you need to do is to add pragmas into your source code to tell the compiler which bits it can enable parallel operations on. For example
...
ReallySlowFunction1();
ReallySlowFunction2();
...
becomes -
#pragma omp parallel section
{
ReallySlowFunction1();
}
#pragma omp parallel section
{
ReallySlowFunction2();
}
Compile your program then when you need to run it, by setting some environment variables, like
OMP_NUM_THREADS=2; export OMP_NUM_THREADS
The program will then split the sections across the CPU's. That's just a simple example, there are other pragmas to help with splitting "for" loops across processors too. Very nifty!
I'd have to say, that I would probably use PGI's compiler over gcc if it wasn't for the fact that they don't support 80-bit precision, other than that I was *very* impressed by the ease of it.
Hmmm, I might investigate OpenMP and see if there's an easy way to "integrate" it into gcc....thanks for the tip.
-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net Unix & Oracle Web Hosting Provider powered by AMD Opterons