Subject: [Instant-dev] Windows problem

From: "Johannes Ring" <[email-masked]>
Date: Thu, 12 Mar 2009 09:55:45 +0100 (CET)

Hi,

I have a problem when running some PyDOLFIN tests on Windows:

[snip]
RuntimeError: In instant.recompile: The module did not compile, see
'c:\docume~1\fenics~1\locals~1\temp\tmpwjyrxt2009-3-12-09-33_instant\form_b76a58d1149728584878f64b9d080412d3223f47\compile.log'

Looking at compile.log reveals that it cannot find swig\ufc.i:

form_b76a58d1149728584878f64b9d080412d3223f47.i(29): Error: Unable to find
'swig\ufc.i'

The problem seems to be how swig_cmd is defined in setup.py in the same
folder:

  swig_cmd = 'swig -python -Ic:\fenicsslave\local\include -c++ ...'

When the string swig_cmd is sent to os.system in the next step (in
setup.py) the command actually becomes

  swig -python -Ic:fenicsslavelocalinclude -c++ ...

which obviously do not work.

I'm not sure if this should be fixed in Instant or in FFC but I suggest to
make swig_cmd a raw string by prefixing it with 'r', that is in
src/instant/codegeneration.py:

-        swig_cmd ='swig -python %s %s %s'
+        swig_cmd = r'swig -python %s %s %s'

Johannes

---

From: Johan Hake <[email-masked]>
Date: Thu, 12 Mar 2009 10:06:29 +0100

On Thursday 12 March 2009 09:55:45 Johannes Ring wrote:
> 'c:\docume~1\fenics~1\locals~1\temp\tmpwjyrxt2009-3-12-09-33_instant\form_b
>76a58d1149728584878f64b9d080412d3223f47\compile.log'
>

I think it is here, in instant, that we should correct it.

Johan

---

From: Kent Andre <[email-masked]>
Date: Thu, 12 Mar 2009 10:07:39 +0100

> +        swig_cmd = r'swig -python %s %s %s'

This should be fixed in instant. Thanks for the bug report!

This is now updated in hg. See if it works. 

Kent

---

From: "Johannes Ring" <[email-masked]>
Date: Thu, 12 Mar 2009 10:57:50 +0100 (CET)

> This is now updated in hg. See if it works.

Yes, that fixed the problem. Most of the DOLFIN tests and demos now works.
I will report the remaining problems to dolfin-dev.

Johannes