/[escript]/trunk/escript/py_src/__init__.py
ViewVC logotype

Annotation of /trunk/escript/py_src/__init__.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2473 - (hide annotations)
Mon Jun 15 02:21:07 2009 UTC (10 years, 9 months ago) by jfenwick
File MIME type: text/x-python
File size: 1112 byte(s)
Change logging functions so I don't get confused about what they do.
Added parameter to name the log file if called directly.
1 ksteube 1809
2     ########################################################
3 ksteube 1312 #
4 ksteube 1809 # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1312 #
8 ksteube 1809 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1312 #
12 ksteube 1809 ########################################################
13 elspeth 609
14 ksteube 1809 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18 elspeth 614 __license__="""Licensed under the Open Software License version 3.0
19 ksteube 1809 http://www.opensource.org/licenses/osl-3.0.php"""
20 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
21 elspeth 609
22 jgs 149 from escript import *
23     from util import *
24 jfenwick 2285
25     import os
26     import atexit
27    
28 jfenwick 2473 # To have this function called automatically
29     def escriptLogMemoryStatusNow(prefix='memescript'):
30 jfenwick 2285 if os.name=='posix':
31     pid=os.getpid()
32 jfenwick 2473 os.system("cat /proc/%d/status > %s.%d"%(pid,prefix,pid))
33 jfenwick 2285
34     if 'escriptExitProfiling' in os.environ:
35 jfenwick 2473 atexit.register(escriptLogMemoryStatusNow)

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26