Array subsetting bug in DCOMP?
In routine dcomp_array_loop
, 2D arrays are looped over from 1 to the
dimensions of the "input%sat" array. However, only input%sat had been
properly subset in the calling routine (awg_cloud_dncomp_algorithm
)!
The Intel compiler first indicated this problem. The solution implemented
here is to properly subset all relevant 2D arrays in the "dcomp_input"
structure before passing it to dcomp_array_loop
. Also, the way that
the "source=" option for the ALLOCATE statement was used is problematic
(perhaps due to compiler idiosyncrasies) -- given the code context, it is
less error-prone to allocate the arrays (simply), then assign their values.
- Also, always initialize all POINTER declarations with "=> NULL()", as it greatly reduces the chance for a plethora of very subtle (but bad) bugs.
My code changes that reflect the above can be found in the "develop/refine_build_process" branch (see the recent relevant commit to that branch).