Print

Print


Hello,

The one comment I have is on OpenGL/glut.  On my Mac the OpenGL is in
/usr/X11R6 and the glut is in /System/Library/Frameworks/GLUT.framework
and when I start up analysis it claims that these are native OpenGL for
the graphics card, not Mesa.  I think the latter is no real improvement on
Tk, generally.  So I get (on my Powerbook G4, so over a year old now,
perhaps the Intel Macs do things differently):

  GL_VENDOR = ATI Technologies Inc.
  GL_RENDERER = ATI Radeon 9600 XT OpenGL Engine
  GL_VERSION = 1.5 ATI-1.4.18

Wayne

On Wed, 28 Mar 2007, Johnny Croy wrote:

> Hello everyone,
>
> We had the great opportunity to meet with Tim here in Boulder yesterday and
> he gave me some suggestions to get analysis to run a bit more smoothly on my
> Powerbook G4 1.5 Mhz machine.  As you all know, the core of analysis is
> written and compiled in Python, but the graphics part of things is all done
> in C code.  Tim suggested that I mess around with the environment.txt file
> that is found in ccpnmr1.0/c.
>
> After messing around with this file and recompiling (just the C code using
> make clean and make), I finally made some changes to the installCode.py
> script (I edited this script so that when the environment.txt file was
> generated it always contained these values).
>
> 1.  I changed the C complier flags in line 543 from
>
> CFLAGS = -O $(MALLOC_FLAG) $(FPIC_FLAG) $(XOR_FLAG)
> to
> CFLAGS = -O2 -mcpu=7450 -mtune=7450 $(MALLOC_FLAG) $(FPIC_FLAG) $(XOR_FLAG)
>
> These changes allow the gcc complier to run in a more optimized fashion
> which (I have been told) allows for faster binaries in the end.  The -O2
> flag sets the gcc complier to run in level 2 optimized mode.  The -mcpu and
> -mtune flags are computer specific flags that again optimize gcc to your
> specific computer platform.  Here is a bit more on these flags taken from a
> thread that I found at
> http://www.powerdeveloper.org/forums/viewtopic.php?p=1631&sid=3aac2aad5898ce8ce35c8705a659726a
>
>
> "-mcpu=7450 tells GCC to support all instructions available on the
> ppc7450-series (the 7447 which you find in the Pegasos is 7450-compatible,
> the main difference between the 744x and 745x is that the latter supports
> L3-cache).  Alternatively, this flag can be set to powerpc if you are not
> sure.  I don't know what the correct setting is for the Intel Mac people,
> but I am sure that you can find it on google!
>
> -mtune=7450 tells GCC to optimize for the 7450"
>
> 2.  Since I have a more than capable Open GL graphics card in my system, I
> made some changes to the files that handle the 3D graphics when Open Gl is
> used (Mesa and GLUT).
>
> I looked into the OS X framework for GLUT that is found in
> /usr/X11R6/include/GL/gl.h.  According to the header in this file, this
> version of mesa (which Mac OS X and hence analysis uses to handle the 3D
> graphics when OpenGl is used) is a bit outdated (version 5.0.1 on my
> machine, just vi this file and look at the header information).  I then used
> fink to download and compile the latest version of Mesa (version 6.5.2, the
> current version).
>
> 3.  With these updated and current files, I then recomplied analysis using
> the C-flag optimized python script installCode.py.  Again here I used Fink
> installed Tk/Tcl and Python2.5 options.  When asked by the script if I
> wanted to use the Mac OS X Framework version of GLUT, I declined.  I then
> entered in the newly updated libraries from Mesa that I downloaded from Fink
> and finished compiling as usual. Didn't have any problems with compiling
> analysis and the test ran smoothly.
>
> Final thoughts:
>
> 1.  Analysis is running pretty smoothly with this new compiling scheme.  I
> have a set of 3D assignment spectra (HNCA, HNCACB, HN(CO)CA, etc) that was
> running pretty slowly in my analysis which was complied with the standard C
> flags and Mac OS X GLUT.  Now, things are a bit more zippy and redraws
> appear to be quicker!  Additionally, I can now run in the "on-the-fly" mode
> instead of the precontoured mode which helps for looking at the really weak
> peaks that are missed in the precontoured mode!  I am in the process of
> transferring my data in from ANSIG, so I will give some updates on how the
> program is running and the overall speed of things.
>
> If anyone has any suggestions to the above changes, please let me know.  I
> will post any problems that I run across.  Good luck!
>
> - Johnny
>