GithubHelp home page GithubHelp logo

Comments (4)

ajaust avatar ajaust commented on July 28, 2024

It seems that I fixed my problems with the precice bindings. (see precice/fenics-adapter#39 (comment)). I upgraded to preCICE 1.6.0 and installed the FEniCS-adapter after having the Python bindings installed.

python3 -m pip install --user .
python3 -c "import fenicsadapter"
/home/jaustar/projects/fenics-precice-parallel/fenics-adapter/fenicsadapter/core.py:14: Warning: This version of the precice bindings is deprecated and will be removed in preCICE version 2.0.0. You may import the updated python module using "import precice_future as precice" instead. Refer to the changelog for more information.
  import precice

The warning sounds reasonable to me and indicates that the adapter is installed. However, the parallel test case still shows the same error.

python3 heat.py -d
/home/jaustar/.local/lib/python3.6/site-packages/fenicsadapter/core.py:14: Warning: This version of the precice bindings is deprecated and will be removed in preCICE version 2.0.0. You may import the updated python module using "import precice_future as precice" instead. Refer to the changelog for more information.
  import precice
Traceback (most recent call last):
  File "heat.py", line 161, in <module>
    interpolation_strategy = fenicsadapter.core.ExactInterpolationExpression
AttributeError: module 'fenicsadapter.core' has no attribute 'ExactInterpolationExpression'

from tutorials.

ajaust avatar ajaust commented on July 28, 2024

So... I was able to figure out something more.

I went back to the master branch

git checkout master
git pull

I rebuilt the adapter and now the error message that I had before disappeared. The tutorial HT/partitioned-heat/fenics-fenics works. However, the parallel example in the branch parallelFenics seems to use an older fenicsadapter interface. The parallel example is importing the adapter as

import fenicsadapter.core

while the non-parallel example does

from fenicsadapter import Adapter, ExactInterpolationExpression, GeneralInterpolationExpression

Now the parallel example fails with

mpirun -np 1 python3 heat.py -d
/home/jaustar/.local/lib/python3.6/site-packages/fenicsadapter/fenicsadapter.py:16: Warning: This version of the precice bindings is deprecated and will be removed in preCICE version 2.0.0. You may import the updated python module using "import precice_future as precice" instead. Refer to the changelog for more information.
  import precice
Traceback (most recent call last):
  File "heat.py", line 33, in <module>
    import fenicsadapter.core
ModuleNotFoundError: No module named 'fenicsadapter.core'

I checked the source code and came to the conclusion that the adapter in master is only suitable for serial runs. Now, I removed the fenicsadapter, checked out the parallelFenics branch of the tutorial and the adapter and end up with

  import precice
Traceback (most recent call last):
  File "heat.py", line 161, in <module>
    interpolation_strategy = fenicsadapter.core.ExactInterpolationExpression
AttributeError: module 'fenicsadapter.core' has no attribute 'ExactInterpolationExpression'

again. I checked core.py (see here) and there is no class called ExactInterpolationExpression. This class (and also GeneralInterpolationExpression) only exist in the serial adapter in the main branch.

from tutorials.

IshaanDesai avatar IshaanDesai commented on July 28, 2024

The parallel functionality in fenics-adapter is being developed from scratch based on the new design. The current state of this implementation is in this PR: precice/fenics-adapter#71
With this new proposed implementation the HT/partitioned-heat/fenics-fenics test case will work directly.

from tutorials.

IshaanDesai avatar IshaanDesai commented on July 28, 2024

The parallel FEniCS case for the partitioned heat conduction tutorial is now working in this state.

from tutorials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.