This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Job.py
267 lines (229 loc) · 13.7 KB
/
Job.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
from abaqusConstants import *
from .MessageArray import MessageArray
class Job:
"""The Job object is the abstract base type for other Job objects. The Job object has no
explicit constructor. The methods and members of the Job object are common to all
objects derived from Job.
Attributes
----------
name: str
A String specifying the name of the new job. The name must be a valid Abaqus/:py:class:`~.CAE` object
name.
type: SymbolicConstant
A SymbolicConstant specifying :py:class:`~.the` type of job. Possible values are ANALYSIS,
SYNTAXCHECK, RECOVER, and RESTART. The default value is ANALYSIS.If :py:class:`~.the` object has :py:class:`~.the`
type JobFromInputFile, **type=RESTART** is not available.
waitHours: int
An Int specifying the number of hours to wait before submitting the job. This argument
is ignored if **queue** is set. The default value is 0.This argument works in conjunction
with **waitMinutes**. **waitHours** and **atTime** are mutually exclusive.
waitMinutes: int
An Int specifying the number of minutes to wait before submitting the job. This argument
is ignored if **queue** is set. The default value is 0.This argument works in conjunction
with **waitHours**. **waitMinutes** and **atTime** are mutually exclusive.
numCpus: int
An Int specifying the number of CPUs to use for this analysis if parallel processing is
available. Possible values are **numCpus** >> 0. The default value is 1.
memory: int
An Int specifying the amount of memory available to Abaqus analysis. The value should be
expressed in the units supplied in **memoryUnits**. The default value is 90.
memoryUnits: SymbolicConstant
A SymbolicConstant specifying the units for the amount of memory used in an Abaqus
analysis. Possible values are PERCENTAGE, MEGA_BYTES, and GIGA_BYTES. The default value
is PERCENTAGE.
getMemoryFromAnalysis: Boolean
A Boolean specifying whether to retrieve the recommended memory settings from the last
datacheck or analysis run and use those values in subsequent submissions. The default
value is ON.
explicitPrecision: SymbolicConstant
A SymbolicConstant specifying whether to use the double precision version of
Abaqus/Explicit. Possible values are SINGLE, FORCE_SINGLE, DOUBLE,
DOUBLE_CONSTRAINT_ONLY, and DOUBLE_PLUS_PACK. The default value is SINGLE.
nodalOutputPrecision: SymbolicConstant
A SymbolicConstant specifying the precision of the nodal output written to the output
database. Possible values are SINGLE and FULL. The default value is SINGLE.
parallelizationMethodExplicit: SymbolicConstant
A SymbolicConstant specifying the parallelization method for Abaqus/Explicit. This value
is ignored for Abaqus/Standard. Possible values are DOMAIN and LOOP. The default value
is DOMAIN.
numDomains: int
An Int specifying the number of domains for parallel execution in Abaqus/Explicit. When
**parallelizationMethodExplicit=DOMAIN**, **numDomains** must be a multiple of **numCpus**.
The default value is 1.
activateLoadBalancing: Boolean
A Boolean specifying whether to activate dyanmic load balancing for jobs running on
multiple processors with multiple domains in Abaqus/Explicit. The default value is OFF.
multiprocessingMode: SymbolicConstant
A SymbolicConstant specifying whether an analysis is decomposed into threads or into
multiple processes that communicate through a message passing interface (MPI). Possible
values are DEFAULT, THREADS,MPI, and HYBRID. The default value is DEFAULT.
numThreadsPerMpiProcess: int
An Int specifying the number of threads per MPI process to use for this analysis if
parallel processing is available. Possible values are **numThreadsPerMpiProcess** >> 0.
The default value is 1.
analysis: SymbolicConstant
A SymbolicConstant specifying whe:py:class:`~.the`r :py:class:`~.the` job will be analyzed by Abaqus/Standard or
Abaqus/Explicit. Possible values are STANDARD, EXPLICIT, and UNKNOWN.If :py:class:`~.the` object has
:py:class:`~.the` type JobFromInputFile, **analysis=UNKNOWN**.
status: SymbolicConstant
A SymbolicConstant specifying the status of the analysis. Possible values are SUBMITTED,
RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_RUNNING, and CHECK_COMPLETED.If the
**message** member is empty, **status** is set to NONE.
queue: str
A String specifying the name of the queue to which to submit the job. The default value
is an empty string.Note:You can use the **queue** argument when creating a :py:class:`~abaqus.Job.Job.Job` object on a
Windows workstation; however, remote queues are available only on Linux platforms.
atTime: str
A String specifying the time at which to submit the job. If **queue** is empty, the string
syntax must be valid for the Linux `at` command. If **queue** is set, the syntax must be
valid according to the system administrator. The default value is an empty
string.Note:You can use the **atTime** argument when creating a :py:class:`~abaqus.Job.Job.Job` object on a Windows
workstation; however, the `at` command is available only on Linux platforms.
scratch: str
A String specifying the location of the scratch directory. The default value is an empty
string.
userSubroutine: str
A String specifying the file containing the user's subroutine definitions. The default
value is an empty string.
messages: MessageArray
A :py:class:`~abaqus.Job.MessageArray.MessageArray` object specifying the messages received during an analysis.
environment: tuple
A tuple of Strings specifying the environment variables and their values.
licenseType: SymbolicConstant
A SymbolicConstant specifying the type of license type being used in the case of the
DSLS SimUnit license model. Possible values are DEFAULT, TOKEN, and CREDIT. The default
value is DEFAULT.If the license model is not the DSLS SimUnit, the licenseType is not
available.
Notes
-----
This object can be accessed by:
.. code-block:: python
import job
mdb.coexecutions[name].jobs[name]
mdb.jobs[name]
The corresponding analysis keywords are:
- HEADING
- PREPRINT
"""
# A String specifying the name of the new job. The name must be a valid Abaqus/CAE object
# name.
name: str = ""
# A SymbolicConstant specifying the type of job. Possible values are ANALYSIS,
# SYNTAXCHECK, RECOVER, and RESTART. The default value is ANALYSIS.If the object has the
# type JobFromInputFile, *type*=RESTART is not available.
type: SymbolicConstant = ANALYSIS
# An Int specifying the number of hours to wait before submitting the job. This argument
# is ignored if *queue* is set. The default value is 0.This argument works in conjunction
# with *waitMinutes*. *waitHours* and *atTime* are mutually exclusive.
waitHours: int = 0
# An Int specifying the number of minutes to wait before submitting the job. This argument
# is ignored if *queue* is set. The default value is 0.This argument works in conjunction
# with *waitHours*. *waitMinutes* and *atTime* are mutually exclusive.
waitMinutes: int = 0
# An Int specifying the number of CPUs to use for this analysis if parallel processing is
# available. Possible values are *numCpus* >> 0. The default value is 1.
numCpus: int = 1
# An Int specifying the amount of memory available to Abaqus analysis. The value should be
# expressed in the units supplied in *memoryUnits*. The default value is 90.
memory: int = 90
# A SymbolicConstant specifying the units for the amount of memory used in an Abaqus
# analysis. Possible values are PERCENTAGE, MEGA_BYTES, and GIGA_BYTES. The default value
# is PERCENTAGE.
memoryUnits: SymbolicConstant = PERCENTAGE
# A Boolean specifying whether to retrieve the recommended memory settings from the last
# datacheck or analysis run and use those values in subsequent submissions. The default
# value is ON.
getMemoryFromAnalysis: Boolean = ON
# A SymbolicConstant specifying whether to use the double precision version of
# Abaqus/Explicit. Possible values are SINGLE, FORCE_SINGLE, DOUBLE,
# DOUBLE_CONSTRAINT_ONLY, and DOUBLE_PLUS_PACK. The default value is SINGLE.
explicitPrecision: SymbolicConstant = SINGLE
# A SymbolicConstant specifying the precision of the nodal output written to the output
# database. Possible values are SINGLE and FULL. The default value is SINGLE.
nodalOutputPrecision: SymbolicConstant = SINGLE
# A SymbolicConstant specifying the parallelization method for Abaqus/Explicit. This value
# is ignored for Abaqus/Standard. Possible values are DOMAIN and LOOP. The default value
# is DOMAIN.
parallelizationMethodExplicit: SymbolicConstant = DOMAIN
# An Int specifying the number of domains for parallel execution in Abaqus/Explicit. When
# *parallelizationMethodExplicit*=DOMAIN, *numDomains* must be a multiple of *numCpus*.
# The default value is 1.
numDomains: int = 1
# A Boolean specifying whether to activate dyanmic load balancing for jobs running on
# multiple processors with multiple domains in Abaqus/Explicit. The default value is OFF.
activateLoadBalancing: Boolean = OFF
# A SymbolicConstant specifying whether an analysis is decomposed into threads or into
# multiple processes that communicate through a message passing interface (MPI). Possible
# values are DEFAULT, THREADS,MPI, and HYBRID. The default value is DEFAULT.
multiprocessingMode: SymbolicConstant = DEFAULT
# An Int specifying the number of threads per MPI process to use for this analysis if
# parallel processing is available. Possible values are *numThreadsPerMpiProcess* >> 0.
# The default value is 1.
numThreadsPerMpiProcess: int = 1
# A SymbolicConstant specifying whether the job will be analyzed by Abaqus/Standard or
# Abaqus/Explicit. Possible values are STANDARD, EXPLICIT, and UNKNOWN.If the object has
# the type JobFromInputFile, *analysis*=UNKNOWN.
analysis: SymbolicConstant = None
# A SymbolicConstant specifying the status of the analysis. Possible values are SUBMITTED,
# RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_RUNNING, and CHECK_COMPLETED.If the
# *message* member is empty, *status* is set to NONE.
status: SymbolicConstant = None
# A String specifying the name of the queue to which to submit the job. The default value
# is an empty string.Note:You can use the *queue* argument when creating a Job object on a
# Windows workstation; however, remote queues are available only on Linux platforms.
queue: str = ""
# A String specifying the time at which to submit the job. If *queue* is empty, the string
# syntax must be valid for the Linux `at` command. If *queue* is set, the syntax must be
# valid according to the system administrator. The default value is an empty
# string.Note:You can use the *atTime* argument when creating a Job object on a Windows
# workstation; however, the `at` command is available only on Linux platforms.
atTime: str = ""
# A String specifying the location of the scratch directory. The default value is an empty
# string.
scratch: str = ""
# A String specifying the file containing the user's subroutine definitions. The default
# value is an empty string.
userSubroutine: str = ""
# A MessageArray object specifying the messages received during an analysis.
messages: MessageArray = MessageArray()
# A tuple of Strings specifying the environment variables and their values.
environment: tuple = ()
# A SymbolicConstant specifying the type of license type being used in the case of the
# DSLS SimUnit license model. Possible values are DEFAULT, TOKEN, and CREDIT. The default
# value is DEFAULT.If the license model is not the DSLS SimUnit, the licenseType is not
# available.
licenseType: SymbolicConstant = DEFAULT
def kill(self):
"""This method kills the analysis of a job."""
pass
def submit(
self,
consistencyChecking: Boolean = ON,
datacheckJob: Boolean = False,
continueJob: Boolean = False,
):
"""This method submits a job for analysis.
Parameters
----------
consistencyChecking
A Boolean specifying whether to perform consistency checking for the job. The default
value is ON. It is not recommended to turn the consistency checking off unless you are
absolutely sure the model is consistent.
datacheckJob
A Boolean specifying whether to run the job as a datacheck analysis. The default value
is False. The datacheckJob and continueJob arguments cannot both be True.
continueJob
A Boolean specifying whether to run the job as a continuation analysis. The default
value is False. The datacheckJob and continueJob arguments cannot both be True.
"""
pass
def waitForCompletion(self):
"""This method interrupts the execution of the script until the end of the analysis. If you
call the waitForCompletion method and the *status* member is neither SUBMITTED nor
RUNNING, Abaqus assumes the analysis has either completed or aborted and returns
immediately.
"""
pass
def clearMessage(self):
"""This method clears *messages* and sets the *status* to NONE."""
pass