phoebe-project / phoebe2

PHOEBE - Eclipsing Binary Star Modeling Software
http://phoebe-project.org
GNU General Public License v3.0
76 stars 28 forks source link

Memory optimization #854

Closed aprsa closed 2 months ago

aprsa commented 2 months ago

This PR eliminates duplication in memory consumption between the internal passband structures and ndpolator structures. It also optimizes passband loading/saving. Addresses issue 68.

aprsa commented 2 months ago

@Raindogjones, @kecnry: can one of you please try to reproduce the segfault on macs and send me the traceback? I can't reproduce it on my end.

Raindogjones commented 2 months ago

@aprsa Just tried to reproduce with python3.11 on my intel mac and no problems - suspect this might be related to #850 and specific to M1/ARM64 macs...

Raindogjones commented 2 months ago

Paging @bpablo to see if it fails for him on his M1

kecnry commented 2 months ago

The segfaults are occurring outside of this PR as well - or at least on feature-blending (so likely a change to the CI runners themselves, perhaps triggering the same or similar issue as #850).

bpablo commented 2 months ago

I can reproduce. There is at least one test that seg faults: dperdt with the following error: Segmentation fault: 11 /Users/bertpablo/.pyenv/versions/3.11.9/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

kecnry commented 2 months ago

For this PR, I think we can safely ignore the failures as those are being handled in #850 and don't seem to have been made worse here (so let's keep any additional conversation in #850 and review this as-is).