sieve-dev FIAT import question

Jed Brown jed at 59A2.org
Tue Mar 25 07:22:30 CDT 2008


When I try to build the sieve examples, I get errors like the one below.  If I
move the `import FIAT.shapes' up to the top of the file, it works just fine.  I
don't know if there is something peculiar about my configuration, but this
problem hasn't gone away in the last weeks so I thought I'd mention it.  My
configuration included the options:

--with-fiat-dir=/home/jed/usr/lib/python2.5/site-packages/FIAT --with-fiat=1

but the error persists with --download-fiat=yes instead.

Traceback (most recent call last):
  File "bratu_quadrature.fiat", line 60, in <module>
    FEMQuadrature().run()
  File "bratu_quadrature.fiat", line 46, in run
    import FIAT.shapes
  File "/home/jed/usr/petsc-dev/config/BuildSystem/importer.py", line 37, in
  import_module
    mod     = self.load_tail(q, tail)
  File "/home/jed/usr/petsc-dev/config/BuildSystem/importer.py", line 88, in
  load_tail
    m = self.import_it(head, mname, m)
  File "/home/jed/usr/petsc-dev/config/BuildSystem/importer.py", line 130, in
  import_it
    mod = self.loader.load_module(fqname, stuff[0])
  File "/usr/lib/python2.5/ihooks.py", line 326, in load_module
    exec code in m.__dict__
  File "/home/jed/usr/lib/python2.5/site-packages/FIAT/shapes.py", line 16, in
  <module>
    import numpy, numpy.linalg, exceptions
  File "/home/jed/usr/petsc-dev/config/BuildSystem/importer.py", line 36, in
  import_module
    q, tail = self.find_head_package(parent, name)
  File "/home/jed/usr/petsc-dev/config/BuildSystem/importer.py", line 79, in
  find_head_package
    raise ImportError, "No module named " + qname
ImportError: No module named numpy
make: *** [bratu_quadrature.h] Error 1


On another note, the bratu example will work much better with the following one
character fix.

diff -r 6cfe5326613c src/dm/mesh/examples/tutorials/bratu.cxx
--- a/src/dm/mesh/examples/tutorials/bratu.cxx  Tue Mar 25 06:13:18 2008 -0500
+++ b/src/dm/mesh/examples/tutorials/bratu.cxx  Tue Mar 25 13:17:47 2008 +0100
@@ -1143,7 +1143,7 @@ PetscErrorCode Jac_Structured_3d_FD(DALo
           v[1] = -hx*hz/hyb;                                       col[1].k = k;     col[1].j = j - 1; col[1].i = i;
           v[2] = -hy*hz/hxb;                                       col[2].k = k;     col[2].j = j;     col[2].i = i - 1;
           v[3] = (hy*hz/hxa + hy*hz/hxb + hx*hz/hya + hx*hz/hyb + hx*hy/hza + hx*hy/hzb); col[3].k = row.k; col[3].j = row.j; col[3].i = row.i;
-          v[4] = -hx*hy/hxa;                                       col[4].k = k + 1; col[4].j = j;     col[4].i = i;
+          v[4] = -hx*hy/hza;                                       col[4].k = k + 1; col[4].j = j;     col[4].i = i;
           v[5] = -hx*hz/hya;                                       col[5].k = k;     col[5].j = j + 1; col[5].i = i;
           v[6] = -hy*hz/hxa;                                       col[6].k = k;     col[6].j = j;     col[6].i = i + 1;
           v[3] -= lambda*hx*hy*hz*PetscExpScalar(x[k][j][i]);


Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.mcs.anl.gov/mailman/private/sieve-dev/attachments/20080325/c91f9ef3/attachment.pgp>


More information about the sieve-dev mailing list