-
Notifications
You must be signed in to change notification settings - Fork 61
Fix BovWriter #758
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
base: master
Are you sure you want to change the base?
Fix BovWriter #758
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -267,7 +267,9 @@ void writeTimeStep( ExecutionSpace, const std::string& prefix, | |
| local_space_max.back() = owned_extents.back(); | ||
| IndexSpace<num_space_dim + 1> local_space( local_space_min, | ||
| local_space_max ); | ||
| auto owned_subview = createSubview( array.view(), local_space ); | ||
|
|
||
| auto array_host = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{}, array.view()); | ||
| auto owned_subview = createSubview( array_host, local_space ); | ||
|
|
||
| std::array<long, num_space_dim + 1> reorder_space_size; | ||
| for ( std::size_t d = 0; d < num_space_dim; ++d ) | ||
|
|
@@ -276,9 +278,11 @@ void writeTimeStep( ExecutionSpace, const std::string& prefix, | |
| } | ||
| reorder_space_size.back() = owned_extents.back(); | ||
| IndexSpace<num_space_dim + 1> reorder_space( reorder_space_size ); | ||
| auto owned_view = createView<value_type, Kokkos::LayoutRight, memory_space>( | ||
|
|
||
| auto owned_view = createView<value_type, Kokkos::LayoutRight, Kokkos::HostSpace>( | ||
| array.label(), reorder_space ); | ||
| reorderView( owned_view, owned_subview, reorder_space, ExecutionSpace() ); | ||
|
|
||
| reorderView( owned_view, owned_subview, reorder_space, Kokkos::DefaultHostExecutionSpace{} ); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see anything that would stop us from reordering on device, then mirroring after this kernel - what am I missing?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @abisner I have segment fault error when encounter
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kwitaechong that may be unrelated - this should only affect the grid output tests |
||
|
|
||
| // Compose a data file name prefix. | ||
| std::stringstream file_name; | ||
|
|
||
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 try replacing this with a fence instead?