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

promotion to SharedArray #15002

Open
skariel opened this issue Feb 9, 2016 · 6 comments
Open

promotion to SharedArray #15002

skariel opened this issue Feb 9, 2016 · 6 comments
Labels
parallelism Parallel or distributed computation

Comments

@skariel
Copy link
Contributor

skariel commented Feb 9, 2016

so the following code eventually produces a non-shared array and for me it was a surprise:

a = SharedArray(Float32, 3)
a[:] = 0
a += 1

I have a function that sometimes gets an Array and other times a SharedArray. Now it has a different behaviour depending on the type used.

Is this behaviour intended?

@KristofferC
Copy link
Member

Ref #12964

@skariel
Copy link
Contributor Author

skariel commented Feb 9, 2016

(a quick fix of course is to iterate and do everything in-place to keep it general. Using a.s += 1 will make it not general)

@JohnHBrock
Copy link
Contributor

@skariel Is this on master? Can you run versioninfo() in the REPL and paste what it outputs?

@skariel
Copy link
Contributor Author

skariel commented Feb 10, 2016

Julia Version 0.4.3
Commit a2f713d (2016-01-12 21:37 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

@DanielArndt
Copy link
Contributor

This is very related to the segfault I reported in #14459 -- But as you can see by the reference @KristofferC gave, it appears this was an intentional change.

@tkelman
Copy link
Contributor

tkelman commented Feb 10, 2016

Not an uncontroversial one though.

@brenhinkeller brenhinkeller added the parallelism Parallel or distributed computation label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parallelism Parallel or distributed computation
Projects
None yet
Development

No branches or pull requests

6 participants