[Wien] setrlimit routine in Mac OS X platform

Laurence Marks L-marks at northwestern.edu
Tue Mar 5 18:33:47 CET 2013


There should be  W2kutils.c the lines

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

Maybe this is not being recognized in your Mac OS X, in which case try
( see http://lists.apple.com/archives/unix-porting/2004/Mar/msg00075.html
) adding

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

and/or do what is suggested in the page above to see what is defined.
Please let us know what works.

On Tue, Mar 5, 2013 at 11:21 AM, tasaka at affinity-science.com
<tasaka at affinity-science.com> wrote:
> Hello,
>
> I'm trying to build the execution files on Mac OS X Lion platform
> with wien2k_12.1, gfortran, openblas, openmpi etc. then, I think
> that Mac OS X can't handle RLIM_INFINITY in setrlimit routine.
> so, I'd like to skip w2k_extend_limits() in W2kinit.F as below.
>
>
> *** ./SRC_hf/W2kinit.F.bak      2013-03-04 22:53:46.000000000 +0900
> --- ./SRC_hf/W2kinit.F  2013-03-04 22:53:49.000000000 +0900
> ***************
> *** 27,33 ****
> --- 27,35 ----
>   #ifdef INTEL_VML
>          include 'mkl_vml.fi'
>   #endif
> + #ifndef MACOSX
>          call w2k_extend_limits()
> + #endif
>
>   #ifdef Parallel
>   !      Register C signal dispatcher, needed for parallel only
> *** ./SRC_lapw0/W2kinit.F.bak   2013-03-04 22:47:09.000000000 +0900
> --- ./SRC_lapw0/W2kinit.F       2013-03-04 22:50:11.000000000 +0900
>
>
> it seems to work well. but if there are any problems/precautions,
> please advise.
>
> Any information would be appreciated.
>
> With best regards,
> Tomo
>
>
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien



-- 
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