Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with gfortran on mac

  1. Apr 18, 2013 #1
    I just downloaded gfortran on my mac and I'm having an issue running the program.
    For example, when I run the following using .f90,

    program test
    write (*,*) "Hello"
    end program test

    the computer, seemingly infinitely, spews out y's:
  2. jcsd
  3. Apr 18, 2013 #2


    User Avatar
    Science Advisor
    Homework Helper

    This is a guess, but it once caught me out on a Unix system, and the Mac OS is basically unix plus a lot of advertising hype :smile:

    There is a unix command called "test" (in fact several different commands all called "test", depending what shell you are running etc). So you might not be running your program at all!

    Try renaming it "mytest" or whatever.
  4. Apr 19, 2013 #3
    AlephZero's guess is a very solid one.

    Up to my experience every programmer working on *nix-style systems sooner or later runs into this, so
    "Welcome to the club, Nikolaus!" :smile:
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Help gfortran Date
C/++/# Help with MATLAB code? Feb 9, 2018
What's wrong with my bisection method code? Dec 10, 2017
Help: Convert Matlab to Python code Dec 8, 2017
Fortran 90 - gfortran error - help! Mar 10, 2014