On Aug 27, 2006, at 8:22 PM, Boyd Waters wrote:

I'm the one who is hacking together the DarwinPort for using the Intel compiler

This is probably arrogance on my part. But I could not find a recipe for building Python with the Intel compiler, so I created one.

I have just finished building Python-2.5c1 (release candidate 1) with the Intel compiler (9.1.029) on a Mac Pro. This might lead to performance benefits with downstream plugins like NumPy, but it is more likely to lead to compatibility issues with those modules. I don't know yet.

Anyway, I patched two files: the configure shell script, and the Mac/ PythonLauncher Makefile.in

Attachment: configure.diff
Description: Binary data

        

Attachment: Mac-PythonLauncher-Makefile.in.diff
Description: Binary data


The Mac/PythonLauncher/Makefile.in patch simply forces the use of GCC to compile Objective-C files in the Mac Cocoa launcher.

The configure file slightly modifies the linking of top-level python.exe

I applied the patches like this:

# cd Python-2.5c1
# patch -p0 < ~/Mac-PythonLauncher-Makefile.in.diff
# patch < ~/configure.diff


I invoked configure like this:

# CC=icc CXX=icpc OPT="-xT -O3 -fstack-security-check -fpic - parallel" ICC_LIBS="-L/opt/intel/cc/9.1.029/lib -lirc -limf" ./ configure --enable-framework

This tells the compiler to optimize for the Woodcrest or Merom processor; to optimize for Core Solo/Duo, use -xP. I can reliably trip a compiler error if I use -axT, which tries to accommodate both types of processor.


I build like this:

# make -j4
# sudo make frameworkinstall


This goes rather quickly on a four-core Mac Pro. This afternoon my colleagues came by to see what I was working on, gave me encouraging comments like "Hey, you can get it to crash that much faster on the new Mac..."


I'll have a DarwinPort real soon...

Feedback is welcome.

- boyd


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to