gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1565 Posts in 517 Topics by 752 Members - Latest Member: zaikunzhang September 25, 2021, 05:33:58 PM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  Macintosh  |  Buffer allocation failed
gfx
gfxgfx
 

Author Topic: Buffer allocation failed  (Read 6764 times)

neal

  • Newbie
  • *
  • Posts: 5
Buffer allocation failed
« on: November 02, 2010, 02:16:09 PM »
Can someone tell me how to fix this error?

? FORTRAN Runtime Error:
? Buffer allocation failed

Seems to me that in older versions of Absoft Fortran I put something like this in make file to fix the problem.

setprefs -sizemin 800000 -sizepref 800000 "{TargetName}"

Not sure what to do exactly in the newer version.

I'm running  Absoft Pro Fortran 11.0.0   on Mac OS 10.6.2

Thanks.

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
Re: Buffer allocation failed
« Reply #1 on: November 03, 2010, 08:01:58 AM »
Can you give me an idea of the context of this message? Was it from an ALLOCATE statement?

neal

  • Newbie
  • *
  • Posts: 5
Re: Buffer allocation failed
« Reply #2 on: November 04, 2010, 11:34:16 AM »
It was a runtime error.   The program compiled fine, built fine, and ran part way through.   It comes to an unformatted READ of a large array, then crashes with
the buffer allocation error.    I have reduced the dimensions of the largest arrays and the program runs now, but I'd eventually like to go back to the larger ones.
Is there a limit to how large an array can be read in a single READ?

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
Re: Buffer allocation failed
« Reply #3 on: November 05, 2010, 06:49:41 AM »
How large is the array that causes the READ to fail? Are you building a 32-bit or a 64-bit program?

neal

  • Newbie
  • *
  • Posts: 5
Re: Buffer allocation failed
« Reply #4 on: November 09, 2010, 01:06:14 PM »
It was   (20000,20000)   real numbers.       32 bit program.    I don't get the error with this set to (15000,15000).

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
Re: Buffer allocation failed
« Reply #5 on: November 10, 2010, 05:59:06 AM »
The array is 1.6 GB. The I/O library is probably trying to allocate a buffer large enough to read it in. For example, if your READ looks like this:

      REAL ARRAY(20000,20000)
      ...
      READ (16) ARRAY

the I/O library would need to allocate another 1.6 GB of memory. That exceeds the memory available to a 32-bit program. Note: This is the simplest case. Other combinations of arrays and READs will yield the same result.

Either rebuild as a 64-bit program or modify the READ statement.

Absoft User Forum  |  Support  |  Macintosh  |  Buffer allocation failed
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!