-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix uninitialized array #149
fix uninitialized array #149
Conversation
psychocoderHPC
commented
Jan 23, 2014
- initialize sendEvents and receiveEvents array to avoid deadlocks
@@ -523,6 +523,8 @@ class GridBuffer | |||
{ | |||
sendExchanges[i] = NULL; | |||
receiveExchanges[i] = NULL; | |||
receiveEvents[i]=EventTask(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add a comment why this would deadlock otherwise so we don't forget
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Remembering @psychocoderHPC today) He just realized it does not really deadlock since he checked all the time for hasExchange (or so). Anyway, if one does not check for it, it will probably deadlock on this un-initialized variables because of ...
(jump in @psychocoderHPC ) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any more comments on this? otherwise I'll merge it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please wait I will add some code comments
f60a0ac72c Merge pull request ComputationalRadiationPhysics#155 from ComputationalRadiationPhysics/dev 4c73dde10d Merge pull request ComputationalRadiationPhysics#152 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 fc428aa8e9 update release date for 0.2.0 1e32118c80 Merge pull request ComputationalRadiationPhysics#154 from sbastrakov/topic-addInt3Float3 84008fb6ae Add float3 and int3 with make-functions 4d5eace02a Merge pull request ComputationalRadiationPhysics#153 from sbastrakov/topic-finalizeBlackScholes2 bc35f6a822 Add Black-Scholes example 4b1ab5722f Merge pull request ComputationalRadiationPhysics#146 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 52ddba6b26 changelog and version increase to 0.2.0 aabb8d5339 Merge pull request ComputationalRadiationPhysics#145 from psychocoderHPC/fix-minimalCMakeRequirements 7795e58c0c Merge pull request ComputationalRadiationPhysics#147 from psychocoderHPC/topic-updateAuthorSection 974afe8451 Merge pull request ComputationalRadiationPhysics#150 from sbastrakov/doc-clarifyThreadUnsafety caf4fdda1e Extend the docs with thread unsafety 91d78da7eb Merge pull request ComputationalRadiationPhysics#149 from psychocoderHPC/topic-setTravisCmakeToMinimumRequiredVersion a3bc920dfa use CMake 3.11.4 for travis tests 9ccab281e9 update author section 6bc13a220c Merge pull request ComputationalRadiationPhysics#148 from psychocoderHPC/topic-cuplaLogo 406fb5b93a update minimal CMake requirements to 3.11.4 9c32408da3 add cupla logo cd6b9859d4 Merge pull request ComputationalRadiationPhysics#144 from psychocoderHPC/topic-hipPinnedMemory c9fb7dd047 pin memory allocated with `cuplaMallocHoast` 92f8c82474 Merge pull request ComputationalRadiationPhysics#143 from psychocoderHPC/topic-updateAlpakaTo0.4.0 27f0bca235 Merge commit '0f175188a374a0194145728f2083256e1eb14b13' into topic-updateAlpakaTo0.4.0 0f175188a3 Squashed 'alpaka/' changes from d5e59590f..ab0b8a460 1e4aea9747 Merge pull request ComputationalRadiationPhysics#142 from sbastrakov/fix-typeCastWarnings 8f453a4bf5 Fix warnings concerning type casting 08f80ef24b Merge pull request ComputationalRadiationPhysics#141 from sbastrakov/topic-extendAtomicComments b3d34b28ab Extend comments of atomic functions git-subtree-dir: thirdParty/cupla git-subtree-split: f60a0ac72cb175d4a8a67301882f7a6b1de4c3c3
f60a0ac72c Merge pull request ComputationalRadiationPhysics#155 from ComputationalRadiationPhysics/dev 4c73dde10d Merge pull request ComputationalRadiationPhysics#152 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 fc428aa8e9 update release date for 0.2.0 1e32118c80 Merge pull request ComputationalRadiationPhysics#154 from sbastrakov/topic-addInt3Float3 84008fb6ae Add float3 and int3 with make-functions 4d5eace02a Merge pull request ComputationalRadiationPhysics#153 from sbastrakov/topic-finalizeBlackScholes2 bc35f6a822 Add Black-Scholes example 4b1ab5722f Merge pull request ComputationalRadiationPhysics#146 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 52ddba6b26 changelog and version increase to 0.2.0 aabb8d5339 Merge pull request ComputationalRadiationPhysics#145 from psychocoderHPC/fix-minimalCMakeRequirements 7795e58c0c Merge pull request ComputationalRadiationPhysics#147 from psychocoderHPC/topic-updateAuthorSection 974afe8451 Merge pull request ComputationalRadiationPhysics#150 from sbastrakov/doc-clarifyThreadUnsafety caf4fdda1e Extend the docs with thread unsafety 91d78da7eb Merge pull request ComputationalRadiationPhysics#149 from psychocoderHPC/topic-setTravisCmakeToMinimumRequiredVersion a3bc920dfa use CMake 3.11.4 for travis tests 9ccab281e9 update author section 6bc13a220c Merge pull request ComputationalRadiationPhysics#148 from psychocoderHPC/topic-cuplaLogo 406fb5b93a update minimal CMake requirements to 3.11.4 9c32408da3 add cupla logo cd6b9859d4 Merge pull request ComputationalRadiationPhysics#144 from psychocoderHPC/topic-hipPinnedMemory c9fb7dd047 pin memory allocated with `cuplaMallocHoast` 92f8c82474 Merge pull request ComputationalRadiationPhysics#143 from psychocoderHPC/topic-updateAlpakaTo0.4.0 27f0bca235 Merge commit '0f175188a374a0194145728f2083256e1eb14b13' into topic-updateAlpakaTo0.4.0 0f175188a3 Squashed 'alpaka/' changes from d5e59590f..ab0b8a460 1e4aea9747 Merge pull request ComputationalRadiationPhysics#142 from sbastrakov/fix-typeCastWarnings 8f453a4bf5 Fix warnings concerning type casting 08f80ef24b Merge pull request ComputationalRadiationPhysics#141 from sbastrakov/topic-extendAtomicComments b3d34b28ab Extend comments of atomic functions git-subtree-dir: thirdParty/cupla git-subtree-split: f60a0ac72cb175d4a8a67301882f7a6b1de4c3c3
f60a0ac72c Merge pull request ComputationalRadiationPhysics#155 from ComputationalRadiationPhysics/dev 4c73dde10d Merge pull request ComputationalRadiationPhysics#152 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 fc428aa8e9 update release date for 0.2.0 1e32118c80 Merge pull request ComputationalRadiationPhysics#154 from sbastrakov/topic-addInt3Float3 84008fb6ae Add float3 and int3 with make-functions 4d5eace02a Merge pull request ComputationalRadiationPhysics#153 from sbastrakov/topic-finalizeBlackScholes2 bc35f6a822 Add Black-Scholes example 4b1ab5722f Merge pull request ComputationalRadiationPhysics#146 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 52ddba6b26 changelog and version increase to 0.2.0 aabb8d5339 Merge pull request ComputationalRadiationPhysics#145 from psychocoderHPC/fix-minimalCMakeRequirements 7795e58c0c Merge pull request ComputationalRadiationPhysics#147 from psychocoderHPC/topic-updateAuthorSection 974afe8451 Merge pull request ComputationalRadiationPhysics#150 from sbastrakov/doc-clarifyThreadUnsafety caf4fdda1e Extend the docs with thread unsafety 91d78da7eb Merge pull request ComputationalRadiationPhysics#149 from psychocoderHPC/topic-setTravisCmakeToMinimumRequiredVersion a3bc920dfa use CMake 3.11.4 for travis tests 9ccab281e9 update author section 6bc13a220c Merge pull request ComputationalRadiationPhysics#148 from psychocoderHPC/topic-cuplaLogo 406fb5b93a update minimal CMake requirements to 3.11.4 9c32408da3 add cupla logo cd6b9859d4 Merge pull request ComputationalRadiationPhysics#144 from psychocoderHPC/topic-hipPinnedMemory c9fb7dd047 pin memory allocated with `cuplaMallocHoast` 92f8c82474 Merge pull request ComputationalRadiationPhysics#143 from psychocoderHPC/topic-updateAlpakaTo0.4.0 27f0bca235 Merge commit '0f175188a374a0194145728f2083256e1eb14b13' into topic-updateAlpakaTo0.4.0 0f175188a3 Squashed 'alpaka/' changes from d5e59590f..ab0b8a460 1e4aea9747 Merge pull request ComputationalRadiationPhysics#142 from sbastrakov/fix-typeCastWarnings 8f453a4bf5 Fix warnings concerning type casting 08f80ef24b Merge pull request ComputationalRadiationPhysics#141 from sbastrakov/topic-extendAtomicComments b3d34b28ab Extend comments of atomic functions git-subtree-dir: thirdParty/cupla git-subtree-split: f60a0ac72cb175d4a8a67301882f7a6b1de4c3c3
f60a0ac72c Merge pull request ComputationalRadiationPhysics#155 from ComputationalRadiationPhysics/dev 4c73dde10d Merge pull request ComputationalRadiationPhysics#152 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 fc428aa8e9 update release date for 0.2.0 1e32118c80 Merge pull request ComputationalRadiationPhysics#154 from sbastrakov/topic-addInt3Float3 84008fb6ae Add float3 and int3 with make-functions 4d5eace02a Merge pull request ComputationalRadiationPhysics#153 from sbastrakov/topic-finalizeBlackScholes2 bc35f6a822 Add Black-Scholes example 4b1ab5722f Merge pull request ComputationalRadiationPhysics#146 from psychocoderHPC/topic-changeLogVersionIncreaseTo0.2.0 52ddba6b26 changelog and version increase to 0.2.0 aabb8d5339 Merge pull request ComputationalRadiationPhysics#145 from psychocoderHPC/fix-minimalCMakeRequirements 7795e58c0c Merge pull request ComputationalRadiationPhysics#147 from psychocoderHPC/topic-updateAuthorSection 974afe8451 Merge pull request ComputationalRadiationPhysics#150 from sbastrakov/doc-clarifyThreadUnsafety caf4fdda1e Extend the docs with thread unsafety 91d78da7eb Merge pull request ComputationalRadiationPhysics#149 from psychocoderHPC/topic-setTravisCmakeToMinimumRequiredVersion a3bc920dfa use CMake 3.11.4 for travis tests 9ccab281e9 update author section 6bc13a220c Merge pull request ComputationalRadiationPhysics#148 from psychocoderHPC/topic-cuplaLogo 406fb5b93a update minimal CMake requirements to 3.11.4 9c32408da3 add cupla logo cd6b9859d4 Merge pull request ComputationalRadiationPhysics#144 from psychocoderHPC/topic-hipPinnedMemory c9fb7dd047 pin memory allocated with `cuplaMallocHoast` 92f8c82474 Merge pull request ComputationalRadiationPhysics#143 from psychocoderHPC/topic-updateAlpakaTo0.4.0 27f0bca235 Merge commit '0f175188a374a0194145728f2083256e1eb14b13' into topic-updateAlpakaTo0.4.0 0f175188a3 Squashed 'alpaka/' changes from d5e59590f..ab0b8a460 1e4aea9747 Merge pull request ComputationalRadiationPhysics#142 from sbastrakov/fix-typeCastWarnings 8f453a4bf5 Fix warnings concerning type casting 08f80ef24b Merge pull request ComputationalRadiationPhysics#141 from sbastrakov/topic-extendAtomicComments b3d34b28ab Extend comments of atomic functions git-subtree-dir: thirdParty/cupla git-subtree-split: f60a0ac72cb175d4a8a67301882f7a6b1de4c3c3