In my code is necessary to allocate several large arrays.
However, when I try to use the IBM xlc_r :
xlc_r -g -O -L. -qarch=pwr7 -qtune=pwr7 -lesslsmp -lm -qsmp -qthreaded -qmaxmem=-1 2.c
int main()
{
int natom = 5000;
while(1)
{
double *z =(double*) malloc(natom*natom*natom* sizeof(double));
if(!z)
{
printf("error memory vector z\n\n");
exit(-1);
}
}
}
I receive either Killed an error for memory vector z.
This is the 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) 102400
pipe size (512 bytes, -p) 64
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 128
virtual memory (kbytes, -v) unlimited
Is there any flag necessary to allocate more memory?