huge object file for F90 module

Hi,

I have created a F90 module to contain variables. These are mainly arrays, and NO allocatables. Once compiled, the size of the obj file obtained is ~100MB (???). Why is this object file so large? Note that I am restructuring an old code, and before, when these variables were decleared in a subroutine, the resulting object file was nothing this big…

I am using pgf90 5.2-4 together with MPICH libs.

Thanks for any help,
-Fabrizio

Hi Fabrizio,

Do you use DATA statements to initialize your arrays? When you initalize your variables, this information will be stored in the object file and can cause the the object files to get very large. Note that if all elements are initalized to the same value, or not initalized, then the object file’s size should be better.

  • Mat

Mat,

I do have some DATA statements, but they initialize only some 4 or 5 scalars (some real, some integer). The overall size of these data should be some hundreds of Bytes, nothing compared to ~100MB I am seeing. Anything else is left not initialized.

Thanks,

  • Fabrizio

Hi Fabrizio,


Hmmmm… I’m not really sure. Would it be ok if you sent us the source file of the module? I’d like to try and recreate it here. If ok, I’ll contact you on Monday via email.

Thanks,
Mat

Hi Fabrizio,


It turns out that this is a compiler bug. The good news is it has been fixed for the upcoming 6.0 release. It caused by the compiler joining the module’s variables into an common block like structure. Although only a few of your variables are being initialized, because of this join your very large arrays are being added to the object file.

Thanks for you support,
Mat

Thanks once again! Great and fast support.

  • Fabrizio