HWRF
trunk@4391
Main Page
Guides
Packages
Classes
Python Files
Configuration Files
File List
ush
produtil
__init__.py
1
##@namespace produtil
2
# Platform-independent weather and ocean forecasting utility package.
3
#
4
# @anchor produtil_overview
5
# The produtil package is a general production weather and ocean
6
# forecasting utility package. It implements a number of classes and
7
# functions needed to implement a reliable, cross-platform weather or
8
# ocean forecasting system. This package is entirely
9
# model-independent: nothing in it is specific to, or reliant on, the
10
# HWRF model.
11
#
12
# Note that before you use anything in this module, you must first
13
# call the produtil.setup.setup() function, and that function should
14
# only be called once per process. Generally this is done at the top
15
# of the main program.
16
#
17
# @section file_and_prod_manip File and Product Manipulation
18
#
19
# There are a number of file and directory manipulation routines in
20
# the produtil package. In many cases, these replace Python standard
21
# library routines that either have known bugs or lack logging
22
# functionality. If a function exists in produtil and the Python
23
# standard library, it is best to use the produtil version to avoid
24
# Python's bugs.
25
#
26
# * produtil.fileop --- Many simple routines to manipulate files and
27
# directories. Works around many Python bugs and adds logging to
28
# file manipulation routines.
29
# * produtil.acl --- A wrapper around libacl. This is used by the
30
# produtil.fileop.deliver_file() to copy access control lists (ACLs)
31
# * produtil.cd --- Two classes to implement safe cd-in-cd-out blocks
32
# using the Python "with" construct. Also implements temporary
33
# directories and deletion of pre-existing directories if requested.
34
# * produtil.locking --- File locking that works around Lustre, GPFS
35
# and Panasas bugs.
36
# * produtil.retry --- Retry operations.
37
# * produtil.rstprod --- Handle NOAA restricted data requirements.
38
# * produtil.dbn_alert --- Trigger DBNet alerts.
39
# * produtil.datastore --- A database and product tracking.
40
# * produtil.atparse --- A simple text preparser.
41
#
42
# @section prog_exec Program Execution
43
#
44
# The produtil package has flexible, shell-like syntaxes for
45
# specifying program execution, including complex MPI execution with
46
# multiple executables. Most critically, this package works around a
47
# bug in Python's subprocess module, which forgets to close pipes
48
# after a fork() call, causing deadlocks in multi-stage pipelines.
49
# That bug renders Python's subprocess module worthless for complex
50
# pipelines. The produtil.run does not suffer from that problem.
51
#
52
# * produtil.run --- shell-like syntax for running programs, including
53
# a cross-platform way of requesting MPI and OpenMP program
54
# execution.
55
# * produtil.prog, produtil.mpiprog --- Object tree that underlies the
56
# produtil.run implementation.
57
# * produtil.mpi_impl --- Contains one module for each MPI implementation
58
# supported by produtil.
59
# * produtil.pipeline --- Launches and monitors processes for produtil.run.
60
#
61
# You should never need to access the mpi_impl or pipeline modules
62
# directly, and you should only need the prog and mpiprog modules for
63
# type checking. (For example, is my argument a
64
# produtil.prog.ImmutableRunner?) In nearly all cases, you can use
65
# the produtil.run functions to access the full functionality of all
66
# of the program execution modules.
67
#
68
# @section other_utils Other Utilities
69
#
70
# * produtil.setup --- Contains the produtil.setup.setup() function, which
71
# initializes the entire produtil package.
72
# * produtil.log --- Initialization of the logging module. Sets up
73
# logging to match what is required in the NCEP production environment.
74
# This is highly configurable (as is the Python logging module).
75
# * produtil.sigsafety --- raises an exception on fatal signals,
76
# instead of causing an immediate uncontrolled exit. This is connected
77
# to the produtil.locking module to work around bugs in Lustre,
78
# Panasas and GPFS file locking.
79
# * produtil.rusage --- monitor and limit process resource usage
80
# * produtil.batchsystem --- Query information about the batch system and
81
# current batch job.
82
# * produtil.cluster --- Query information about the cluster.
Generated by
1.8.10