← Back to team overview

dolfin team mailing list archive

Re: [Dorsal] Installing on a mac

 

On Mon, Oct 18, 2010 at 4:31 PM, Johannes Ring <johannr@xxxxxxxxx> wrote:
> On Mon, Oct 18, 2010 at 11:41 AM, Harish Narayanan
> <harish.mlists@xxxxxxxxx> wrote:
>> On 10/18/10 10:41 AM, Johannes Ring wrote:
>>> On Fri, Oct 15, 2010 at 5:42 PM, Peter Monk <nibj@xxxxxx> wrote:
>>>> Hi
>>>> I am trying to install on a mac with snow leopard 10.6.4 and gcc 4.2.1 (also ifort 11.1) and up to date macports using dorsal-0.8.1.
>>>>
>>>> The build went without obvious problems.
>>>>
>>>> So I tried
>>>>
>>>> python demo.py
>>>>
>>>> in the pde/poisson demo and I get
>>>>
>>>>> lindv9:python monk$ !py
>>>>> python demo.py
>>>>> Traceback (most recent call last):
>>>>> File "demo.py", line 22, in <module>
>>>>>   from dolfin import *
>>>>> File "/Users/monk/FEniCS/lib/python2.6/site-packages/dolfin/__init__.py", line 13, in <module>
>>>>>   import dolfin.cpp as cpp
>>>>> File "/Users/monk/FEniCS/lib/python2.6/site-packages/dolfin/cpp.py", line 28, in <module>
>>>>>   _cpp = swig_import_helper()
>>>>> File "/Users/monk/FEniCS/lib/python2.6/site-packages/dolfin/cpp.py", line 24, in swig_import_helper
>>>>>   _mod = imp.load_module('_cpp', fp, pathname, description)
>>>>> ImportError: dlopen(/Users/monk/FEniCS/lib/python2.6/site-packages/dolfin/_cpp.so, 2): Symbol not found: _METIS_mCPartGraphRecursive2
>>>>> Referenced from: /Users/monk/FEniCS/src/petsc-3.1-p4/darwin10.0.0-cxx-opt/lib/libpetsc.dylib
>>>>> Expected in: flat namespace
>>>>> in /Users/monk/FEniCS/src/petsc-3.1-p4/darwin10.0.0-cxx-opt/lib/libpetsc.dylib
>>>
>>> Your problem seems very similar to what is described in this thread:
>>>
>>>   https://lists.launchpad.net/dorsal/msg00394.html
>>>
>>> Try to add
>>>
>>>   CONFOPTS="-DMETIS_LIBRARY=${INSTALL_PATH}/lib/libmetis.a"
>>>
>>> in FEniCS/packages/dolfin.package and re-run Dorsal.
>>
>> Johannes, will it break anything if I made this the default in Dorsal?
>> (As in will this option be overwritten if libmetis exists elsewhere on
>> other platforms?)
>
> I tried it and linking fails if the path to the library doesn't exist
> so that's not an option. I will try to dig deeper and see if I can
> find out why it links against /opt/local/lib/libmetis.a instead of
> $PARMETIS_DIR/lib/libmetis.a.

I think I found the problem and it is related with how we use the
CMake find_* commands (find_path, find_library, etc.) in DOLFIN. What
we do now is to use the PATHS option for the FOO_DIR variables,
however, according to the CMake documentation, we should really be
using the HINTS option instead. The PATHS option is more like "search
this path as a last resort" and should be used for hard-coded paths
like /sw (fink), /opt/local (MacPorts), /opt, etc. I will replace
PATHS with HINTS in the FindFOO modules in DOLFIN if there are no
objections.

Johannes



Follow ups