AttributeError: 'module' object has no attribute 'adj_variable' on import with Mac OS X + MacPorts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dolfin-adjoint |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I'm trying to compile from source on Mac OS X Mountain Lion using the latest trunk versions of dolfin-adjoint and libadjoint. I am using macports packages and Dolfin 1.1.0 stable which has been compiled using dorsal.
I have tried compiling with both macports GCC 4.7 and Apple's built in clang compiler. I get two successful compiles, but upon import I get the following error:
In [1]: import dolfin_adjoint
-------
AttributeError Traceback (most recent call last)
<ipython-
----> 1 import dolfin_adjoint
/Users/
22
23 import options
---> 24 import solving
25 import assembly
26 import expressions
/Users/
24 import expressions
25 import coeffstore
---> 26 import adjrhs
27 import adjglobals
28 import adjlinalg
/Users/
3 import ufl
4 import ufl.algorithms
----> 5 import adjglobals
6 import adjlinalg
7
/Users/
5 # Create the adjointer, the central object that records the forward solve
6 # as it happens.
----> 7 adjointer = libadjoint.
8
9 mem_checkpoints = set()
/usr/local/
676 def __init__(self, adjointer=None):
677 self.functions_
--> 678 self.set_
679
680 self.equation_
/usr/local/
716
717 def set_function_
--> 718 self.block_
719 ctypes.
720 self.block_
AttributeError: 'module' object has no attribute 'adj_variable'
So there is some problem in ctypes/clib. Any ideas what the problem might be?
Hi Jack,
Yes, libadjoint doesn't compile correctly on OSX; the problem is in the auto-generation of the libadjoint Python bindings. I've been trying to get shell access to an OSX system ever since I became aware of this problem, as that's the only way I'll be able to debug it. Is there any OSX workstation around I could ssh into?
Patrick