Hi,
I've built gpc 20041017, based on gcc-3.3.2 in my home directory on an AIX machine which has the GCC 3.3.2 binaries installed in usr/local/bin. The testsuite programs all run fine and I am able to compile and run my own programs.
I am using a program converted from Delphi, where I increased the stack and heap limits to allow the program use more memory. The program ran successfully several times on a PC, using more than 1GB of memory. However on AIX the program seem to be hitting a ceiling as they crash out with SIGILL, this happened with several datasets. The crash occurs at a New() statement asking for an additional 1600 bytes of memory and seems to occur when about 256MB of memory has been used. I tried the memavail function and it shows around 256 MB available at the start of the program, however memavail also sometimes causes a segmentation fault so I cannot use it to plot the memory use of the program .
Using ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max memory size (kbytes, -m) unlimited open files (-n) unlimited pipe size (512 bytes, -p) 64 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 10000 virtual memory (kbytes, -v) unlimited
so no obviou problem there., If I use ulimit -d to reduce the data size below 256MB then that affects the program, but increasing it to a fixed value above 256MB does not seem to stop it crashing.
I am inexperienced with the UNIX type environment and would appreciate any suggestions for changes needed at the GPC end or at the AIX and to get around this problem.
Peter.
Peter Keenan wrote:
I've built gpc 20041017, based on gcc-3.3.2 in my home directory on an AIX machine which has the GCC 3.3.2 binaries installed in usr/local/bin. The testsuite programs all run fine and I am able to compile and run my own programs.
I am using a program converted from Delphi, where I increased the stack and heap limits to allow the program use more memory. The program ran successfully several times on a PC, using more than 1GB of memory. However on AIX the program seem to be hitting a ceiling as they crash out with SIGILL, this happened with several datasets. The crash occurs at a New() statement asking for an additional 1600 bytes of memory and seems to occur when about 256MB of memory has been used. I tried the memavail function and it shows around 256 MB available at the start of the program, however memavail also sometimes causes a segmentation fault so I cannot use it to plot the memory use of the program .
GPC ultimately uses the system library for memory allocation. Crashing with SIGILL seems strange, perhaps a bug? You could try it with C code (using malloc). If that also crashed, it's a bug in libc.
Using ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max memory size (kbytes, -m) unlimited open files (-n) unlimited pipe size (512 bytes, -p) 64 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 10000 virtual memory (kbytes, -v) unlimited
so no obviou problem there., If I use ulimit -d to reduce the data size below 256MB then that affects the program, but increasing it to a fixed value above 256MB does not seem to stop it crashing.
Maybe a hard limit was set. Did you try `ulimit -a -H'?
Frank
I am using a program converted from Delphi, where I increased the stack and heap limits to allow the program use more memory. The program ran successfully several times on a PC, using more than 1GB of memory. However on AIX the program seem to be hitting a ceiling as they crash out with SIGILL, this happened with several datasets. The crash occurs at a New() statement asking for an additional 1600 bytes of memory and seems to occur when about 256MB of memory has been used.
GPC ultimately uses the system library for memory allocation. Crashing with SIGILL seems strange, perhaps a bug? You could try it with C code (using malloc). If that also crashed, it's a bug in libc.
Frank
Thanks for your suggestion, Frank. I wrote a simple C program with a malloc in a loop. This also encountered a 256MB memory limit, whether compiled with GCC or IBM's own compiler. So the problem is an AIX one.
In fact it seems that the default memory model used in AIX imposes a 256MB limit (a legacy of the past!)
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ge nprogc/genprogctfrm.htm
You need to set an enivironment variable to tell AIX if you want to use more than 256MB
export LDR_CNTRL=MAXDATA=0xn0000000
where n is the number of 256MB blocks of memory to use. I set n=8 and then memavail shows access to 2GB, this also seems to improve the problem where using memavail gave errors.
Peter.