Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

compiler out of memory

martymike
Novice
1,681 Views

We are migrating from IVF 12.0 to IVF 14.0. I have two modules that compiler in IVF 12.0, but in IVF 14.0 they get this error:

Fatal compilation error: Out of memory asking for 5791752.

(the number is not exactly the same in the two cases, but they are close). In one case the module is fairly complicated with a lot of variables and subroutines. The other is fairly simple: 3 arrays, and 5 short functions to return values from them. Both contain a large character array (at least large by our standards). The simple module has array of length 128 and size of 4438 elements. The other module has one about half that size, but a lot more declarations.

I'm not using any compiler options that I did not use before.

Any suggestions on how to approach the problem?

0 Kudos
15 Replies
Steven_L_Intel1
Employee
1,681 Views

Make sure you're using the latest update (14.0.2 is current, 14.0.3 should be available later today.) I doubt that the sizes of variables are a factor, though you could try an experiment of reducing them and seeing of the error goes away. More likely is that the optimizer is being a bit more aggressive and taking more memory, and you've been at the edge of what can be done in a 32-bit compiler. If you're on a 64-bit system, try a 64-bit build and see what happens.

If the problem persists, please send us the sources necessary to reproduce the problem through Intel Premier Support.

0 Kudos
martymike
Novice
1,681 Views

I had been building a debug build and had already tried reducing all optimizations that I could find. No difference. Release build, no difference.

The character array is static; it holds data that is set at compile time and never changed. We generate the file that sets the values with a series a data statements. If I eliminate the data statements, it compiles. So, indeed, it is not just that it is a big array. Reducing the number of data statements did help. Somewhere between 1800 and 1900 is where it runs into trouble (the full set is 4438).

I can try the 64-bit version of the compiler, but I need to build a 32-bit application. Anything I should know before I run into problems?

Do you know any other techniques we can use for building a large static table of strings like this?

0 Kudos
martymike
Novice
1,681 Views

I am running 14.0.1. I try getting the latest tomorrow.

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

I know we have had issues with large and complex DATA statements but am not aware of anything recent. Indeed, if you need to build a 32-bit app, you can't use the 64-bit compiler. I was just trying to figure out where the problem was.

Can you attach a ZIP of a source that fails to compile? I might be able to suggest alternatives (and we can figure out what's wrong with the compiler.)

0 Kudos
martymike
Novice
1,681 Views

The attached zip contains the source file PssStrings.f90, which is one of the two files that is failing for us. Included are the module and include files that it references. Let me know if you need to know more about the modules.

Also included is the file pssStrTbl.f90 is is a modified version of PssStrings.f90 that I made to isolate the part that seemed to be causing the compiler to crash. It gets the same error.

Thanks for looking at this.

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

Can you try uploading again? It doesn't seem to have made it. Make sure you click the Upload button.

0 Kudos
martymike
Novice
1,681 Views

trying again

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

Got it this time - thanks. Let me investigate and I will get back to you.

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

This is missing sources for modules apiids, bat_tables and iso_varying_strings. I assume you aren't using the iso_varying_strings from the older Fortran standard. Please attach a zip with all sources needed to rebuild and show the problem.

0 Kudos
martymike
Novice
1,681 Views

here is an updated zip file.

Please note what I said earlier about pssStrTbl.f90 which is also demonstrates the problem and needs very little else to build. If it was not clear, pssStrTbl.f90 is *not* part of our product, it is largely copied from pssStrings.f90 and simplified just to demonstate the problem in a simpler build.

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

Sorry, I didn't understand earlier. I can reproduce the error with the 14.0 compiler but not with 15.0 which is currently in beta. I note that the Intel 64 compiler also fails, but it takes a lot longer to do so...

0 Kudos
martymike
Novice
1,681 Views

Thank you.

Do you have any suggestions for us?

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

Comment out the include of pssstrings.ins. Add to the module this routine (after a CONTAINS):

subroutine InitPssStrings
character(256) msgline
integer i,ios,u
open (newunit=u,file='pssstrings.ins',form='formatted',status='old')
do
  read (u,'(A)',IOSTAT=ios) msgline
  if (ios < 0) exit
  read (msgline,'(T16,I4)') i
  read (msgline(23:),*) PssString(i)
  end do
close (unit=u)
end subroutine InitPssStrings

Call InitPssStrings from the main program. You may need to update the path to pssstrings.ins in the OPEN. Nothing else needs to change. When you get the new compiler, you can undo the change.

0 Kudos
martymike
Novice
1,681 Views

Thanks.

Any guesses as to the new compiler's ETA?

0 Kudos
Steven_L_Intel1
Employee
1,681 Views

Third quarter this year. You can join the beta now if you want - https://software.intel.com/en-us/articles/intel-software-development-tools-2015-beta

0 Kudos
Reply