Minor/reduce memory consumption associated with c_rate
David Dickinson
Branch: minor/reduce_memory_consumption_associated_with_c_rate
Branch: 8.1-RC
Merged
Merged pull request
Merged in minor/reduce_memory_consumption_associated_with_c_rate (pull request #525)
Add some comments about c_rate type
Guard against using c_rate based on heating flag
Don't allocate c_rate if heating is false
This large array is only populated if
heating = .true.
and is only used ifwrite_heating
is true. The array is ntheta*nx*ny*nspec*3 large and is not distributed. Hence it is the size of a distribution function shaped array multiplied by3 * nproc / (2*nlambda*negrid)
. For runs withnlambda~64
andnegrid~16
it therefore exceeds the size of a distribution function with nproc > 680.It’s possible that we could further halve the memory cost of c_rate by declaring this as real. This is currently blocked by the use of c_rate as an out argument in some calls to integrate_moment.