Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel IO #119

Open
henry2004y opened this issue Nov 25, 2022 · 0 comments
Open

Parallel IO #119

henry2004y opened this issue Nov 25, 2022 · 0 comments

Comments

@henry2004y
Copy link
Owner

henry2004y commented Nov 25, 2022

For the static virtual satellite tracing (845 frames), I do not see decent improvements with 2, 4 threads over 1 thread:

Threads Julia [s]
1 78
2 70
4 68

With more tests, I found that the login nodes Turso as well as compute nodes Vorna have large variations in performance, which also affects multi-threading. Here is another set of run results:

200 frames, serial:
  2.052 s (15663 allocations: 2.95 MiB)
200 frames, 2 threads:
  1.490 s (15080 allocations: 2.94 MiB)
845 frames, serial:
  45.341 s (66213 allocations: 12.49 MiB)
845 frames, 2 threads:
  33.814 s (63695 allocations: 12.42 MiB)

I don't know why it doesn't scale linearly.

function extractsat(files::AbstractVector{String}, var::String, cid::Int)
v = open(files[1], "r") do fid
footer = getfooter(fid)
nodevar = findall("//VARIABLE", footer)
T, _, _, _, vsize = getvarinfo(nodevar, var)
Array{T,2}(undef, vsize, length(files))
end
for i in eachindex(files)
fid = open(files[i], "r")
footer = getfooter(fid)
nodevar = findall("//VARIABLE", footer)
cellid = getcellid(fid, nodevar)
c_ = findfirst(isequal(cid), cellid)
_, offset, _, dsize, vsize = getvarinfo(nodevar, var)
seek(fid, offset + (c_ - 1)*vsize*dsize)
@views read!(fid, v[:,i])
end
v
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant