astrojuanlu / fenics-recipes

This repository contains conda recipes for the FEniCS libraries
The Unlicense
13 stars 15 forks source link

PETSc fails to build on OS X - Unable to find mpi in default locations! #14

Open johannesring opened 9 years ago

johannesring commented 9 years ago

Error message:

*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Unable to find mpi in default locations!
Perhaps you can specify with --with-mpi-dir=<directory>
If you do not want MPI, then give --with-mpi=0
You might also consider using --download-mpi instead
*******************************************************************************

Command failed: /bin/bash -x -e /Users/johannr/src/fenics-recipes/petsc/build.sh

The fix is to conda install openmpi and because of an issue with the OpenMPI package in conda, I also had to do the following:

$ sudo mkdir -p /opt
$ sudo ln -s ~/anaconda /opt/anaconda1anaconda2anaconda3

Here, ~/anaconda is the location of my conda installation.

astrojuanlu commented 9 years ago

I am familiar with the /opt/anaconda1anaconda2anaconda3 issue, it used to happen to many packages and it is actually a problem from upstream. I will try to isolate the issue and report it in https://github.com/ContinuumIO/anaconda-issues.

astrojuanlu commented 9 years ago

Actually, they already have this issue in their tracker: ContinuumIO/anaconda-issues#96.

astrojuanlu commented 9 years ago

@johannesring Could you please test if the issue with the mpi package is still present? It would be nice it we could solve some OS X related problems, but this one does not depend on us.

johannesring commented 9 years ago

@Juanlu001 - yes, the PETSc build still fails when I remove the /opt/anaconda1anaconda2anaconda3 link.

If I add the link back, I now get the following error when the build runs the PETSc tests:

...
+ cd /Users/johannr/anaconda/conda-bld/work/petsc-3.5.2
+ make PETSC_DIR=/Users/johannr/anaconda/envs/_test PETSC_ARCH= test
Running test examples to verify correct installation
Using PETSC_DIR=/Users/johannr/anaconda/envs/_test and PETSC_ARCH=
Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI process
See http://www.mcs.anl.gov/petsc/documentation/faq.html
dyld: Library not loaded: libmkl_intel_lp64.dylib
  Referenced from: /Users/johannr/anaconda/conda-bld/work/petsc-3.5.2/src/snes/examples/tutorials/./ex19
  Reason: image not found
astrojuanlu commented 9 years ago

That's strange though... In principle the MKL libraries should be installed as a dependency and they are linked here: https://github.com/Juanlu001/fenics-recipes/blob/11bab26081f2afcf6b9d70d6feb725fada6f927f/petsc/build.sh#L7 It can be an issue of the MKL package on OS X or the directory being incorrect.

johannesring commented 9 years ago

Could it be that I need a license for using MKL? I remember seeing something about a trial period when I first installed this.

astrojuanlu commented 9 years ago

On 2015-09-01 11:20, Johannes Ring wrote:

Could it be that I need a license for using MKL? I remember seeing something about a trial period when I first installed this.

Sounds strange to me, since a "trial period" should actually give access to the libraries while it's active, but might be... If the error disappears with a license then it's definitely Continuum's fault.

johannesring commented 9 years ago

It's been a few months since I did this and I guess my 30-day free trial period has expired: http://docs.continuum.io/mkl-optimizations/index

astrojuanlu commented 9 years ago

On 2015-09-01 14:33, Johannes Ring wrote:

It's been a few months since I did this and I guess my 30-day free trial period has expired: http://docs.continuum.io/mkl-optimizations/index

Oh well, then definitely it makes sense that it's not finding the libraries. Do you have a way to get a license?

astrojuanlu commented 8 years ago

I am building the packages against OpenBLAS instead (see #38).