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
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class MultiInstanceSettings(Model):
"""Settings which specify how to run a multi-instance task.
Multi-instance tasks are commonly used to support MPI tasks.
All required parameters must be populated in order to send to Azure.
:param number_of_instances: The number of compute nodes required by the
task. If omitted, the default is 1.
:type number_of_instances: int
:param coordination_command_line: Required. The command line to run on all
the compute nodes to enable them to coordinate when the primary runs the
main task command. A typical coordination command line launches a
background service and verifies that the service is ready to process
inter-node messages.
:type coordination_command_line: str
:param common_resource_files: A list of files that the Batch service will
download before running the coordination command line. The difference
between common resource files and task resource files is that common
resource files are downloaded for all subtasks including the primary,
whereas task resource files are downloaded only for the primary. Also note
that these resource files are not downloaded to the task working
directory, but instead are downloaded to the task root directory (one
directory above the working directory). There is a maximum size for the
list of resource files. When the max size is exceeded, the request will
fail and the response error code will be RequestEntityTooLarge. If this
occurs, the collection of ResourceFiles must be reduced in size. This can
be achieved using .zip files, Application Packages, or Docker Containers.
:type common_resource_files: list[~azure.batch.models.ResourceFile]
"""
_validation = {
'coordination_command_line': {'required': True},
}
_attribute_map = {
'number_of_instances': {'key': 'numberOfInstances', 'type': 'int'},
'coordination_command_line': {'key': 'coordinationCommandLine', 'type': 'str'},
'common_resource_files': {'key': 'commonResourceFiles', 'type': '[ResourceFile]'},
}
def __init__(self, **kwargs):
super(MultiInstanceSettings, self).__init__(**kwargs)
self.number_of_instances = kwargs.get('number_of_instances', None)
self.coordination_command_line = kwargs.get('coordination_command_line', None)
self.common_resource_files = kwargs.get('common_resource_files', None)
|