[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: [patch, fortran] Fix PR 87352, far too many deallocations
From:       Jeremy Sanders <jeremy () jeremysanders ! net>
Date:       2019-04-01 9:19:08
Message-ID: cbaaef16-6029-5bd3-42f2-9ea0e42888cf () jeremysanders ! net
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic