AMD Processors
Decrease font size
Increase font size
Topic Title: Advice on compiler/precision
Topic Summary:
Created On: 10/31/2003 04:46 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 10/31/2003 04:46 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

I'll try and cut a long story short...

Basically, I have a program which models atoms and molecules, currently it runs on a dual Opteron 244 box. The program *has* to have 80-bit precision (this is non-negotiable, it simply needs that level of precision).

Now using gcc I can have 80-bit precision (with "sqrtl" etc), however it would be nice to make this program SMP aware (currently it runs on a single CPU), using Portland Groups compiler this is a relatively simple matter, I can compile it for parallel execution...however Portland only support 64-bit precision which is no good to me. I could use an external math library but the ones I've tested so far (such as GNU MP) seem to be an order of magnitude slower than the equivalent call to "sqrtl"), which means that the benefits of running parallel are quickly offset by the overhead in calling the external math library (I must point out here that the routines will be called a *huge* number of times).

So, basically...in a nutshell my question is -

Does anyone have a recommendation for a compiler (C/C++) and/or math library which supports 80-bit precision for floating point math that will allow me to *easily* enable parallel execution.

I admit, it's a longshot...but I hope someone has been down this path before!

Thanks,

John.

-------------------------
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
 10/31/2003 08:44 PM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Jes, you have Portland's compiler! It looks like it could be yummy!

I don't know the answer to your question, but I may be considering a related path (SMP), so I'd like to ask some questions, if you don't mind. At worst, you'll save *me* some time and money:-)

What multi-processor (SMP) features does the Portland Groups compiler provide that gcc is missing?
Is it Open MP?

If it is Open MP, is there an alternative implementation of Open MP (for gcc)? Are you a member of Open MP? (http://www.openmp.org) [I'm not] Open MP looks very acadameic, so they may provide some help.

The only companies I spotted on the Open MP site were Sun and Pallas (www.pallas.com).

Pallas say Intel has just bought their High Performance Computing division (http://www.pallas.com/e/news/press/intel.htm)

I'm sad to say AMD may have to just pay someone to do the work,either on gcc, or another code base. Or hope one of the Opteron 'Supercomputer' wins releases their technology.

DeuxWay
 11/01/2003 05:18 AM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

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
 11/04/2003 02:32 AM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Very helpful reply Jes. I was trying to understand if it was capabilities built into the heart of the compiler, or some fancy libraries that were so good about Portland Groups pgCC.

(My interests include parallel computing, but I don't care about 80bit reals.)

The facilities you're describing appear to be deep in the compiler. Cool, but nothing I have experience of (I gave up trying to design a better programming language when Ada came out, and when C++ came out, and again when Java came out, and ... :-).

As I posted, the only way I can think of getting something affordable is to piggy-back on AMD's supercomputer wins, or investigate academic projects like OpenMP.

Maybe some gcc gurus are reading this and feel like taking up the challenge, with AMD help?

After all, Apple use gcc for their system (C, I think, for Darwin and Objective-C for the Cocoa UI), and they have dual's now, and likely n-way as IBM scales POWER PC. So their are two platforms, AMD64 & G5, that could use 64-bit parallel-savvy compilation!

If you get any success, please post. Sorry I can't help.
 11/08/2003 10:27 AM
User is offline View Users Profile Print this message

Author Icon
awd4dad
Member

Posts: 117
Joined: 10/06/2003

I don't know if this' ">http://www.amd.com/us-en/Proce...,,30_2252_2282,00.html may help,, in case, take a glance at it. It's all about MATHS.
 11/25/2003 10:26 PM
User is offline View Users Profile Print this message

Author Icon
von_drat
Junior Member

Posts: 4
Joined: 11/24/2003

If you haven't yet resolved the 80bit FP issue, you may want to check Pathscale in addition to the Portland compiler

http://www.pathscale.com' ">http://www.pathscale.com

Not enough details on their web site yet, but probably can ask them directly.
 11/26/2003 02:09 AM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Jes, PathScale have a compiler beta program.' ">http://www.pathscale.com/beta_join.html. If you have time, and a good reason, it may be worth signing up to see how fast your Opterons can go on your problems. You may also be able to influence them.

PathScale's datasheet looks a little cluster oriented, rather than SMP.

There is no mention of support for OpenMP.
They emphasise gcc 3.3.1 compatibility.
They do talk about Cray/SGI extended FORTRAN. So, if your code is susceptable to FORTRAN or a mix of C/C++ and FORTRAN, you might get what you want.

They say that the technical lead for PathScale lead MIPS compiler development [I thought that was Steele] - if this is true, he is (IMHO) a compiler god [i.e. in the top 20] because MIPS compilers caused RISC to become a relevant CPU architecture. So their stuff could be good!
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information