Operating System - HP-UX
1819899 Members
2560 Online
109607 Solutions
New Discussion юеВ

Re: FORTRAN Runtime ERROR: Memory allocation failed

 
SOLVED
Go to solution
Zee
Advisor

FORTRAN Runtime ERROR: Memory allocation failed

Hi,

Getting memory errors with a fortran f90-program.

The progamm uses "allocated arrays".

When increasing memory values the programm crashes with
FORTRAN Runtime ERROR:
Memory allocation failed

SHMMAX already set to 2GB

Processes with a more than 1G size always fail any thing below 1G works ok.

Machine is 9000/785/J6750 with 8GB physical memory with hpux 11.11 on it, when fortran process is running i could see 6G still free.


Any help ? any other Kernel parameter needs increasing ?

Thanks,



k. girsch
8 REPLIES 8
Steve Steel
Honored Contributor
Solution

Re: FORTRAN Runtime ERROR: Memory allocation failed

Hi


Which version of F90 is it

Which is latest patch

How much swap do you have

Normally will work if
a)swapinfo -tam
shows more than the program needs
and the space is available.
(
NOTE:size program
gives an indication of the run time size

b)maxdsiz_64bit is sufficient to accomadate the program .


See
ftp://eh:spear9@hprc.external.hp.com/memory.htm

To help you check your memory usage


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
RAC_1
Honored Contributor

Re: FORTRAN Runtime ERROR: Memory allocation failed

Is the program 32 bit program?? If yes, it cannot access anythoing more than 1.75 GB.
How do you start it?? From shell?? Post following.

ulimit -Sa and ulimit -Ha

Also, you may want to run that program with tusc and see what exactly happens??

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: FORTRAN Runtime ERROR: Memory allocation failed

Dynamic memory is controlled by the maxdsiz parameter (or maxdsiz_64bit for 64-bit processes). This is the tunable that needs to be increased. However, if this is a 32-bit process then you are running into problems trying to cross a 1GB quadrant. Man chatr to see about setting options for larger data segments. You should also note that maxdsiz_64bit must be set to at least as large as maxdsiz.
If it ain't broke, I can fix that.
Zee
Advisor

Re: FORTRAN Runtime ERROR: Memory allocation failed

All, answers to your question.

dont know the fortran version.

# swapinfo -ta
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
dev 16777216 0 16777216 0% 0 - 1 /dev/vg00/swap
reserve - 482464 -482464
memory 6469976 625676 5844300 10%
total 27441496 1108140 26333356 4% - 0 -

maxdsiz - 2147483648
maxdsiz_64bit -17179869184

The fortran program is complied on 64bit hpux.


The program starts in shell.

# ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 1024

# ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 1024

Thanks in adv,
Zee
A. Clay Stephenson
Acclaimed Contributor

Re: FORTRAN Runtime ERROR: Memory allocation failed

It doesn't matter if it was compiled/linked on a 64-bit machine/os. What matters if it was compiled/link as a 64-bit executable. I'm pretty sure that you are hitting a 32-bit quadrant limit.

Run this command and post the results:
chatr your.exe
If it ain't broke, I can fix that.
Steve Steel
Honored Contributor

Re: FORTRAN Runtime ERROR: Memory allocation failed

Hi


memory limitations are well explained at

ftp://eh:spear9@hprc.external.hp.com/memory.htm

If you see ├в out of memory├в or ├в not enough space├в when running an application, and there is pleny of free swap space then the application may be requesting shared memory or may be mapping files to memory (with shmget() and mmap() system calls respectively) and the problem may due to 32-bit memory limitation/contention and the options are...


If you want truly to understand something, try to change it. (Kurt Lewin)
Zee
Advisor

Re: FORTRAN Runtime ERROR: Memory allocation failed

# hpux164: chatr tf3d-nhs-O2.x
tf3d-nhs-O2.x:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib//libcl.2
dynamic /usr/lib//libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled
Zee
Advisor

Re: FORTRAN Runtime ERROR: Memory allocation failed

Thank you all, the problem was 32bit,

re-complied with 64 bit compiler, and seems ok now .