Opened 14 years ago

Last modified 14 years ago

#409 closed bug

swan - mct coupling memory bug — at Initial Version

Reported by: jcwarner Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.4
Component: Nonlinear Version: 3.4
Keywords: Cc:

Description

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 (0)

Note: See TracTickets for help on using tickets.