/[MITgcm]/MITgcm/eesupp/src/setrlstk.c
ViewVC logotype

Annotation of /MITgcm/eesupp/src/setrlstk.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Sep 11 18:52:26 2005 UTC (18 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint58e_post, checkpoint57s_post, checkpoint57y_post, checkpoint58h_post, checkpoint57y_pre, checkpoint57v_post, checkpoint58j_post, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint57z_post, checkpoint58b_post
File MIME type: text/plain
 o add HAVE_SETRLSTK define and useSETRLSTK flag (eedata) which calls
   a C routine to unlimit the stack size
   - very helpful on clusters of workstations since the ulimit/limit
     behavior can (otherwise) only be inherited from parent processes
     which is difficult with some MPI-over-ssh/rsh implementations

1 edhill 1.1 /*
2     * $Header: $
3     * $Name: $
4    
5     //BOP
6     // !ROUTINE: setrlstk
7     // !INTERFACE:
8     setrlstk()
9    
10     // !DESCRIPTION:
11     // Unlimit the size of the stack using setrlimit().
12    
13     //EOP
14    
15     */
16    
17     /* Here, we get the definition of the FC_NAMEMANGLE() macro. */
18     #include "FC_NAMEMANGLE.h"
19    
20     /* #define FC_NAMEMANGLE(X) X ## _ */
21    
22     #include <sys/time.h>
23     #include <sys/resource.h>
24     #include <unistd.h>
25    
26     /* int main( int argc, char ** argv ) */
27     void FC_NAMEMANGLE(setrlstk) ()
28     {
29     struct rlimit rls;
30    
31     rls.rlim_cur = RLIM_INFINITY;
32     rls.rlim_max = RLIM_INFINITY;
33     setrlimit(RLIMIT_STACK, &rls);
34     /* system("ulimit -a"); */
35     return;
36     }
37    
38    

  ViewVC Help
Powered by ViewVC 1.1.22