pyccel / psydac

Python 3 library for isogeometric analysis
https://pyccel.github.io/psydac/
MIT License
52 stars 18 forks source link

Improve conversion to PETSc #408

Closed e-moral-sanchez closed 3 months ago

e-moral-sanchez commented 5 months ago

Implement a new conversion to PETSc which reduces the communication in the assembly to almost none. The converted PETSc.Vec and PETSc.Mat objects locally contain the same coefficients as the local StencilVector or StencilMatrix/BlockLinearOperator. This is done with an index conversion function which maps the Psydac natural multi-index to the PETSc global index.

A pyccelizable kernel for computing the I,J,V format of PETSc has been added.

The conversion is not implemented for:

kvrigor commented 4 months ago

The macOS runner now uses macOS 14 which uses the new Apple M1 silicon: https://github.com/orgs/community/discussions/102846

As a workaround, I'd suggest to change macos-latest to macos-12 in this file:

https://github.com/pyccel/psydac/blob/904b7d7ba06cfdbe00f0ce05af7d544bbb30030c/.github/workflows/continuous-integration.yml#L25-L27

I think Psydac support for macOS 14 is a new feature and could be addressed in a separate PR.

e-moral-sanchez commented 4 months ago

Thanks for the hint @kvrigor ! I tried it but the tests fail when printing the information about the MPI library. Do you know how to fix this?

kvrigor commented 4 months ago

My bad; I checked again and discovered that we've been using macOS-14 all along, but not exactly the same version. The last working macOS run was using macOS-14.4.1

image

And the failing one was using macOS-14.5:

image

This means we can't downgrade and thus we have to implement a workaround for the error introduced in macOS-14.5. I will experiment on this and share the bugfix once I find one.

yguclu commented 3 months ago

@kvrigor Could you please add a couple of lines to the PR description and explain the changes to file psydac/api/settings.py?

yguclu commented 3 months ago

@kvrigor Could you please add a couple of lines to the PR description and explain the changes to file psydac/api/settings.py?

Not necessary anymore, as those changes were added to devel in a separate PR, #421.