1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to install Fortran on Mac

  1. Oct 1, 2011 #1
    Well I am taking a Numerical Analysis course, and I just bought a MacBook Pro. My problem is that I just barely can handle Mac's software, I need to install fortran and I don't have any idea of how to do it, also I need a program similar to Origin on windows for my mac, for the data analysis. Any tutorial or help for installing Fortran on Mac would be very helpful.

    Thanks
     
  2. jcsd
  3. Oct 2, 2011 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

  4. Oct 2, 2011 #3

    I don't understand very well this step:

    Most of these packages have been compiled/tested on OS X 10.6, 10.7 and XCode Tools 3.x, 4.x. Feel free to contact me with questions or problems! Note: Mac OS X 10.6 does not include /usr/local/bin in its default PATH. Therefore, assuming you're using the default bash shell, please type (or include in /etc/profile) export PATH=/usr/local/bin:$PATH before using any of these tools.

    Could you explain it to me ???

    New at Mac.

    Thanks
     
    Last edited: Oct 2, 2011
  5. Oct 2, 2011 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You need to get Xcode from Apple. It's the development system from Apple. I'll assume since you just bought the MacBook Pro, you're running 10.7 on it. If so, you can get Xcode 4.1.1 from the Mac App Store. It's a free download. You actually won't use Xcode itself. You want the tools to get gcc and other tools needed for compiling programs in a Unix environment.

    If you're running 10.6, you need to get Xcode 3, which you can get from Apple's developer site. You'll have to register as a developer, which you can do for free, to get to the download page. Sometimes, it's hard to find the page, so if you have to go this route and run into trouble, ask here, and I can probably find the page for you relatively quickly.

    ---

    PATH is an environment variable which tells the system which directories to look for programs in when you type a command in at the command line, just like with DOS. By default, the system sets PATH to something like /usr/bin:/bin:/usr/sbin:/sbin. So when you type a command, it first looks for the command in /usr/bin. If it's not there, it checks /bin, and so on.

    When you install most open-source software, it doesn't put them into any of these system directories to avoid breaking the operating system. Instead, there's a local structure set up, which resides in /usr/local. To get programs stored in there to run, you need to add /usr/local/bin and /usr/local to PATH. You typically do this by adding the appropriate line in the file .bash_profile, which gets executed every time you start up the shell.

    ---

    Mac OS X is based on Unix, so you're going to want to learn how to get around a Unix system. You're facing a bit of a learning curve, but this stuff is pretty useful to know. Once you know it, you'll be able to use other Unix and Unix-like systems, like Linux.

    ---

    Some other resources you might find useful are the Fink and Macports projects. While a lot of open source software will just compile on OS X if you just follow the instructions for Unix, it's not uncommon to run into little bugs here and there. Fink and Macports offers collections of ported software where all these kinks were fixed by someone else. Also, you'll often find if you want to install some software that it depends on a bunch of other stuff, so you have to go track that stuff down and compile it first. Macports and Fink take care of all that for you.
     
  6. Oct 2, 2011 #5
    I am running 10.6 but I think that software is on a installation disc that comes with the MacBook Pro when you buy it, Is it right? Because I have two discs. Could it be an option??. If I am wrong about that, Can you give a page so I can download the software?. Because I couldn't find it.

    Thanks for the other advices.
     
  7. Oct 2, 2011 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

  8. Oct 2, 2011 #7

    Ok, thanks for your information, it has been very valuable cause all the pages that I found the past days were not so instructive as I would liked. I will run the DVD and see what happens.

    Thank you.

    Oh I forgot, I am also new on PF, if there is any way to give you points or something like that just let me know and I will do it.
     
  9. Oct 2, 2011 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You're welcome. No point system here. :smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook