FEniCS out-of-box example fail

  • Thread starter mzh
  • Start date
  • Tags
    Example
In summary, A user is having trouble running an example using FEniCS on a MacBook Pro running MacOS X 10.6.3. They suspect it may be due to installing the wrong version and are seeking help to resolve the issue.
  • #1
mzh
64
0
Dear Forum
Is anyone using FEniCS to perform finite-element method calculations? I want to work myself into PDE's and I found this Python based software. After installation, I tried to run the example, but I get the following error:
I installed the FEniCS binary on my MacBook Pro running under MacOS X 10.6.3 as described in the installation instructions.
Installation seems successful, at least i can open the fenics terminal.
So I 'cd' into
Code:
$ /Applications/FEniCS.app/Contents/Resources/share/dolfin/demo/pde/poisson/python
and hit

Code:
$ python demo_poisson.py

This is what I get:

Code:
Traceback (most recent call last):
  File "demo_poisson.py", line 37, in <module>
    from dolfin import *
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/__init__.py", line 13, in <module>
    from dolfin.cppimports import *
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/cppimports.py", line 4, in <module>
    import dolfin.cpp as cpp
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/cpp.py", line 28, in <module>
    _cpp = swig_import_helper()
  File "/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/cpp.py", line 24, in swig_import_helper
    _mod = imp.load_module('_cpp', fp, pathname, description)
ImportError: dlopen(/Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/_cpp.so, 2): no suitable image found. Did find:
 /Applications/FEniCS.app/Contents/Resources/lib/python2.6/site-packages/dolfin/_cpp.so: mach-o, but wrong architecture

Any help would be very appreciated. I though before I start screwing up a clean installation, I just ask for help because it might be a minor thing to fix. Unfortuantely, no real help from the FEniCS page yet, that's why I'm here.
Kind regards and thank you for the great work.
 
Physics news on Phys.org
  • #2
It sounds like you may have installed the wrong version of FEniCS. The version you have installed is meant for MacOS X 10.6, but it looks like you are running on MacOS X 10.6.3. You should double check that you have downloaded and installed the right version of FEniCS for your version of MacOS X. Alternatively, you could try installing FEniCS through a package manager like Homebrew or Conda, which might make it easier to install the correct version.
 

1. Why is the FEniCS out-of-box example failing?

There could be multiple reasons for this. It could be due to incorrect installation or configuration of FEniCS, errors in the code, or missing dependencies. It is important to carefully check the error messages and troubleshoot accordingly.

2. How can I fix the FEniCS out-of-box example failure?

The first step would be to carefully review the error messages and try to identify the root cause. If it is due to missing dependencies, make sure to install them. If it is due to errors in the code, try to debug and fix them. It is also helpful to consult the FEniCS community forums for assistance.

3. Is there a specific version of FEniCS that the out-of-box example works with?

The out-of-box example should work with the latest version of FEniCS. However, if you are using an older version, it is possible that there may be compatibility issues. It is always recommended to use the latest version of FEniCS for best results.

4. I have followed all the instructions, but the FEniCS out-of-box example still fails. What should I do?

In this case, it is best to seek help from the FEniCS community forums. You can post your error messages and code there for others to review and provide assistance. It is also helpful to provide details about your system setup and any steps you have taken to troubleshoot.

5. Can I modify the FEniCS out-of-box example to suit my own problem?

Yes, the out-of-box example is meant to be a starting point and can be modified to fit your specific problem. However, it is important to have a good understanding of the FEniCS framework and finite element methods before attempting to modify the code. It is also recommended to test your modifications on a small problem before applying it to a larger one.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
372
  • Programming and Computer Science
Replies
4
Views
5K
  • Programming and Computer Science
Replies
5
Views
9K
  • Programming and Computer Science
Replies
8
Views
877
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
9
Views
8K
Back
Top