Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2139 add maxpy and mdot support #2141

Closed
wants to merge 108 commits into from
Closed

Conversation

prudhomm
Copy link
Member

@prudhomm prudhomm commented Jul 14, 2023

  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes?
  • Have you successfully run the Feel++ testsuite with your changes locally?
  • Have you written Doxygen comments in your contribution ?

thomas-saigre and others added 30 commits January 25, 2023 16:19
the architecture is present but still bugs in it
[ci skip]
/cc @alielarif
[skip feelpp, skip tests, skip toolboxes, skip mor]
now scripts Offline.py and Online.py are installed and can be loaded.
The function implemented are used in test_nirb

for now only offline has been refactored

[ci skip]
[ci skip]
@thomas-saigre
Copy link
Contributor

prudhomm and others added 7 commits July 16, 2023 23:19
…ture

/cc @thomas-saigre
skip feelpp skip tests skip toolboxes skip mor
#2139
[ci skip]
add header to stl for conversion

test not passing yet
/cc @prudhomm

[ci skip]
convert by hand the feelpp._core.WorldsComm in a List[feelpp._core.WroldComm]

[skip feelpp, skip toolboxes, skip mor, skip tests]

/cc @prudhomm
because the wrapping of add(List[float], List[vector]) messed it up
/cc @prudhomm
[skip feelpp, skip tests, skip mor, skip toolboxes]
@@ -175,10 +175,11 @@ def functionSpace( mesh, space="Pch", order=1, worldscomm=None):
"""
if worldscomm is None:
worldscomm = Environment.worldsComm(1)
worldscomm_list = [worldcomm for worldcomm in worldscomm]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prudhomm With the adding of the header to pybind11/stl.h, the constructor for spaces[key] was no longer waiting a feelpp._core.WorldsComm but a List[feelpp._core.WorldComm].
I found this workaround by converting it by hand to a Python list, but there may be a better way to do it...

#2139

@@ -276,7 +276,7 @@ PYBIND11_MODULE(_alg, m )
.def( "addVector", static_cast<void ( Vector<double>::* )
( std::shared_ptr<Vector<double>> const& , std::shared_ptr<MatrixSparse<double>> const& )
>( &Vector<double>::addVector ), "add the product of a MatrixSparse and a vector to this vector" )
.def( "add", [](Vector<double> &v, double a, Vector<double> const& w){ v.add(a, w); }, "add a scalar*vector to this vector" )
.def( "addVector", [](Vector<double> &v, double a, Vector<double> const& w){ v.add(a, w); }, "add a scalar*vector to this vector" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prudhomm With the wrapping add(List[float] alphas, List[vector] vs) computing $u += \sum_i \alpha_i vs[i]$, the initial add(float alpha, vector v) computing $u += \alpha u$ was no longer included in the wrapped class.
A workaround I found is to rename this method to addVector so it can be wrapped correctly. Maybe there is another way to do it...

#2139

thomas-saigre and others added 4 commits August 5, 2023 17:43
- fix offline execution and refactor code with removing some loops
- fix onlien execution : used the right number of basis functions

#2139

[skip feelpp, skip toolboxes, skip mor, skip tests]
[skip feelpp, skip mor, skip tests, skip toolboxes]
@prudhomm
Copy link
Member Author

@thomas-saigre I sync'ed with develop. there is still work to do in mor

…eelpp into 2139-add-maxpy-and-mdot-support

[ci skip]
[skip feelpp, skip tests]
@github-actions
Copy link

Stale pull request message

Copy link

github-actions bot commented Dec 8, 2023

Stale pull request message

Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants