[MITgcm-devel] Beaufort experiment on mac os x

Torge Martin torge.martin at gmail.com
Thu Mar 15 14:28:37 EDT 2012


Oh, I changed just the Makefile but did not start my tests with genmake.

Thanks, Dimitris, this works!

changes to darwin_amd64_gfortran:

NOOPTFLAGS='-O0'
### NOOPTFILES=''
NOOPTFILES='ini_masks_etc.F gmredi_calc_psi_bvp.F'

but you have to be careful because these variables are reset later in 
the optfile if option -ieee is not used:

if test "x$IEEE" = x ; then
     FFLAGS="$FFLAGS -Wunused -Wuninitialized"
     FOPTIM='-O3 -ftree-vectorize -funroll-loops'
     NOOPTFLAGS='-O2 -funroll-loops'
     NOOPTFILES='gad_c4_adv_x.F gad_u3_adv_x.F'
else
     FFLAGS="$FFLAGS -Wunused"
     FOPTIM='-O0'
fi

this should be changed to:

if test "x$IEEE" = x ; then
     FFLAGS="$FFLAGS -Wunused -Wuninitialized"
     FOPTIM='-O3 -ftree-vectorize -funroll-loops'
else
     FFLAGS="$FFLAGS -Wunused"
     FOPTIM='-O0'
fi

Torge


On 3/15/12 11:10 AM, Menemenlis, Dimitris (3248) wrote:
> Torge, did you also try genmake with:
>
>   NOOPTFILES='ini_masks_etc.F gmredi_calc_psi_bvp.F'
>
> in tools/build_options/darwin_amd64_gfortran and it didn't work?
>
> My preference would be to  make darwin_amd64_gfortran
> compatible with newer versions of gfortran rather than
> forcing MITgcm users to downgrade to older compilers.
>
> We could also simply remove all optimization from darwin_amd64_gfortran
> as Jean-Michel suggested.
> Since we mostly use gfortran to develop code, not for production integrations,
> reducing optimization level is not a big problem and will actually have added
> advantage of speeding up compilation.
>
> Dimitris Menemenlis
>
> On Mar 15, 2012, at 10:56 AM, Torge Martin wrote:
>
>> I only get beaufort compiled with -O0. Too bad -- but at least its
>> running, finally.
>>
>> Maybe I should dig out an older gfortran version ...
>>
>> Torge

-- 
----------------------------------------------
Dr. Torge Martin
Meteorologist (Dipl.-Met.) / Sea Ice Physicist

Postdoctoral Scientist at
Massachusetts Institute of Technology
Earth, Atmospheric and Planetary Sciences

currently visiting the
Polar Science Center / Applied Physics Lab.
University of Washington
1013 NE 40th St
Seattle, WA 98105
USA
                         phone: +1 206 685-2262
                         fax:   +1 206 616-3142
                         torge.martin at gmail.com
       http://sites.google.com/site/torgemartin
----------------------------------------------




More information about the MITgcm-devel mailing list