MacBook Pro Report

Well, I got my MacBook Pro today, and have been playing with it this evening a bit. Update:

It does not want to play nice with my wireless router, so I had to steal bandwidth from a neighbor who has a slow connection and no awareness of wireless security. Spent 3 hours downloading X-code so I could compile Radiance, then discovered that it was on the CDs that came with the computer. Duh.

Anyway, once I got x-code installed, I was able to compile Radiance straight away. I guessed at the compile options, sort-of combining the linux and OSX gcc options from the makefile. Here's the case I created:

case 8: # MacOS X on Intel
         set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
         set opt="-O3"
         set arch=IBMPC
         set extras="CC=cc"
         set special="ogl"
         breaksw

I got some errors, but at this point everything seemed to compile. I'd be happy to share the errors if someone wants to tell me how the heck to save the make output to a file (the errors scrolled off the screen before I could read them). Then I installed X11 from the included CDs, and created a .bash_profile file that looks like this:

PATH=/usr/local/bin:$PATH
RAYPATH=.:/usr/local/lib/ray
export PATH RAYPATH

# if we're not SSH'd in
if [ ! ${SSH_TTY} ]; then
# make sure X is running
if [ "`ps -x | awk '{print $5}' | grep X11`" = "" ]; then
open /Applications/Utilities/X11.app &
# then refocus Terminal.app
osascript -e 'tell appliction "Terminal" to activate'
fi
# if DISPLAY isn't set
if [ x${DISPLAY} = x ]; then
export DISPLAY=:0
fi

Then I was able to run some test scenes from the obj directory (I haven't even begun to move all my files from my old computer), and they ran fine (and fast).

Greg, the Universal binary of Photosphere loaded (instantly), but I have no catalogs or images on here yet, so all I can say is it loads.

More later for sure. I plan to run Mark Stock's benchmark test and play with the holodeck on here, but right now I need to put some music on this thing and my cat is screaming for her catnip.

- Rob Guglielmetti

Anyway, once I got x-code installed, I was able to compile Radiance straight away. I guessed at the compile options, sort-of combining the linux and OSX gcc options from the makefile. Here's the case I created:

case 8: # MacOS X on Intel
        set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
        set opt="-O3"
        set arch=IBMPC
        set extras="CC=cc"
        set special="ogl"
        breaksw

For the PowerPC version I started with the "-fast" option the Apple
gcc provides. Didn't work but it would have been a nice shortcut for
maximum performance settings. Does your Intel gcc have a similar
option (see man page)?

I got some errors, but at this point everything seemed to compile.
I'd be happy to share the errors if someone wants to tell me how
the heck to save the make output to a file (the errors scrolled off
the screen before I could read them).

sudo ./makeall install | tee makeall.out

(I'd include a "man tee" as well but the BSD man page for tee is
rather concise.)

Then I installed X11 from the included CDs, and created a .bash_profile
file that looks like this:

Q1: Did you have the X11 development stuff installed when you compiled
     Radiance? IIRC it has to be selected manually.

PATH=/usr/local/bin:$PATH

Word of warning: It is common on Unix systems to place the non-system
path ("/usr/local", "/opt" etc.) in front of the system path. As long
as your only installing Radiance that's no problem. Fink or any other
package that provides file utils ("mv", "cp", "rm" ...) should be listed
only _after_ the system path on OS X. These tools have special knowledge
of the OS X file system (resource forks) that common Unix/GNU binaries
don't have. It would cause no damage but if you copy a file on the
command line you want it to appear in Finder as well. This would not
happen if your bash selects the fink "cp" because it's the first in
the search path.

RAYPATH=.:/usr/local/lib/ray
export PATH RAYPATH

# if we're not SSH'd in
if [ ! ${SSH_TTY} ]; then
# make sure X is running
if [ "`ps -x | awk '{print $5}' | grep X11`" = "" ]; then
open /Applications/Utilities/X11.app &
# then refocus Terminal.app
osascript -e 'tell appliction "Terminal" to activate'
fi
# if DISPLAY isn't set
if [ x${DISPLAY} = x ]; then
export DISPLAY=:0
fi

Any reason why you don't use

if [ ! ${DISPLAY} ]; then

as you did with SSH_TTY?

Then I was able to run some test scenes from the obj directory
(I haven't even begun to move all my files from my old computer),
and they ran fine (and fast).

My cat recently peed on my laptop which is the reason I have to look
for a new one now. Furry beasts!

Thanks for sharing your information.

Thomas

···

On 28.02.2006, at 07:16, Rob Guglielmetti wrote:

Thomas Bleicher wrote:

For the PowerPC version I started with the "-fast" option the Apple
gcc provides. Didn't work but it would have been a nice shortcut for
maximum performance settings. Does your Intel gcc have a similar
option (see man page)?

It does, thanks Thomas. I just recompiled with -fast instead of -O3, and got no errors at all (thanks again for the "tee tip"). I will try to run the Stock benchmark today. All the test scenes in the obj directory really fly! The cabin holodeck scene is a lot more fun to play with on this thing. =8-)

Q1: Did you have the X11 development stuff installed when you compiled
    Radiance? IIRC it has to be selected manually.

Yeah, it was installed when I installed xcode. I don't recall having to specifically tell the installer to install the X11 devel stuff, but it was certainly there when I compiled Radiance. No errors, and I have ximage and rvu, etc.

PATH=/usr/local/bin:$PATH

Word of warning: It is common on Unix systems to place the non-system
path ("/usr/local", "/opt" etc.) in front of the system path....

Thanks for the heads up. Believe it or not, I haven't had a need for fink on the old computer, but I thought I may install it on the new one, so I'll keep your warning in mind.

Any reason why you don't use

if [ ! ${DISPLAY} ]; then

as you did with SSH_TTY?

the reason it's written the way it is, is that's the way it was written on the tip website that I copied the code from. =)

My cat recently peed on my laptop which is the reason I have to look
for a new one now. Furry beasts!

Yikes!! Guess you were spending too much time on the computer and not enough time petting the cat. They get jealous. =8-) I think we'd have a serious problem if Emma peed on my new computer though...

Hi Rob,

From: Rob Guglielmetti <[email protected]>
Date: February 28, 2006 9:06:41 AM PST

Thomas Bleicher wrote:

For the PowerPC version I started with the "-fast" option the Apple
gcc provides. Didn't work but it would have been a nice shortcut for
maximum performance settings. Does your Intel gcc have a similar
option (see man page)?

It does, thanks Thomas. I just recompiled with -fast instead of -O3, and got no errors at all (thanks again for the "tee tip"). I will try to run the Stock benchmark today. All the test scenes in the obj directory really fly! The cabin holodeck scene is a lot more fun to play with on this thing. =8-)

Beware -- the -fast option may compile fine, but the binaries on the PowerPC have been notoriously faulty. Render with caution...

The tee command is great, but you don't really need it as the "File" menu in Terminal can save any selected text to a file, and of course there's always cut and paste. If you use tee, be sure to redirect standard error to it as well, using |& in the C-shell or 1>&2 in bash (I think).

Thanks for the heads up. Believe it or not, I haven't had a need for fink on the old computer, but I thought I may install it on the new one, so I'll keep your warning in mind.

Fink, eww. I installed it back when I was getting started on Darwin, because I thought I needed a utility. 10 hours of compiling later, I had 100's of tools, but the one I wanted still wouldn't compile. The dependency tree on that system is a nightmare....

-Greg

Beware -- the -fast option may compile fine, but the binaries on the
PowerPC have been notoriously faulty. Render with caution...

I started with "-fast" and got solid black images with rpict. Then I
removed some of the options, recompiled, tested and added all of them
back again except for "-malign-natural". I hope for Rob that this will
not be a problem on Intel CPUs.

If you use tee, be sure to redirect standard error to it as well,
using |& in the C-shell or 1>&2 in bash (I think).

I knew I was missing something with that command line. As bas as
GNU man pages are in general, they have better examples ...

Thanks for the heads up. Believe it or not, I haven't had a need
for fink on the old computer, but I thought I may install it on the
new one, so I'll keep your warning in mind.

Fink, eww. I installed it back when I was getting started on Darwin,
because I thought I needed a utility. 10 hours of compiling later,
I had 100's of tools, but the one I wanted still wouldn't compile.
The dependency tree on that system is a nightmare....

It's much better now, then, though I really don't know why I have
to download 350 MB of LaTeX just to get a 300 kB Python module ...
Now that I have a "basic" fink installation I prefer to

"fink install foo"

than solving all those dependencies myself. I'm definitely spoiled
by three years of Debian.

Thomas

···

On 28.02.2006, at 18:24, Greg Ward wrote:

Thomas Bleicher wrote:

Beware -- the -fast option may compile fine, but the binaries on the
PowerPC have been notoriously faulty. Render with caution...

I started with "-fast" and got solid black images with rpict. Then I
removed some of the options, recompiled, tested and added all of them
back again except for "-malign-natural". I hope for Rob that this will
not be a problem on Intel CPUs.

I just rendered a few images from the cabin scene in the radiance distribution, and everything looked ok. Greg, what are some other things to look out for? Are there some scenes or calcs I can do to test that the -fast option didn't introduce any problems? As far as I can tell, rpict is happy.

If you use tee, be sure to redirect standard error to it as well,
using |& in the C-shell or 1>&2 in bash (I think).

Thanks for the file...save tip. I didn't realize that would save the entire session.

···

On 28.02.2006, at 18:24, Greg Ward wrote:

Hi Rob,

I just rendered a few images from the cabin scene in the radiance distribution, and everything looked ok. Greg, what are some other things to look out for? Are there some scenes or calcs I can do to test that the -fast option didn't introduce any problems? As far as I can tell, rpict is happy.

I don't really know when or why it goes south, but if it looks OK, it probably is OK. I have seen black images like Thomas mentioned, and other serious problems. Usually, it's not subtle when there's a problem.

-Greg

OK, well things seem OK here. I just did the Mark Stock benchmark too, and the image was looking pretty clean. I'll stick with the -fast compiled binaries for now.

- Rob

···

On Feb 28, 2006, at 1:30 PM, Greg Ward wrote:

I don't really know when or why it goes south, but if it looks OK, it probably is OK. I have seen black images like Thomas mentioned, and other serious problems. Usually, it's not subtle when there's a problem.