On Jun 8, 10:59 pm, "Dr. David Kirkby" <[EMAIL PROTECTED]> wrote:
Hi Dave, > Is there a general policy on whether compiler flags should give the > best performance on a particular machine, or should the binaries work > on any similar system? I can see advantages in each. Right now we pick up SSE2 automatically in a couple packages, for example M4RI and ATLAS. Other than that setting CFLAGS & friends is generally not a good idea unless you are an expert user and as is we do overwrite those flags in many cases. > For people working on one system, they might as well get the best > performance from Sage and use compiler flags which get the > performance. It has certainly been requested and I plan to offer a special l_KNOW_WHAT_I_AM_DOING_SO_LET_ME_SET_CFLAGS_AND_I_WANT_COMPLAIN_IF_I_BREAK_MY_SAGEBUILD mode, but certain packages like gmp react very badly to even seemingly innocent CFALGS (think -fast on Solaris), so I will explicitly make it very, very clear to the user that this is not recommended Even simple things like "-O3" breaks code and I have had to dial down the optimizations settings on more than one spkg to avoid breakage. > For an admin installing Sage on a university system where there will > be many different machines (some old, some new), he/she might want > compiler flags which work on any of those machines. > > So what should one aim for? I can imagine there could be quite a hit > of performance if one built code to run on an old Intel 80386 using > the latest and greatest CPUs. Most current compilers on x86 default to i585 and on x86-64 it is also a non-issue. Gains can be found in certain areas, but correctness and stability are a higher priority than wringing an extra 10% of performance out of the code . > I was looking at compiling R on Solaris (and I have now succeeded with > both gcc and Sun Forte), but the compiler flags one uses depends on > the above decision. Sure. But we will have for hard coded, but customizable flags for Sun Forte on Solaris at least. > Dave Cheers, Michael --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---