Implicit deallocation in RtmMod.F90 for qSend
- Dominant language
- Fortran
- Stars
- 59
- Forks
- 73
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 2
Description
There's a missing deallocation for qSend in RtmMod.F90. It allocates it each time route_ini is called and doesn't deallocate it. It should deallcate at the end of route_run, or do the allocation in route_ini, and don't worry about deallocating.
Note, I was able to use "git grep allocate" to show this in route/build/cpl, as other instances showed a matching deallocate, or the allocates in RunoffMod.F90 and rof_import_export.F90 didn't have a matching deallocate -- but they are only done at initialization. So those ones are OK.
Since it's a local allocatable array, the compiler will deallocate when it goes out of scope. So there is an implicit deallocation going on. But, that makes it harder to match deallocates with allocates and know that's being properaly handled.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with git grep allocate in route/build/cpl, then inspect qSend in RtmMod.F90 and the route_ini and route_run entry points. Confirm how qSend is allocated on each route_ini call; done means its lifecycle is explicit, either with a matching deallocation at the end of route_run or by allocating it only during initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100