Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 7, 2011, 01:20 AM   #1
sioannou
macrumors member
 
Join Date: Mar 2010
Location: Nicosia Cyprus
Send a message via Skype™ to sioannou
openMPI and Macosx

Hello, guys hope you can help on this.

I've been given as a final year project in my uni a project which requires openMPI. I decided to use macosx as my operating system (the other option was linux).

I've spent a lot of hours searching the web for some information however openMPI lacks proper documentation. From what I read it seems that openMPI is already installed in macosx (snow leopard) but without the fortran compiler?

Please if you now where I could find proper documentation and tutorials on how to install openMPI on Macosx it would be very helpful for me.

Best Regards
Sotiris
__________________
8 GB iPod nano
Proud owner of Base Macbook Pro 15" 2011
"Why join the navy if you can be a pirate?"
Steve Jobs
sioannou is offline   0 Reply With Quote
Old Jun 7, 2011, 07:49 AM   #2
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by sioannou View Post
I've spent a lot of hours searching the web for some information however openMPI lacks proper documentation. From what I read it seems that openMPI is already installed in macosx (snow leopard) but without the fortran compiler?
It is definitely there. You can use either C or C++ with it (I think you still need to use the GCC compiler as I don't think LLVM supports it yet).

Alternatively you could compile your own GCC Fortran compiler and your own version of OpenMPI if you have to use Fortran. That is pretty straightforward.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Jun 7, 2011, 08:59 AM   #3
crackpip
macrumors regular
 
Join Date: Jul 2002
Checkout MacPorts; it has OpenMPI built with gfortran. I haven't tested it because I compile my own with Intel Fortran, but it should work.

crackpip
crackpip is offline   0 Reply With Quote
Old Jun 7, 2011, 09:11 AM   #4
jnpy!$4g3cwk
macrumors 6502a
 
Join Date: Feb 2010
Quote:
Originally Posted by crackpip View Post
Checkout MacPorts; it has OpenMPI built with gfortran. I haven't tested it because I compile my own with Intel Fortran, but it should work.

crackpip
Yes, it is all there in MacPorts. I used it a couple of years ago, but not lately, so I can't swear that there are no current problems, but definitely try installing the MacPorts versions.
jnpy!$4g3cwk is online now   0 Reply With Quote
Old Jul 8, 2011, 11:23 PM   #5
itsmrjon
macrumors regular
 
Join Date: Jun 2011
Location: Chicago
I know this thread is dead, but I'm going to revive it to explain how to properly install OpenMPI w/FORTAN support for those who may search in the future.

-First and foremost install XCode (so that you have a relavant c++ compiler on the machine as it will be necessary in later steps)
--This can either be done from the MacOSx install disc or from the App Store/Dev portal

-Secondly install GFortran (binaries can be found here http://gcc.gnu.org/wiki/GFortranBinaries#MacOS )

-Lastly go to www.open-mpi.org and download the .tar.gz of the current version's source (if this thread is still relevant when you are reading this can be done from this link http://www.open-mpi.org/software/ompi/v1.4/ but make sure it is the most up to date version)
--you can use stuffit expander (free in app store) to untar or use the unix commands, up to you

---- now for the building OpenMPI portion...
-Go into terminal and type 'gfortran -v' and verify that your gfortran is the version you installed in the steps above
-- if not type 'which gfortran' and see which gfortran it is sourcing.. if it is still sourcing apples xcode gfortran without OpenMPI support then simple modify your .profile/.bashrc/.cshrc or whatever to source the new gfortran you installed

--now in teminal cd to your openmpi directory (wherever you extracted it)
--decide where you want to install openmpi... if you want to install over the factory mac install, type 'which mpif90' to see the location of your current mpi install... will more then likely be /usr/bin
--in terminal in the openmpi extracted directory type 'sudo ./configure --PREFIX=/whereyouwanttoinstall'
--then type 'sudo make all install'

so for example if you want to overwrite xcodes default ompi install, you would do
sudo ./configure --PREFIX=/usr/bin
sudo make all install

*note if you install to a location other then the default ompi directory you will need to update your .profile/.bashrc/.cshrc
Simply add the line:
export PATH=$PATH:/myompidirectory/
where myompidirectory is the PREFIX you used...

close terminal.. and open it back up (or type 'source .profile' or whatever terminal source you use) and now we check if it installed correctly

type 'which mpif90'
It should spit out the correct location of your openmpi install...
now type 'mpif90 '
if you receive the message 'gfortran: no input files' then you did it all correctly
if you receive a message that the current version does not support fortran blah blah then something went wrong in your installation process and you still have the xcode openmpi that does not support fortran

Hope this helps someone in the future... it was a pain in the butt doing the first time
itsmrjon is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iMac and Battlefield 3. Wut? jimbaw iMac 151 Nov 24, 2011 11:51 AM
Resolved: [Help] Terminal MACOSX output strange caracters miguel747 Mac Programming 12 Sep 25, 2011 05:29 PM
Need help and advice on getting both windows 7 and macosx onto mac. Dragvinz MacBook Pro 13 May 13, 2011 05:45 PM
Erase and Install Problem, Desperate for help! imrealldum iMac 5 Mar 13, 2011 02:02 PM
Photo Delight: color splash, import Facebook photos, share and print. COMING SOON! GlobalDelight iPad Apps 3 Nov 15, 2010 05:47 AM


All times are GMT -5. The time now is 06:53 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC