Opened 15 years ago
Closed 15 years ago
#409 closed bug (Fixed)
SWAN - MCT coupling memory bug
Reported by: | jcwarner | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.4 |
Component: | Nonlinear | Version: | 3.4 |
Keywords: | Cc: |
Description (last modified by )
During the coupling of ROMS to SWAN, in the file SWAN/Src/waves_coupler.F, there is a call
CALL GlobalSegMap_Ordpnts (GSMapSWAN, MyRank, points)
This call uses MCT to obtain the local grid points for each tile. The corresponding mct routine allocates memory for the variable points, and then computes those values. In the waves_coupler routine, I also had allocated the variable points and then deallocated the memory. However, since both MCT and I were allocating the memory, it led to a slow but steady increase in memory cache. This only seemed to occur on some compilers for certain applications, and was extremely difficult to identify. The correction is to comment out lines 295 and 297 in waves_coupler.F. This changes the code from
! ! Allocate attribute vector array used to export/import data. ! allocate ( avdata(gsmsize),stat=ierr ) allocate ( points(gsmsize),stat=ierr ) avdata=0.0_r8 points=0
change to:
! ! Allocate attribute vector array used to export/import data. ! allocate ( avdata(gsmsize),stat=ierr ) !! allocate ( points(gsmsize),stat=ierr ) avdata=0.0_r8 !! points=0
I tried this on ifort and pgi and it works fine.
Change History (1)
comment:1 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
Summary: | swan - mct coupling memory bug → SWAN - MCT coupling memory bug |
Yes, good catch!!! This type of bugs are very difficult to find.