LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices

Reply
 
LinkBack Search this Thread
Old 09-15-2009, 04:43 PM   #1
jcpetti
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
need help compiling in osx vs. Linux


As part of my research, I have been compiling and running a model (all fortran 90 scripts) on our university's Linux cluster test module. I purchased a MacBook about a year ago, and would like to learn how to compile and run my model on osx. To build my model in Linux, I set:

1. env. variables for MPI and NETCDF directories

2. flags for -llapack -lblas

3. user-specified fortran and c compiler overrides (fc and cc)

A colleague advised me to 'use gfortran as part of gcc 4.3+. To be installed by use of fink', but I honestly do not quite know where to begin doing all of this on my MacBook. If you can provide any guidance, point me to another forum / reference, I would greatly appreciate your time. Thanks!
 
Old 09-15-2009, 09:47 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003

Rep: Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189
Quote:
Originally Posted by jcpetti View Post
As part of my research, I have been compiling and running a model (all fortran 90 scripts) on our university's Linux cluster test module. I purchased a MacBook about a year ago, and would like to learn how to compile and run my model on osx. To build my model in Linux, I set:

1. env. variables for MPI and NETCDF directories

2. flags for -llapack -lblas

3. user-specified fortran and c compiler overrides (fc and cc)

A colleague advised me to 'use gfortran as part of gcc 4.3+. To be installed by use of fink', but I honestly do not quite know where to begin doing all of this on my MacBook. If you can provide any guidance, point me to another forum / reference, I would greatly appreciate your time. Thanks!
Not really sure if anyone on LinuxQuestions can give you much assistance with OSX on a Macbook. Have you checked any of the OSX/Mac forums??
 
Old 10-07-2009, 02:35 AM   #3
synss
Member
 
Registered: Jul 2007
Location: Germany
Distribution: Arch Linux, Mac OS X
Posts: 131

Rep: Reputation: 22
You need to install xcode, from the install DVD, with that, you get gcc, ld, etc. and an IDE. Then you can compile whatever you want yourself, with gcc from the command line. If you need libraries (lapack, blas), you may want to install them via fink or macports, which are package managers.
 
Old 10-07-2009, 02:56 AM   #4
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,306

Rep: Reputation: Disabled
A other option is to buy MAC OSX Snow leopard bible , it is User guide for Snow leopard .
One of the chapters is called go behind the basics in that chapter they learns you the basics of Apple script , Fink ,Mac ports and so on.
Of course if you use Snow leopard.
 
Old 10-23-2009, 03:21 AM   #5
thegeek
Member
 
Registered: Oct 2009
Location: Amsterdam
Distribution: CentOS,Fedora,Puppy
Posts: 62

Rep: Reputation: 20
Yes you will need xcode and probably ports for anything thats still missing for unix type stuff.

http://winunixmac.com/macintosh-how-...ling-mac-ports
 
Old 10-26-2009, 01:47 AM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625

Rep: Reputation: 101Reputation: 101
One of the major shortcomings of XCode for a scientific user is that it does not iunclude gfortran by default. I don't do very much with OS X, but I've dabbled with it a bit and others in my work place use it extensively. We've found that the gfortran builds from http://hpc.sourceforge.net are about the best way to get gfortran running on Macs. Note you will need XCode installed to use them.

BTW, your original post talks about MPI. Are you planning to run your code in parallel using MPI? I believe that OpenMPI installs and runs OK on OS X, but have never actually tried it.
 
Old 10-27-2009, 02:00 AM   #7
synss
Member
 
Registered: Jul 2007
Location: Germany
Distribution: Arch Linux, Mac OS X
Posts: 131

Rep: Reputation: 22
Alternative build of gfortran: http://r.research.att.com/tools/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling a C program to Mac OSX maginotjr Programming 5 02-08-2008 12:10 PM
Linux vs. OSX Abomb General 49 02-10-2007 12:48 PM
what linux is most like OSX charlie989 Linux - Newbie 4 07-02-2005 03:33 AM
Linux to look like OSX Dirty_Ink Linux - Software 8 05-06-2004 10:16 PM
error while compiling openDChub on Mac OSX 10.3.2 stevejob Linux - Software 0 03-10-2004 04:27 PM


All times are GMT -5. The time now is 02:40 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration