Hi,
I'm still trying to get my head around the dynamic memory as I move some test cases to the new version. I need to read in a data file which will be used as the inlet values for a test case. For v2.0.1 it works fine serial and parallel but with v2.1-rc2 it runs fine for one iteration but on the second I start getting silly values such as 3.69227267719853593E-312 for the velocity. It runs for further iterations but the values are completely off. I believe its because of usclim.f90 but I'm not sure which part of it I'm doing incorrectly.
I've attached both usclim.f90's files and I was hoping if you could quickly compare the two to see if I'm using the dynamic memory allocation in the correct way before I think about other subroutines being the source of the problem.
Thanks very much
Neil
dynamic memory usage for inlet usclim.f90
dynamic memory usage for inlet usclim.f90
- Attachments
-
- usclim-v2-1-rc2.f90
- (22.76 KiB) Downloaded 216 times
-
- usclim-v2-0-1.f90
- (32.35 KiB) Downloaded 210 times
Re: dynamic memory usage for inlet usclim.f90
Hello,
I believe the array you allocate at the first time step is automatically freed when exiting usclim (this is the standard behavior for Fortran 95). To avoid this, adding a save attribute should help:
Best regards,
Yvan
I believe the array you allocate at the first time step is automatically freed when exiting usclim (this is the standard behavior for Fortran 95). To avoid this, adding a save attribute should help:
Code: Select all
integer, allocatable, save, dimension( : ) :: lstelt
double precision, allocatable, save, dimension( :, : ) :: vel
Yvan