How Can I Install Fortran on a MacBook Pro for Numerical Analysis?

  • Context: Comp Sci 
  • Thread starter Thread starter Casco
  • Start date Start date
  • Tags Tags
    Fortran install Mac
Click For Summary

Discussion Overview

The discussion revolves around the installation of Fortran on a MacBook Pro for a Numerical Analysis course. Participants share resources and advice on obtaining necessary software, particularly Xcode, and navigating the Mac operating system for compiling programs.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in installing Fortran and seeks guidance on the process.
  • Several participants suggest resources, including a specific webpage for Fortran installation.
  • A participant requests clarification on setting the PATH environment variable and its importance for running installed software.
  • Advice is given to download Xcode from the Mac App Store or Apple's developer site, depending on the version of Mac OS X being used.
  • Another participant mentions the possibility of using installation discs that come with the MacBook Pro to obtain Xcode.
  • Some participants confirm that Xcode is available on the installation DVDs and provide links for downloading the latest version if needed.
  • Resources like Fink and Macports are mentioned as alternatives for managing software installations on Mac.

Areas of Agreement / Disagreement

Participants generally agree on the necessity of installing Xcode to compile Fortran, but there is no consensus on the best method to obtain it, as some suggest using installation discs while others recommend downloading it online.

Contextual Notes

Participants express varying levels of familiarity with the Mac operating system and Unix environments, indicating a potential learning curve for new users. There are also references to specific versions of Mac OS X and Xcode, which may affect the installation process.

Who May Find This Useful

Individuals new to Mac OS X who need to install Fortran for numerical analysis or similar courses, as well as those looking for guidance on using development tools on Mac.

Casco
Messages
82
Reaction score
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
 
Physics news on Phys.org
vela said:
You might find this page helpful.

http://hpc.sourceforge.net/#fortran
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:
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.
 
vela said:
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.

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.
 
vela said:
Yes, that's right. There's a version of Xcode on the installation DVDs, which is probably all you need.

If you want the latest, you can register as a developer here:

http://developer.apple.com/programs/register/

Once registered as a Mac developer, you can log into the the Mac dev center here:

https://developer.apple.com/devcenter/mac/index.action

The download link for Xcode 3.2.6 is right on the first page. It's a 4+ GB download.


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.
 
You're welcome. No point system here. :smile:
 

Similar threads

Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 24 ·
Replies
24
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K