[Wien] Mac OSx - setrlimit(): Invalid argument

Laurence Marks L-marks at northwestern.edu
Fri May 17 17:07:25 CEST 2013


This has been patched, but maybe the patch is not in the current
version on the web. What we are using is

#ifdef __APPLE__
    limit.rlim_cur = limit.rlim_max ; /* RLIM_INFINITY */
#else
    limit.rlim_cur = RLIM_INFINITY ;
#endif

Please let me know if this works for you as it is hard to track
exactly what Mac OS does in all cases as it seems to be a moving
target.

N.B., I have not tried but

#ifndef RLIM_INFINITY
    limit.rlim_cur = limit.rlim_max ; /* RLIM_INFINITY */
#else
    limit.rlim_cur = RLIM_INFINITY ;
#endif

might also work.

On Fri, May 17, 2013 at 3:44 AM, Maurits W. Haverkort
<M.W.Haverkort at fkf.mpg.de> wrote:
> Dear All, Peter
>
> W2kutils.c at the moment (15.5.2013) contains the line:
>
> limit.rlim_cur = RLIM_INFINITY; /* rlimit.rlim_max */
>
> on Mac OS this leads to a crash as there is a hard-limit on the stack
> size, is there a reason not to make the standard code:
>
> limit.rlim_cur = limit.rlim_max;
>
> (note I removed the r in-front of limit)
>
> Would this not on a Linux system set the stack size to infinite and on
> a Mac to 65532?
>
> Best regards,
> Maurits
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html



-- 
Professor Laurence Marks
Department of Materials Science and Engineering
Northwestern University
www.numis.northwestern.edu 1-847-491-3996
"Research is to see what everybody else has seen, and to think what
nobody else has thought"
Albert Szent-Gyorgi


More information about the Wien mailing list