How to investigate output of type instability checks?

That is precisely what I am trying to avoid. These tensors g_xxxx will become very large and we want to read these files from the disk only when the part where they would be needed comes up. I know the code attached may not be very clear on this, but my other post talks about dealing with this issue.