On Tue, Jun 16, 2009 at 5:33 PM, Dr. David Kirkby<david.kir...@onetel.net> wrote: > > William Stein wrote: >> On Sun, Jun 14, 2009 at 10:21 AM, Dr. David >> Kirkby<david.kir...@onetel.net> wrote: >>> The fix suggested by Clint to allow ATLAS to build (namely making >>> GuessSmallNB return 28) does indeed allow ATLAS to build. >>> >>> I could crate a patch file for that, which is only applied on Solaris, >>> but clearly this is not a long-term solution, as I assume it will >>> degrade performance on Solaris. >>> >>> Do you think it's appropriate to create a patch or not? Clearly such a >>> patch would need changing at some point in the future, but it would at >>> least allow ATLAS to build on Solaris. >>> >> >> I think it is definitely appropriate to create such a patch. Then >> make a ticket to remove it. >> I think the whole issue will get resolved in the next month, since >> Clint does have an account on t2.math. In the meantime, we just patch >> around the problem, and get on with porting Sage. >> Thanks! >> >> -- William >> >> > >> > > OK, I looked at this, but since I'm new, I need a bit of help on > conventions etc. > > I don't want to waste time creating a package that a reviewer wont like, > so I want to get it right first time if possible. > > The original file that needs fixing is src/tune/blas/gemm/mmsearch.c > > There are two ways of fixing this: > > 1) Create a new version of the file which will work on any operating > system, by detecting what OS it is running on and acting differently on > Solaris. This is possible, but would require I test on linux, OS X and > Solaris. That would be more time consuming and probably wasted as this > fix will need reversing later anyway. > > 2) I create a specific version of mmsearch.c which is used only on > Solaris. I believe this is the more sensible approach to take, so I'll > assume this is the way to do it. > > If create a file mmsearch-temp-Solaris-fix.c which fixes > src/tune/blas/gemm/mmsearch.c. > > How do these stages seem? > > 1) Copying mmsearch-temp-Solaris-fix.c in the patches directory > > 2) Create a patch file with > > diff mmsearch-temp-Solaris-fix.c mmsearch.c > > mmsearch-temp-Solaris-fix.c.patch > > 3) Copy mmsearch-temp-Solaris-fix.c.patch to the patches directory. > > 4) Updating pkg-install to copy the file in the case of Solaris. > Something like: > > import shutil > if os.uname()[0] == 'SunOS': > shutil.copy2('patches/mmsearch-temp-Solaris-fix.c','src/tune/blas/gemm/mmsearch.c') > > 5) Update SPKG.txt
You have good instincts, since 1-5 is *exactly* the right thing to do (wrt how we do things in Sage, at least). > 6) Update the repository - I'm still not sure about how to do this. I > notice that someone installed hr in /usr/local.bin yesterday, I get > error messages on t2 (I'll stick them on another post). Do hg add patches/* hg ci > > Looking in the directory 'patches' I currently see. > > K732SSE1.tgz > Make.top > Make.top.patch > PM32SSE2.tgz > PPCG432.tgz > archinfo_linux.c > archinfo_linux.c.patch > archinfo_x86.c > archinfo_x86.c.patch > probe_comp.c > probe_comp.c.patch > > > Dave > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---