- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm compiling fortran code on a fairly new iMac (64bit) using intel fortran composer 12 u5. The executables it generates with default settings can't run on a MacBook 1,1 which has a Intel Core Duo processor ("Yonah", I think). This processor can't handle anything above SSE3, and it seems ifort 12 on the iMac can't do anything below SSSE3. Is that correct?
Ideally I'd like to create an executable that can run fully optimized on the newer machine but can fall back to something executable on the older machine.
I've tried using -ax, -m, or -arch, but none of these are able to go below SSSE3.
What do I need to do?
Thanks very much,
Kevin
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think the SSE level is the main problem. The main problem is that the Core Solo / Core Duo chips in the first gen Intel Macs are strictly 32bit processors. By default, the compiler on your new iMac is generating 64 bit binaries. From a command line, you can use this command to tell the difference in binaries:
file a.out
a.out: Mach-O 64-bit executable x86_64
The compiler supports the -m32 and -m64 options to control 32 or 64bit code generation. For example,
rwgreen-mac02:~ rwgreen$ ifort -m32 hello.f90 -o hello
rwgreen-mac02:~ rwgreen$ file hello
hello: Mach-O executable i386
Now if you're OK with using a 32bit executable on the new iMac, you could do this:
ifort -o combobinary -m32 -O2 -axsse4.2,sse3 myprog.f90
the sse3 option is only available for the 32bit compiler, selected by -m32 option OR if you
source /opt/intel/bin/compilervars.sh ia32
ifort -o combobinary -O2 -axsse4.2,sse3 myprog.f90
ron
file a.out
a.out: Mach-O 64-bit executable x86_64
The compiler supports the -m32 and -m64 options to control 32 or 64bit code generation. For example,
rwgreen-mac02:~ rwgreen$ ifort -m32 hello.f90 -o hello
rwgreen-mac02:~ rwgreen$ file hello
hello: Mach-O executable i386
Now if you're OK with using a 32bit executable on the new iMac, you could do this:
ifort -o combobinary -m32 -O2 -axsse4.2,sse3 myprog.f90
the sse3 option is only available for the 32bit compiler, selected by -m32 option OR if you
source /opt/intel/bin/compilervars.sh ia32
ifort -o combobinary -O2 -axsse4.2,sse3 myprog.f90
ron
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think the SSE level is the main problem. The main problem is that the Core Solo / Core Duo chips in the first gen Intel Macs are strictly 32bit processors. By default, the compiler on your new iMac is generating 64 bit binaries. From a command line, you can use this command to tell the difference in binaries:
file a.out
a.out: Mach-O 64-bit executable x86_64
The compiler supports the -m32 and -m64 options to control 32 or 64bit code generation. For example,
rwgreen-mac02:~ rwgreen$ ifort -m32 hello.f90 -o hello
rwgreen-mac02:~ rwgreen$ file hello
hello: Mach-O executable i386
Now if you're OK with using a 32bit executable on the new iMac, you could do this:
ifort -o combobinary -m32 -O2 -axsse4.2,sse3 myprog.f90
the sse3 option is only available for the 32bit compiler, selected by -m32 option OR if you
source /opt/intel/bin/compilervars.sh ia32
ifort -o combobinary -O2 -axsse4.2,sse3 myprog.f90
ron
file a.out
a.out: Mach-O 64-bit executable x86_64
The compiler supports the -m32 and -m64 options to control 32 or 64bit code generation. For example,
rwgreen-mac02:~ rwgreen$ ifort -m32 hello.f90 -o hello
rwgreen-mac02:~ rwgreen$ file hello
hello: Mach-O executable i386
Now if you're OK with using a 32bit executable on the new iMac, you could do this:
ifort -o combobinary -m32 -O2 -axsse4.2,sse3 myprog.f90
the sse3 option is only available for the 32bit compiler, selected by -m32 option OR if you
source /opt/intel/bin/compilervars.sh ia32
ifort -o combobinary -O2 -axsse4.2,sse3 myprog.f90
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ron,
thanks so much for your reply. This is right on!
I'm glad I have executables for the older machine now. I'll see if I want to stick with 32b for everything, or if I'll compile 2 sets (32/64bit). I'm guessing the latter is probably best, though it'll take a little more work on my part :).
cheers,
Kevin

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page