pySDC icon indicating copy to clipboard operation
pySDC copied to clipboard

Make pySDC compatible with numpy 2.0

Open jakob-fritz opened this issue 1 year ago • 7 comments

There was an update to numpy 2.0, and it seem to have broken the code.

CI-Job with numpy 1.26.4: https://github.com/Parallel-in-Time/pySDC/actions/runs/9542384329/job/26297127121 CI-Job with numpy 2.0.0: https://github.com/Parallel-in-Time/pySDC/actions/runs/9577459034/job/26405728204

Some changes to the code seem to be needed to fix it.

jakob-fritz avatar Jun 19 '24 07:06 jakob-fritz

Looks like numpy.ogrid now returns a tuple, see v2.0 vs. v1.25. Thoughts?

pancetta avatar Jun 19 '24 07:06 pancetta

I suppose we just cast the tuples to list... Same for numpy.meshgrid by the way.

brownbaerchen avatar Jun 19 '24 07:06 brownbaerchen

I did some fixes. If the tests pass on my fork, I will do a PR. However, there is this issue of some incompatibilities of numpy with matplotlib in the parallel SDC project, I think. @pancetta, why do you limit the matplotlib version? We can get rid of this limit or limit the numpy version further, I guess.

brownbaerchen avatar Jun 19 '24 07:06 brownbaerchen

Fixed with #445

tlunet avatar Jun 24 '24 07:06 tlunet

Well, just removing plotting removes plots from the website...

brownbaerchen avatar Jun 25 '24 05:06 brownbaerchen

Darn, you're right, thanks for catching this. Thoughts @tlunet ?

pancetta avatar Jun 25 '24 18:06 pancetta

None ... to be honest, I secretly hoped that no one would catch that :sweat_smile:

My first guess : it's either trial and error on a separate branch to solve the deadlock, or duplicate the test without MPI, and generate the figures with it.

tlunet avatar Jun 25 '24 19:06 tlunet

If I'm not mistaken this is now fixed, right?

pancetta avatar Sep 05 '24 06:09 pancetta

Guess, so. I believe @jakob-fritz implemented checks in the CI if all plots are there, so we should know if some are missing (right?)

brownbaerchen avatar Sep 05 '24 06:09 brownbaerchen