Skip to content

Commit 8303cea

Browse files
Resolved out of bounds error
1 parent ee0bc0c commit 8303cea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,9 +1204,9 @@ contains
12041204

12051205
deallocate (patch_ib)
12061206
if (num_dims == 3) then
1207-
num_aware_ibs = num_local_ibs_max*27
1207+
num_aware_ibs = min(num_local_ibs_max*27, num_ib_patches_max)
12081208
else
1209-
num_aware_ibs = num_local_ibs_max*9
1209+
num_aware_ibs = min(num_local_ibs_max*9, num_ib_patches_max)
12101210
end if
12111211
allocate (patch_ib(num_aware_ibs))
12121212

0 commit comments

Comments
 (0)