Write DArray to HDF5/JLD without first converting to Array
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
- Đình trệ
- Công nghệ
- julia
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Bắt đầu với các ví dụ write_darray và read_darray của issue, bao gồm jldopen, localindexes, localpart và remotecall_wait. Điều tra cách DistributedArrays và lớp HDF5/JLD có thể biểu diễn một biến phân tán thay vì các đối tượng theo từng tiến trình. Được xem là hoàn thành khi có một phương pháp được hỗ trợ có thể ghi và đọc một DArray mà không thu thập nó về cục bộ và không tạo ra 2n+2 biến tệp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It would be useful to have a way to write DArrays to file without first collecting all of the data on the local process. I found a pretty hacky way of doing this that looks like this:
function write_darray{T<:AbstractFloat}(filepath::AbstractString, darr::DArray{T})
function write_localpart(pid::Int)
jldopen(filepath, "r+") do file
write(file, "inds$pid", collect(localindexes(darr)))
write(file, "arr$pid", localpart(darr))
end
end
# Write DArray metadata
jldopen(filepath, "w") do file
write(file, "dims", darr.dims)
write(file, "pids", collect(darr.pids))
end
# For each process, write the local indices and local part
for pid in darr.pids
remotecall_wait(pid, write_localpart, pid)
sleep(0.001) # This is for some reason necessary, or else HDF5 complains that the new object already exists
end
end
function read_darray(filepath::AbstractString)
file = jldopen(filepath, "r")
dims = read(file, "dims")
pids = read(file, "pids")
out = zeros(dims...)
# Reassemble local parts
for pid in pids
inds = read(file, "inds$pid")
out[inds...] = read(file, "arr$pid")
end
close(file)
return out
end
However, there must be a better way than this, especially one that would create a single variable in the file filepath (rather than 2n+2 in my case, where n is the number of processes the DArray is stored on).
- Ngôn ngữ chính
- Julia
- Star
- 205
- Fork
- 34
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaParallel/DistributedArrays.jl
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JuliaParallel/DistributedArrays.jl#255 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
JuliaParallel/DistributedArrays.jl#239 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
JuliaParallel/DistributedArrays.jl#238 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Tất cả issue của JuliaParallel/DistributedArrays.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliaParallel/Hwloc.jl#93 ·
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`Có thể đã có người làm @devmotion đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliaStats/Distributions.jl#2117 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
TomerAberbach/profiler-md#970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
grame-cncm/faust#1409 ·
Maintainer thường phản hồi trong vòng 1 ngày