Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

aCC: (Not enough memory...)

 
SOLVED
Go to solution
Highlighted
New Member

aCC: (Not enough memory...)

Hi all
I'm using
aCC: HP ANSI C++ B3910B A.03.80 on HP-UX 11.11
and I'm having error

aCC: Not enough memory is available to finish the compilation.

Please help.
Thank you.
5 REPLIES 5
Highlighted
Honored Contributor

Re: aCC: (Not enough memory...)

Vladimir,

Welcome to the ITRC forum for HPUX.

WAG: Your system is probably not configured to allow enough Virtual memory.
Check the setting for maxdsiz

Please realize that we are a helpful bunch here, but we are not mindreaders. Please proved some more info.

- Is this a 'big' program?
- Does a small 'hello world' program compile?
- Did it ever work?
- What was changed?
- Does it work somewhere else?
- Check the output for: $ ulimit -a
- Check out /etc/swapinfo
- hwo much physical memory? How much swap

- Oracle and Sap and others come with tools to check how much memory you can atuacll use. They have names liek 'memlimit'.

For a detailed/advance study, check out:
http://docs.hp.com/en/1218/mem_mgt.html
and/or
http://docs.hp.com/en/5965-4641/index.html
http://www.scribd.com/doc/7089/HPUX-Kernel-Tuning-Guide

Good luck!
Hein.

Highlighted
Acclaimed Contributor

Re: aCC: (Not enough memory...)

As Hein says, you are most likely have maxdsiz too small. You should set it to 1 Gb. If you are doing lots of compiles at once, you may not have enough swapspace.

What opt level are you using?
Highlighted
New Member

Re: aCC: (Not enough memory...)

Thank you very much for your response.
My application is a daemon. It was written for Linux ( compiled with gcc ) . I ported it to Sparc Solaris8 and Sparc Solaris9 ( compiled with gcc as well ) . Now I' m trying to port it to HP-UX 11.11. On all systems It has executable ~2.5Mb large and 5 libraries ( one is 300k and four are between 1.0-1.5Mb each ) . So I assume that' s a big app. I managed to build and run small "hello world" application without any problem.
There are ACE 5.6 and Boost 1.34.1 libraries used. ACE - statically linked libraries, boost - just includes.
I' m using aCC because it' s preferred compiler for ACE. Also I' m using bjam 3.1.1.6 and boost build scripts v.2.12

That's result of calling swapinfo:

bash-3.2# /etc/swapinfo
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

reserve - 527780 -527780

memory 1587280 88708 1498572 6%

That's ulimit -a:

bash-3.2# ulimit -a
core file size (blocks, -c) 2097151
data seg size (kbytes, -d) 4063168
file size (blocks, -f) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 16
stack size (kbytes, -s) 131072
cpu time (seconds, -t) unlimited
max user processes (-u) 6567
virtual memory (kbytes, -v) unlimited

So as far as I can understand there is enough memory and swap file. maxdsize set to maximum as well. I attached build output, looks like it managed to compile some source files before run out of memory.

Hope this info will help you to help me :).

Thank you,
Vlad.
Highlighted
Acclaimed Contributor
Solution

Re: aCC: (Not enough memory...)

>I' m trying to port it to HP-UX 11.11.

If you were on IPF, you wouldn't have a problem because the A.06.15 compiler is 64 bit and aCC6 is much better.

>So I assume that' s a big app.

Not really. ecom is 75 Mb. :-)

>result of calling swapinfo:

swapinfo -tam is always preferred so we don't have to do any thinking. It seems you only have 6 Gb? Something that would have problems if you did multiple compiles at once.

>data seg size (kbytes, -d) 4063168

Ok, that's more than the 1 Gb that you can use.
It might be interesting if you used top while it was compiling and note when it grows.
Also try using "+time".

>stack size (kbytes, -s) 131072

This takes away 100 Mb. You may want to reduce this in your script to build, to 50000 Kb.

>Hope this info will help you to help me :).

Not really. I don't see you optimizing?
Do you have a big functions in CommonTask.cpp?
You could be bloating the compiler with those Boost templates?
Try removing -g. Then remove +d?

You could try the new option +hpxstd98.
Highlighted
New Member

Re: aCC: (Not enough memory...)

Thank you very much.
+hpxstd98 did the trick. It asked me to rebuild ACE library with +Z option, and then to rebuild app itself. After that compilation succeeded.
I have enough memory and CommonTask.cpp doesn't contain a big functions, there are just couple Boost templates. So, the problem I think was in the way aCC deals with templates.
Thank you.
Vlad.