[patch, fortran] Fix PR 87352, far too many deallocations
Jeremy Sanders
jeremy@jeremysanders.net
Mon Apr 1 09:19:00 GMT 2019
Dear Thomas
On 31/03/2019 18:10, Thomas Koenig wrote:
> @Jeremy: Can you confirm that this fixes the excessive compile time
> and code size issue for you?
The patch fixes for me the large problem which was the N^2 number of
deallocations. The compile time speed problem is also fixed. Thanks for
that!
However, I think there is a 2nd problem (maybe caused by the 1st commit
referenced by the bug), where large object files are produced. If I
compile the 1st test case, testcomb.f90, on the bug (not the 2nd one),
the object file is still massive (200MB).
I think this is caused by very large .zero outputs in the assembler file
that go into __def_init_XXX_type.
There is also very large stack usage. I think these are associated with
initialisation of the datatypes. It seems the code creates the object
with the allocation on the stack, marks the subarrays as unallocated,
then memcpys this into the allocated object. As the objects can be
large, this leads to large stack usage.
Best wishes
Jeremy
More information about the Fortran
mailing list