Fix or remove internal error check in decompInitMod.F90 for nclumps
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
There's an error check in decompInitMod.F90 where the write and the endrun call contradict each other. This should be fixed or removed.
The case for removing it, is that nclumps is currently a positive integer multiplied by npes, so it can never happen normally.
However, if the code were to change or parts of the code moved around you might want it to happen to save debugging time. So fixing it and adding a unit test for it, might be the best thing to do.
The error message is now in
decompInit_lnd_check_errors
as follows...
``` fortran
if (nclumps < npes) then
ier = 1
write(iulog,*) 'Number of gridcell clumps= ',nclumps, &
' is less than the number of processes = ', npes
call endrun(msg="Number of clumps exceeds number of processes", &
file=sourcefile, line=__LINE__)
return
end if
```
and the endrun message contradicts the message in the write. So it should be fixed or removed.
_Originally posted by @ekluzek in https://github.com/ESCOMP/CTSM/pull/3517#discussion_r3029995725_
Contributor guide
Assessment
This issue has not been assessed yet.