Parallelize subproblem solves in SiLO/address memory leak on Linux

Đang mở
#21 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Lĩnh vực
data

Hướng nghiên cứu

The issue describes memory retention in processAllTrials_Async and parallel SiLO subproblem solves, but names no source files or tests. Start by locating those entry points and reading the existing trial loop and SiLO solve flow. Define a design for saving subproblems, distributing them across workers, and gathering results; done means the pipeline handles the proposed parallel work and addresses the memory issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug enhancement

Two probably-related issues, one a bug, the other an enhancement:
1)
Kort Driessen had encountered a failure on very long recordings under Linux, that may be the cause of inefficiencies in our codeocean pipeline.

Kort's diagnosis was:
Memory allocated during each iteration of processAllTrials_Async’s trial loop was not being returned to the operating system.
MATLAB clear did not actually cause the process’s resident memory to fall.
He tried malloc_trim, changing relevant glibc settings, and other approaches, without solving it.
He concluded that the reliable way to recover the trapped memory was to terminate the process entirely.

Kort’s workaround
His solution was to sub-batch the acquisition:
Split the acquisition into batches.
Run each batch in its own process.
Save intermediate results before that process exits.
Let the process terminate, which returns its memory to the OS.
Start a fresh process for the next batch and resume from the saved intermediate state.
He implemented this in his fork of ophys-slap2-analysis, on the wisc_dev branch. At the time of the email, he said his fork was about 15 commits behind Allen’s main branch but that he could rebase it.

Carter Peene then took Kort’s write-up and had an agent modify his processing repo by monkeypatching processAllTrials_Async to use Kort’s sub-batching strategy. He started reprocessing three SLAP2 sessions that had repeatedly failed. On those machines, he said those sessions normally took about 30 hours to process. The thread does not contain the eventual outcome of those reruns.

SiLO already naturally breaks up solves into subproblems, and runs those subproblems in parallel. The number of subproblems greatly exceeds the number of cores on a single CO node, so we could get to processed data faster by parallelizing across nodes. Could we refactor SiLO to save out the subproblems, and assign them across many workers (embarrassingly parallel) then gather the results, in a pipeline?

Solving 2 seems likely to solve 1 as well.

Ngôn ngữ chính
MATLAB
Star
3
Fork
3
Merge trung bình
4 ngày 6 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AllenNeuralDynamics/GIAnT-MATLAB

Tất cả issue của AllenNeuralDynamics/GIAnT-MATLAB

Issue tương tự

Thêm issue về MATLAB

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.