[petsc-users] MPI configure error for Mac OS X Yosemite

Guillaume Duclaux Guillaume.Duclaux at geo.uib.no
Sat Dec 6 15:52:26 CST 2014


 

Hi Justin, 

I've experienced a similar problem on my laptop (fresh install of
Yosemite). I suspect it is a write permission problem with /usr/local/
(though I'm not 100% certain, as it could be an issue with gcc/clang).
I'm very new to all this... 

I've documented a step by step install that worked for me (tested both
with openmpi and mpich), feel free to try it out! Hope that helps. 

Cheers 

Guillaume 

PREREQUISITES: XCODE AND COMPILERS 
+ First of all, install Xcode 
+ The 'Command Line Tools' package is required:
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#
[1] 
+ If you need it, install gfortran (a binary is available from the gnu
page: https://gcc.gnu.org/wiki/GFortranBinaries#MacOS [2]) 

GETTING AND INSTALLING GCC: 
(THE GCC INSTALLED ON MAC OS X IS ACTUALLY CLANG, I.E. APPLE C COMPILER,
AND NOT GNU C COMPILER - THE ONE YOU PROBABLY WANT) 
That can be tricky and one possible 'simple' solution consists in
installing homebrew (http://brew.sh [3]) 

+ in a terminal: 
ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)" 

+ Once homebrew is installed, tap into hombrew versions: 
brew tap homebrew/versions 

The installation will do the following: 
==> THE FOLLOWING DIRECTORIES WILL BE MADE GROUP WRITABLE: 
/usr/local/.
/usr/local/bin
/usr/local/share
/usr/local/share/man 
/usr/local/share/man/man1 

-------------------------

NOW PETSC AND FRIENDS: 
+ Get PETSc 3.5.2 tarball:
http://www.mcs.anl.gov/petsc/download/index.html [4] 

+ Go into petsc-3.5.2/ to configure the installation (note that we ask
petsc to download and install openmpi and hdf5 libraries as well): 

./configure --with-cc=x86_64-apple-darwin14.0.0-gcc-4.8
--with-fc=/usr/local/gfortran/bin/gfortran --download-openmpi=1
--download-hdf5=1 --with-debugging=1

+ then, follow the make all, and make test prompts. 

+ Add the PETSC_ARCH and PETSC_DIR to your .profile: 

##Setting ARCH and DIR for PETSc 
export PETSC_DIR=/Users/gduclaux/dev/petsc-3.5.2 
export PETSC_ARCH=arch-darwin-c-opt 

> ---------- Forwarded message ----------
> From: SATISH BALAY <balay at mcs.anl.gov>
> Date: 6 December 2014 at 03:21
> Subject: Re: [petsc-users] MPI configure error for Mac OS X Yosemite
> To: Justin Chang <jychang48 at gmail.com>
> Cc: petsc-users <petsc-users at mcs.anl.gov>
> 
> On Fri, 5 Dec 2014, Justin Chang wrote:
> 
>> Hi all,
>>
>> I recently upgraded my iMac to the OS X Yosemite, and when I tried
>> installing PETSc, it gave me these strange errors when I tried installing
>> MPICH or OpenMPI (i tried both options). I have never seen these errors
>> before, so my guess is that it may have something to do with the recent OS
>> upgrade.
>>
>> Attached is the configure log. Any help appreciated, thanks.
> 
> --download-mpich should work.
> 
> for --download-openmpi - try adding to configure options: CFLAGS="" CXXFLAGS=""
> 
> [-Wall appears to messup openmpi configure]
> 
> Satish
 

Links:
------
[1]
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#
[2] https://gcc.gnu.org/wiki/GFortranBinaries#MacOS
[3] http://brew.sh/
[4] http://www.mcs.anl.gov/petsc/download/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141206/41e288f7/attachment.html>


More information about the petsc-users mailing list