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

Scratch memory and dynamic scheduling #279

Closed
dholladay00 opened this issue May 13, 2016 · 5 comments
Closed

Scratch memory and dynamic scheduling #279

dholladay00 opened this issue May 13, 2016 · 5 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@dholladay00
Copy link

dholladay00 commented May 13, 2016

In my application, I have am making use of both team-wise scratch memory and dynamic scheduling.

I recently discovered that when the number of teams exceeds the number of threads, I get a scratch memory allocation error sometimes (there is some undefined behavior somewhere).

The errors do not occur if either the number of teams is < number of threads OR if I am not using dynamic scheduling.

Is scratch memory and dynamic scheduling supposed to be incompatible?

reproducer of error attached.

scratch_mem.zip

@crtrott
Copy link
Member

crtrott commented May 13, 2016

No this is supposed to work. I will have a look.

@crtrott crtrott self-assigned this May 13, 2016
@hcedwar hcedwar modified the milestones: Backlog, Spring 2016 May 18, 2016
@crtrott crtrott added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label May 24, 2016
@crtrott
Copy link
Member

crtrott commented May 24, 2016

Just to let you know I replicated the issue, even after fixing some minor things in the reproducer (the mem_size should come from

View<double*>::shmem_size(N)

, the member_type should come from

TeamPolicy<dynamic_schedule>::member_type

, and there are two using TeamPolicy statements).

I am now trying to track down where this is coming from, and hope to get it fixed this week.

@crtrott
Copy link
Member

crtrott commented May 26, 2016

Could you test if this fixes it for you?

@dholladay00
Copy link
Author

With gcc 5.2.0 and the openmp backend, it works. However, with intel 16.0.1 and the openmp backend, the error remains. Could you see if things work on your end with intel compilers?

@dholladay00
Copy link
Author

I have changed to intel 16.0.3 (from 16.0.1) and am no longer seeing those errors with dynamic scheduling with OpenMP! (I have only tested with OpenMP backend with gcc and intel compilers)

@ndellingwood ndellingwood modified the milestones: Summer 2016, Spring 2016 Jun 8, 2016
hcedwar pushed a commit to hcedwar/kokkos that referenced this issue Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

4 participants