[MITgcm-support] MITgcm on snow leopard

Patrick Heimbach heimbach at MIT.EDU
Tue Nov 2 06:39:52 EDT 2010


Hi there,

also check out Constantinos' email earlier this year on this subject:
("[MITgcm-support] MITgcm optfile for the latest OS/X")

http://mitgcm.org/pipermail/mitgcm-support/2010-April/006559.html

Cheers
-p.

On Nov 2, 2010, at 6:20 AM, Yuan Lian wrote:

> Hi Martin,
>
> Did you download gfortran from http://hpc.sourceforge.net/? That one
> should be in 64 bit mode by default.
>
> To enable 64bit, you can edit
> /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
> and add kernel flag as
> <key>Kernel Flags</key>
> <string>arch=x86_64</string>
>
> Before you do this, first, check if you already have 64bit kernel  
> extension enabled by either type "arch" or
> check 'About this mac'-->'more info'-->'Software' and you will see  
> "64-bit Kernel and Extensions" (yes or no).
> If you see the kernel is 32bit, then you can try to temporarily  
> enable it by entering the single
> user mode by pressing "F8" key upon booting (before the apple logo  
> appears), then you add "arch=x86_64" right after "boot:" (arch=i386  
> for 32bit kernel). If the system boots and works fine then you edit  
> the plist file
> I mentioned above.
>
> 64bit is better for computing since it can access data faster  
> (larger bandwidth and more memory).
> I did use 64bit Matlab to handle a very large topography data set.
> However, Apple itself is not consistent on 64bit or 32bit  
> applications due to compatibility issues, indeed
> the default kernel was 32bit before releasing 10.6.4.
>
> I got bored and turned my thinkstation s20 to a hackintosh:-) . I  
> wasn't able to enable 64bit mode due to
> hardware compatibilities. The machine supposed to be faster than  
> the 2009 mac pro at office but it actually
> runs a numerical model slower because mac pro has 64bit enabled.   
> So I guess it is worth to enable 64bit
> kernel.
>
> Hope this helps!
>
> Cheers,
> Yuan
>
>
>
> On 11/2/10 2:11 AM, Martin Losch wrote:
>> Yuan,
>>
>> stupid questions, I am outing myself as a complete ignorant on  
>> operating systems:
>> 1. how do you enable a 64bit kernel on a Mac?
>> 2. does one want to do this? under which circumstances is it  
>> useful to have Mac with 64bit kernel?
>>
>> I would like to have a system that is "consistent", apparently my  
>> gfortran is 32bit but gcc is 64 which requires to use this flag.  
>> Is it worth changing the system? Even possible?
>>
>> Martin
>>
>> On Nov 2, 2010, at 10:03 AM, Yuan Lian wrote:
>>
>>> Here is my opt file without setting -arch i386, notice I got rid  
>>> of the 'Wunused' option.
>>> /usr/local/bin should be defined by default in Snow Leopard.  
>>> MITgcm was compiled
>>> either on 64 or 32 bit. You can check if you enabled 64bit kernel  
>>> from "About this mac".
>>>
>>> Yuan
>>>
>>>
>>> CPP='/usr/bin/cpp -traditional -P'
>>> FC=gfortran
>>> LINK=gfortran
>>> NOOPTFLAGS='-O0'
>>> EXTENDED_SRC_FLAG='-ffixed-line-length-132'
>>>
>>> S64='$(TOOLSDIR)/set64bitConst.sh'
>>> DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR'
>>> INCLUDEDIRS=''
>>> INCLUDES=''
>>> LIBS=''
>>>
>>> if test "x$IEEE" = x ; then
>>>     FFLAGS=' -Wuninitialized -fsecond-underscore -fconvert=big- 
>>> endian'
>>>     FOPTIM='-O3 -funroll-loops'
>>>     NOOPTFLAGS='-O2 -funroll-loops'
>>>     NOOPTFILES='gad_c4_adv_x.F gad_u3_adv_x.F'
>>> else
>>>     FFLAGS='-ffloat-store -fsecond-underscore -fconvert=big-endian'
>>>     FOPTIM='-O0'
>>> fi
>>>
>>>
>>> On 11/2/10 1:14 AM, Martin Losch wrote:
>>>> Hi Nico
>>>> this
>>>>> CFLAGS='arch i386'
>>>> should probably be this (you forgot the '-'):
>>>>> CFLAGS='-arch i386'
>>>> otherwise the checked-in darwin_ia32_gfortran works for me too  
>>>> (make sure that you comment in the CFLAGS line)
>>>>
>>>> Martin
>>>>
>>>> On Nov 1, 2010, at 10:08 PM, Menemenlis, Dimitris (3248) wrote:
>>>>
>>>>> Checked in opt file works fine for me?
>>>>>
>>>>> Dimitris Menemenlis
>>>>> 818-625-6498
>>>>>
>>>>> On Nov 1, 2010, at 2:05 PM, "Nico Wienders"<wienders at fsu.edu>    
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> My turn to try gfortran on snow leopard 64.
>>>>>>
>>>>>> Here is my (plump) OPT file. And the errors i get.
>>>>>> Can't figure out what i do wrong. Thank you. Cheers.
>>>>>>
>>>>>>
>>>>>> CPP='/usr/bin/cpp -traditional -P'
>>>>>> FC='/usr/local/bin/gfortran'
>>>>>> CC='/usr/bin/gcc'
>>>>>> LINK='/usr/local/bin/gfortran'
>>>>>> CFLAGS='arch i386'
>>>>>> FFLAGS='-qfixed=132 -qsuffix=f=for'
>>>>>> FOPTIM='-O3'
>>>>>> NOOPTFLAGS='-O0'
>>>>>> EXTENDED_SRC_FLAG='-ffixed-line-length-132'
>>>>>> SKIP_NETCDF_CHECK=t
>>>>>> S64='$(TOOLSDIR)/set64bitConst.sh'
>>>>>> MAKEDEPEND='/usr/X11/bin/makedepend'
>>>>>> DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DML_TERMINATOR'
>>>>>> INCLUDES='-I/usr/local/include -I/sw/include'
>>>>>> LIBS='-L/sw/lib -L/usr/local/lib -lnetcdf'
>>>>>>
>>>>>>
>>>>>>
>>>>>> ===  Checking system libraries  ===
>>>>>>    Do we have the system() command using /usr/local/bin/ 
>>>>>> gfortran...  yes
>>>>>>    Do we have the fdate() command using /usr/local/bin/ 
>>>>>> gfortran...  yes
>>>>>>    Do we have the etime() command using /usr/local/bin/ 
>>>>>> gfortran...  no
>>>>>>    Can we call simple C routines (here, "cloc()") using /usr/ 
>>>>>> local/bin/gfortran...  no
>>>>>>    Can we unlimit the stack size using /usr/local/bin/ 
>>>>>> gfortran...  no
>>>>>>    Can we register a signal handler using /usr/local/bin/ 
>>>>>> gfortran...  no
>>>>>>    Can we use stat() through C calls...  no
>>>>>>    Can we create NetCDF-enabled binaries...  no
>>>>>>
>>>>>>
>>>>>>
>>>>>> Nico Wienders
>>>>>>
>>>>>> Florida State University  -  Earth, Ocean and Atmospheric  
>>>>>> Science  -  OSB415
>>>>>> 117 N. Woodward Avenue, Tallahassee, FL 32306-4320 -  
>>>>>> wienders at fsu.edu
>>>>>> (850) 644-1987  (office)   |   (850) 294-3542 (cell)   |    
>>>>>> (850) 644-2581 (fax)
>>>>>>
>>>>>> _______________________________________________
>>>>>> MITgcm-support mailing list
>>>>>> MITgcm-support at mitgcm.org
>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>>> _______________________________________________
>>>>> MITgcm-support mailing list
>>>>> MITgcm-support at mitgcm.org
>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>> _______________________________________________
>>>> MITgcm-support mailing list
>>>> MITgcm-support at mitgcm.org
>>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>>
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1518 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach





More information about the MITgcm-support mailing list