Isca icon indicating copy to clipboard operation
Isca copied to clipboard

[WIP] working version on gfortran11 on macOS v11.2

Open gaelforget opened this issue 3 years ago • 3 comments

I am opening the PR as a way to share and discuss but shouldnt be merged in its current form

This follows up on https://github.com/ExeClim/Isca/issues/210 and are modifications which eventually allowed me to compile and run held_suarez_test_case.py on a Mac (running OS 11.2).

There were several types of issues as you'll see, some of which I uncovered after upgrading to the latest gfortran compiler (v11)

  • linux system calls which error out on Mac; some I just commented out for now; the affinity part is switched off via a MACOS cpp flag; more or less as done by @jamesp in 2018 (https://github.com/jamesp/Isca/tree/mac)
  • the -fallow-argument-mismatch and -fallow-invalid-boz part is related to warnings that have recently been turned into errors (the options revert to warnings). Would need a switch like in https://github.com/MITgcm/MITgcm/pull/480 probably for gfortran < v10
  • in create_xgrid.c I needed to add a definition of isHeadNode_b (same as in mosaic_util.c but for the name)
  • added gfortran_mac option file

Maybe this could get reviewed and merged after some revision. Please chime in

gaelforget avatar Jun 11 '21 15:06 gaelforget

@gaelforget Quick question: do you have an intuition for whether or not the additional changes you've made (i.e., beyond those in Jamie's branch) would affect compilation on Mac setups for which Isca currently does compile (i.e., what Jamie had working)?

ntlewis avatar Jun 11 '21 16:06 ntlewis

@gaelforget Quick question: do you have an intuition for whether or not the additional changes you've made (i.e., beyond those in Jamie's branch) would affect compilation on Mac setups for which Isca currently does compile (i.e., what Jamie had working)?

Except for the -fallow-argument-mismatch and -fallow-invalid-boz part that need to be skipped with gfortran < 10 (see https://github.com/MITgcm/MITgcm/pull/480) I would think so. Would be awesome if you could double check that

gaelforget avatar Jun 11 '21 16:06 gaelforget

Great to see progress being made on this @gaelforget, @ntlewis!

@gaelforget how is the performance when you run on mac hardware?

jamesp avatar Jun 11 '21 16:06 jamesp