Coverage for python/lsst/ctrl/execute/allocationConfig.py: 100%
11 statements
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-03 02:48 -0700
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-03 02:48 -0700
1#
2# LSST Data Management System
3# Copyright 2008-2016 LSST Corporation.
4#
5# This product includes software developed by the
6# LSST Project (http://www.lsst.org/).
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the LSST License Statement and
19# the GNU General Public License along with this program. If not,
20# see <http://www.lsstcorp.org/LegalNotices/>.
21#
23import lsst.pex.config as pexConfig
26class AllocatedPlatformConfig(pexConfig.Config):
27 """Platform specific information"""
29 queue = pexConfig.Field(
30 doc="the scheduler queue to submit to", dtype=str, default="debug"
31 )
32 email = pexConfig.Field(
33 doc="line to add to the scheduler file to get email notification (if supported)",
34 dtype=str,
35 default=None,
36 )
38 scratchDirectory = pexConfig.Field(
39 doc="directory on the remote system where the scheduler file is sent",
40 dtype=str,
41 default=None,
42 )
43 loginHostName = pexConfig.Field(
44 doc="the host to login and copy files to", dtype=str, default=None
45 )
46 utilityPath = pexConfig.Field(
47 doc="the directory containing the scheduler commands", dtype=str, default=None
48 )
49 totalCoresPerNode = pexConfig.Field(
50 doc="the TOTAL number of cores on each node", dtype=int, default=1
51 )
52 glideinShutdown = pexConfig.Field(
53 doc="number of seconds of inactivity before glideins are cancelled",
54 dtype=int,
55 default=3600,
56 )
59class AllocationConfig(pexConfig.Config):
60 """A pex_config file describing the platform specific information required
61 to fill out a scheduler file which will be used to submit a scheduler
62 request.
63 """
65 # this is done on two levels instead of one for future expansion of this
66 # config class, which may require local attributes to be specified.
67 platform = pexConfig.ConfigField(
68 "platform allocation information", AllocatedPlatformConfig
69 )