Increasing Stacksize in Ubuntu 11.04

I have a very large program which I want to parallelize. It is in c and runs very well in sequential or parallel mode (using pthreads) with gcc.

When I run it using pgcc, it can only run sequentially. If I run it parallel I get stack overflow errors.

Thus in Ubuntu 11.04 how do I increase te stacksize, can I or should I increase stacksize to unlimited and how do i do that?

THX 1138

Hi THX 1138,

The answer will depend on which shell you’re using.

For bash the commands are: ‘ulimit -s ’ or ‘ulimit’ for unlimited.
For csh the commands are: ‘limit stacksize ’, or ‘unlimit’

See ‘man bash’ or ‘man csh’ for details.

\

  • Mat

The shell that I am using is the bash shell. I want to make the memory unlimited.

THX 1138