Skip to content

[BUG]: Tests do not work on Apple Silicon #77

@abukowski21

Description

@abukowski21

[BUG]: Test 06 fails to run on Apple Silicon

No other systems or compilers have this issue; I have tested a few versions of both Intel and GCC Fortran compilers on a few Linux machines. Some more information of what is causing this is below...

Bug Information

On apparently all Apple Silicon machines, using gfortran:

$ ./run_all_tests.sh -o UAM.in.06.FreHepmay.test
[...]
 USING MODEL COEFFICIENTS UP TO NMAX=13
 MODEL VALID FOR LATITUDES  50.0  TO   90.0
  => HepMay Initialized
  => IHP Initialized

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:
[...]

(Backtrace is uninformative)

System Information

This is appearing only on Apple Silicon Macs. It appears to be consistent across multiple gfortran versions, and the error is identical whether gfortran was installed with MacPorts or Homebrew.

Other Information

  • It appears to stem from somewhere in ext/Electrodynamics/src/ext/hmr89.f. Specifically something in the hmrmod subroutine (lines 421-550).
  • Since other machines are not having this problem, it is likely related to how the compiler optimizes for ARM vs x86 machines.
  • Both -01 and -O0 do work, -O[2/3] do not.
  • Should be fixable by just creating a Makefile.RULES which forces the file to compile with less aggressive optimization on Darwin systems.
  • AND finally, the bug report is placed here instead of Electrodynamics since it's a GITM test that fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions