Opened 10 years ago

Closed 9 years ago

#46787 closed defect (fixed)

SWIG version error dolfin

Reported by: mwathen@… Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port:

Description

Hi,

I get a swig version error when I try and create a function space in FEniCS. Here is the error:

Calling FFC just-in-time (JIT) compiler, this may take some time. Incompatible swig versions detected. UFC swig version is not the same as extension module swig version: '3.0.2' != '3.0.5'


Exception Traceback (most recent call last) /Users/michaelwathen/Dropbox/mastersresearch/mhd/FEniCS/MHD/Stabilised/SaddlePointForm/Test/GeneralisedEigen/NoBC/MHDfluid.py in <module>()

91 order = 1 92 parametersreorder_dofs_serial? = False

---> 93 Velocity = VectorFunctionSpace(mesh, "CG", order)

94 Pressure = FunctionSpace(mesh, "DG", order-1) 95 Magnetic = FunctionSpace(mesh, "N1curl", order)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/functions/functionspace.py in init(self, mesh, family, degree, dim, form_degree, constrained_domain, restriction)

626 # Initialize base class 627 FunctionSpaceBase.init(self, mesh, element,

--> 628 constrained_domain=constrained_domain)

629 630 class TensorFunctionSpace(FunctionSpaceBase):

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/functions/functionspace.py in init(self, mesh, element, constrained_domain)

151 152 # JIT-compile element to get ufc_element and ufc_dofmap

--> 153 ufc_element, ufc_dofmap = jit(self._ufl_element, mpi_comm=mesh.mpi_comm())

154 155 # Instantiate DOLFIN FiniteElement and DofMap

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/compilemodules/jit.py in mpi_jit(*args, kwargs)

62 # Just call JIT compiler when running in serial 63 if MPI.size(mpi_comm) == 1:

---> 64 return local_jit(*args, kwargs)

65 66 # Compile first on process 0

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/compilemodules/jit.py in jit(form, form_compiler_parameters, mpi_comm)

126 127 # Execute!

--> 128 return form_compiler.jit(form, parameters=p)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py in jit(ufl_object, parameters)

70 # Check if we get an element or a form 71 if isinstance(ufl_object, FiniteElementBase):

---> 72 return jit_element(ufl_object, parameters)

73 else: 74 return jit_form(ufl_object, parameters)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py in jit_element(element, parameters)

175 176 # Compile form

--> 177 compiled_form, module, prefix = jit_form(form, parameters)

178 179 form_data = compute_form_data(form)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py in jit_form(form, parameters)

156 157 # Extract compiled form

--> 158 check_swig_version(module)

159 compiled_form = _extract_form(module, module_name) 160 return compiled_form, module, module_name

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py in check_swig_version(compiled_module)

81 "version is not the same as extension module swig "\ 82 "version: '%s' != '%s' " % \

---> 83 (ufc.swigversion, compiled_module.swigversion))

84 85 def jit_form(form, parameters=None):

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/log.pyc in <lambda>(*message)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ufl/log.pyc in error(self, *message)

149 "Write error message and raise an exception." 150 self._log.error(*message)

--> 151 raise self._exception_type(self._format_raw(*message))

152 153 def begin(self, *message):

Exception: Incompatible swig versions detected. UFC swig version is not the same as extension module swig version: '3.0.2' != '3.0.5'

Change History (6)

comment:1 Changed 10 years ago by seanfarley (Sean Farley)

Owner: changed from macports-tickets@… to sean@…
Status: newassigned

Hmm, was swig recently updated? You might need to recompile UFC from source:

$ port uninstall ufc
$ port install -vs ufc

comment:2 in reply to:  1 Changed 10 years ago by mwathen@…

Replying to sean@…:

Hmm, was swig recently updated? You might need to recompile UFC from source:

$ port uninstall ufc
$ port install -vs ufc

When I do that I get

Error: ufc has been made obsolete by the port py27-ffc. Please install py27-ffc instead. Error: org.macports.configure for port ufc returned: obsolete port Please see the log file for port ufc for details:

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_ufc/ufc/main.log

To report a bug, follow the instructions in the guide:

http://guide.macports.org/#project.tickets

Error: Processing of port ufc failed

comment:3 Changed 10 years ago by seanfarley (Sean Farley)

Sorry, I meant to do that with py27-ffc.

comment:4 in reply to:  3 Changed 10 years ago by mwathen@…

Replying to sean@…:

Sorry, I meant to do that with py27-ffc.

I tried that but I still get the same version error. Does this mean I will have to try and install both ffc and dolfin by source?

comment:5 Changed 10 years ago by seanfarley (Sean Farley)

Yeah, let's try that next.

comment:6 Changed 9 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: assignedclosed

dolfin has been updated twice now and I think these issues have been resolved. Feel free to reopen if that's not the case.

Note: See TracTickets for help on using tickets.