stevenrjanssens
stevenrjanssens

Reputation: 191

Fortran bus error on mac

The following Fortran code is giving me a bus error on my Mac but no errors when I run it on my Linux machine:

  PROGRAM TINY
  WRITE(UNIT=*, FMT=*) 'Hello, world!'
  END

My understanding is that a bus error occurs when the program attempts to access impossible memory but I do not understand where such an attempt has been made in this program. My MacBook has GCC 4.4.0 and my Linux machine has GCC 4.3.2. Any ideas as to why this error occurs?

Upvotes: 2

Views: 2657

Answers (2)

High Performance Mark
High Performance Mark

Reputation: 78364

No ideas at all, just thought I'd let you know that I have no problems compiling and running the program on my Mac Pro. I compiled with G95 (GCC 4.0.4 (g95 0.91!) Dec 11 2008). Like you, I think a bus error is usually an attempt to address memory which doesn't exist.

Upvotes: 1

M. S. B.
M. S. B.

Reputation: 29401

The program runs fine on my Mac with gfortran 4.4.2. Do other Fortran programs run on your MacBook, or do they all have this problem?

Upvotes: 0

Related Questions