Commit 064db4e
authored
Fix Resize Issue of Fab with the Async Arena (#3663)
## Summary
Previously there was an issue with resizing Fabs using The_Async_Arena.
The issue was the previous allocation during resize might be done on a
different stream. This commit fixes the issue and makes the following
patterns work.
FArrayBox tmp0(The_Async_Arena());
FArrayBox tmp1(The_Async_Arena());
FArrayBox tmp2;
for (MFIter ...) {
tmp0.resize(box,ncomp,The_Async_Arena());
tmp1.resize(box,ncomp);
tmp2.resize(box,ncomp,The_Async_Arena());
}
## Additional background
AMReX-Astro/Castro#2677
## Checklist
The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate1 parent ecaa46d commit 064db4e
File tree
4 files changed
+35
-1
lines changed- Src/Base
4 files changed
+35
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
1634 | 1637 | | |
1635 | 1638 | | |
1636 | 1639 | | |
| |||
1902 | 1905 | | |
1903 | 1906 | | |
1904 | 1907 | | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
1905 | 1911 | | |
1906 | 1912 | | |
1907 | 1913 | | |
| |||
2003 | 2009 | | |
2004 | 2010 | | |
2005 | 2011 | | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
2006 | 2015 | | |
2007 | 2016 | | |
2008 | 2017 | | |
| |||
2021 | 2030 | | |
2022 | 2031 | | |
2023 | 2032 | | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
2024 | 2036 | | |
2025 | 2037 | | |
2026 | 2038 | | |
| |||
2062 | 2074 | | |
2063 | 2075 | | |
2064 | 2076 | | |
2065 | | - | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
2066 | 2082 | | |
2067 | 2083 | | |
2068 | 2084 | | |
| |||
2114 | 2130 | | |
2115 | 2131 | | |
2116 | 2132 | | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
2117 | 2137 | | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
2118 | 2141 | | |
2119 | 2142 | | |
2120 | 2143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
0 commit comments