Mac OS/X Compile Question

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
linchat
Posts: 0
Joined: Thu Dec 02, 2004 2:59 pm

Mac OS/X Compile Question

Post by linchat »

Hello All,

I just picked up an Apple G5 Dual Proc 2 GHZ with 512 mem. I did not think this thing was rendering images all to quickly so I compared a blender file against a AMD XP 2000 machine with 786 of memory.

End result is that the AMD box is almost 30% faster then the Mac. Memory is not an issue as swapping is not occuring. So I am wandering, would a recompile of Blender for the G5 offer any enhancements?

I have never compiled a version of Blender on my own but if there will be serious benefits I will give it a shot - like for example setting the compiler for dual processors.

Unless someone out there knows of a port which has been compiled to take advantage of the G5 with dual processors.

My other question is if there will be improvements to be gained then what is the binary version compiled for? What is the lowest common denominator, G4?

Thanks.

boswellian
Posts: 0
Joined: Thu Dec 02, 2004 7:35 pm

Post by boswellian »

If you are using Yafray, make sure the processors setting is at 2.

linchat
Posts: 0
Joined: Thu Dec 02, 2004 2:59 pm

Compile?

Post by linchat »

But will the recompile offer a speed enhancment? I am trying to compile it now and running into all kinds of problems. Wandering how much effort I should keep putting toward this.

loos
Posts: 0
Joined: Mon Jun 09, 2003 3:43 pm
Location: South Jordan, UT

Are the optimizations still not on?

Post by loos »

I remember a while ago that when using scons (the build system they're using for Blender nowadays), there were no optimization flags for the Mac, I had to put them in myself. Does anyone know if that's still the case? I don't remember what flags they were (and I'm on a powerbook anyway, so there might be better ones for you to use), but they might speed things up significantly. You might want to check on the irc channel (irc.freenet.org:6667 #blendercoders)

Good luck!

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Re: Are the optimizations still not on?

Post by lukep »

loos wrote:I remember a while ago that when using scons (the build system they're using for Blender nowadays), there were no optimization flags for the Mac, I had to put them in myself. Does anyone know if that's still the case? I don't remember what flags they were (and I'm on a powerbook anyway, so there might be better ones for you to use), but they might speed things up significantly.

Good luck!
Official build is tuned for G4 but with generic code so that it can run on a G3. it's also only compiled with make, not scons, at -O2 level. I've checked that -O3 works on the G4 and yeld a good 7% enhancement. However this is a bit unsafe and we cannot do that for official build.

for G5, replace -mpowerpc -mtune=G4 by -mG5 (check in GCC man)
you can try also the following options :
-mpowerpc-gopt -mpowerpc-gfxopt -force_cpusubtype_ALL

Note that for the faster ones, you will have to recompile all external .a libs with same options.

Never use -malign_natural

Compiling with other specifics options for G5 (note that -fast may turn more than needed and lead to bugs) can help too.

Now from previous tests, the difference in speed with AMD was not as big, unless you used the intel optimized build. However this may vary from file to file.

Blender use only one proc at the moment, and we don't have an altivec build as this need specific coding. This may change with Tiger where Gcc is announced with automatic altivec optimization option. Note that yafray renders can use the 2 procs.

linchat
Posts: 0
Joined: Thu Dec 02, 2004 2:59 pm

I tried to compile but ran into a problem.

Post by linchat »

When I tried to compile blender it said I was missing a file darwein-7.60 in the obj directory. I do not even have an obj directory in the source. What am I missing. I lookied through the documentation and the forums and could not find an answer. I do not even know what this is, I assum some sort of GUI lib.

Post Reply