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

support SharedArrays #463

Merged
merged 1 commit into from
Mar 16, 2018
Merged

support SharedArrays #463

merged 1 commit into from
Mar 16, 2018

Conversation

bjarthur
Copy link
Member

@bjarthur bjarthur commented Mar 16, 2018

is there a reason not to support SharedArrays? all this PR does is to use type AbstractArray instead of Array in select function signatures. includes a test.

@bjarthur bjarthur merged commit 645c9a0 into master Mar 16, 2018
@bjarthur bjarthur deleted the bja/shared branch March 16, 2018 23:16
@bjarthur
Copy link
Member Author

thx for the approval!

@musm
Copy link
Member

musm commented Mar 16, 2018

lgmt.

undefined and null tests are failing on windows any reason to suspect this PR? I don't think they were before

@bjarthur
Copy link
Member Author

egads. well, the "undefined and null" testset is where i inadvertently placed the test for this PR. do SharedArrays perhaps not work on windows? i can't test until monday as i only have access to a windows box at work.

@bjarthur
Copy link
Member Author

the problem appears to have nothing to do with SharedArrays, but rather that h5write behaves differently on windows vs. OS X depending on whether the filename was generated with tempdir() or tempname():

on windows:

julia> h5write(tempdir()*"asdfasdfasdf.tmp", "/data", rand(3,4,5))     # works!

julia> h5write(tempname(), "/data", rand(3,4,5))                       # doesn't work :(
ERROR: This does not appear to be an HDF5 file
Stacktrace:
 [1] #h5open#3(::Bool, ::Function, ::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::HDF5.HDF5Properties, ::HDF5.HDF5Properties) at C:\Users\arthurb\.julia\v0.6\HDF5\src\HDF5.jl:598
 [2] h5write(::String, ::String, ::SharedArray{UInt16,3}) at C:\Users\arthurb\.julia\v0.6\HDF5\src\HDF5.jl:687

julia> tempname()
"C:\\Users\\arthurb\\AppData\\Local\\Temp\\jl_79FF.tmp"

vs. on OS X:

julia> h5write(tempdir()*"asdfasdfasdf.tmp", "/data", rand(3,4,5))    # works!

julia> h5write(tempname(), "/data", rand(3,4,5))                      # works!

julia> tempname()
"/var/folders/x6/gf97mhtj7kd967vg252ygy4nmsxs4y/T/juliaE1apIA"

ideas why this would be the case?

@musm
Copy link
Member

musm commented Mar 19, 2018

Even simpler

# Windows behavior
julia> f1 = tempdir()*"adf.tmp"
"C:\\Users\\Mus\\AppData\\Local\\Temp\\adf.tmp"

julia> f2 = tempname()
"C:\\Users\\Mus\\AppData\\Local\\Temp\\jl_4E2F.tmp"

julia> ishdf5(f1)
true

julia> ishdf5(f2)
false

@musm
Copy link
Member

musm commented Mar 19, 2018

In the first case windows does not create the file f1 in the second case windows does create the file f2 and thus ishdf5(f2) fails

@musm
Copy link
Member

musm commented Mar 19, 2018

ref JuliaLang/julia#25530

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

Successfully merging this pull request may close these issues.

2 participants