Skip to content

Commit c48f709

Browse files
author
Xiyao Dong
committed
update
1 parent cb70dd4 commit c48f709

File tree

2 files changed

+93
-11
lines changed

2 files changed

+93
-11
lines changed

articles/batch/batch-compute-node-environment-variables.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ The command lines executed by tasks on compute nodes don't run under a shell. Th
4545
| AZ_BATCH_HOST_LIST | The list of nodes that are allocated to a [multi-instance task](batch-mpi.md) in the format `nodeIP,nodeIP`. | Multi-instance primary and subtasks. | `10.0.0.4,10.0.0.5` |
4646
| AZ_BATCH_IS_CURRENT_NODE_MASTER | Specifies whether the current node is the master node for a [multi-instance task](batch-mpi.md). Possible values are `true` and `false`.| Multi-instance primary and subtasks. | `true` |
4747
| AZ_BATCH_JOB_ID | The ID of the job that the task belongs to. | All tasks except start task. | batchjob001 |
48-
| AZ_BATCH_JOB_PREP_DIR | The full path of the job preparation [task directory](files-and-directories.md) on the node. | All tasks except start task and job preparation task. Only available if the job is configured with a job preparation task. | C:\user\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation |
49-
| AZ_BATCH_JOB_PREP_WORKING_DIR | The full path of the job preparation [task working directory](files-and-directories.md) on the node. | All tasks except start task and job preparation task. Only available if the job is configured with a job preparation task. | C:\user\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation\wd |
48+
| AZ_BATCH_JOB_PREP_DIR | The full path of the job preparation [task directory](files-and-directories.md) on the node. | All tasks except start task and job preparation task. Only available if the job is configured with a job preparation task. | [AZ_BATCH_JOB_PREP_DIR](files-and-directories.md#az_batch_job_prep_dir) |
49+
| AZ_BATCH_JOB_PREP_WORKING_DIR | The full path of the job preparation [task working directory](files-and-directories.md) on the node. | All tasks except start task and job preparation task. Only available if the job is configured with a job preparation task. | [AZ_BATCH_JOB_PREP_WORKING_DIR](files-and-directories.md#az_batch_job_prep_working_dir) |
5050
| AZ_BATCH_MASTER_NODE | The IP address and port of the compute node on which the primary task of a [multi-instance task](batch-mpi.md) runs. Do not use the port specified here for MPI or NCCL communication - it is reserved for the Azure Batch service. Use the variable MASTER_PORT instead, either by setting it with a value passed in through command line argument (port 6105 is a good default choice), or using the value AML sets if it does so. | Multi-instance primary and subtasks. | `10.0.0.4:6000` |
5151
| AZ_BATCH_NODE_ID | The ID of the node that the task is assigned to. | All tasks. | tvm-1219235766_3-20160919t172711z |
5252
| AZ_BATCH_NODE_IS_DEDICATED | If `true`, the current node is a dedicated node. If `false`, it is an [Azure Spot node](batch-spot-vms.md). | All tasks. | `true` |
5353
| AZ_BATCH_NODE_LIST | The list of nodes that are allocated to a [multi-instance task](batch-mpi.md) in the format `nodeIP;nodeIP`. | Multi-instance primary and subtasks. | `10.0.0.4;10.0.0.5` |
54-
| AZ_BATCH_NODE_MOUNTS_DIR | The full path of the node level [file system mount](virtual-file-mount.md) location where all mount directories reside. Windows file shares use a drive letter, so for Windows, the mount drive is part of devices and drives. | All tasks including start task have access to the user, given the user is aware of the mount permissions for the mounted directory. | In Ubuntu, for example, the location is: `/mnt/batch/tasks/fsmounts` |
55-
| AZ_BATCH_NODE_ROOT_DIR | The full path of the root of all [Batch directories](files-and-directories.md) on the node. | All tasks. | C:\user\tasks |
56-
| AZ_BATCH_NODE_SHARED_DIR | The full path of the [shared directory](files-and-directories.md) on the node. All tasks that execute on a node have read/write access to this directory. Tasks that execute on other nodes do not have remote access to this directory (it is not a "shared" network directory). | All tasks. | C:\user\tasks\shared |
57-
| AZ_BATCH_NODE_STARTUP_DIR | The full path of the [start task directory](files-and-directories.md) on the node. | All tasks. | C:\user\tasks\startup |
54+
| AZ_BATCH_NODE_MOUNTS_DIR | The full path of the node level [file system mount](virtual-file-mount.md) location where all mount directories reside. Windows file shares use a drive letter, so for Windows, the mount drive is part of devices and drives. | All tasks including start task have access to the user, given the user is aware of the mount permissions for the mounted directory. | [AZ_BATCH_NODE_MOUNTS_DIR](files-and-directories.md#az_batch_node_mounts_dir) |
55+
| AZ_BATCH_NODE_ROOT_DIR | The full path of the root of all [Batch directories](files-and-directories.md) on the node. | All tasks. | [AZ_BATCH_NODE_ROOT_DIR](files-and-directories.md#az_batch_node_root_dir) |
56+
| AZ_BATCH_NODE_SHARED_DIR | The full path of the [shared directory](files-and-directories.md) on the node. All tasks that execute on a node have read/write access to this directory. Tasks that execute on other nodes do not have remote access to this directory (it is not a "shared" network directory). | All tasks. | [AZ_BATCH_NODE_SHARED_DIR](files-and-directories.md#az_batch_node_shared_dir) |
57+
| AZ_BATCH_NODE_STARTUP_DIR | The full path of the [start task directory](files-and-directories.md) on the node. | All tasks. | [AZ_BATCH_NODE_STARTUP_DIR](files-and-directories.md#az_batch_node_startup_dir) |
5858
| AZ_BATCH_POOL_ID | The ID of the pool that the task is running on. | All tasks. | batchpool001 |
59-
| AZ_BATCH_TASK_DIR | The full path of the [task directory](files-and-directories.md) on the node. This directory contains the `stdout.txt` and `stderr.txt` for the task, and the AZ_BATCH_TASK_WORKING_DIR. | All tasks. | C:\user\tasks\workitems\batchjob001\job-1\task001 |
59+
| AZ_BATCH_TASK_DIR | The full path of the [task directory](files-and-directories.md) on the node. This directory contains the `stdout.txt` and `stderr.txt` for the task, and the AZ_BATCH_TASK_WORKING_DIR. | All tasks. | [AZ_BATCH_TASK_DIR](files-and-directories.md#az_batch_task_dir) |
6060
| AZ_BATCH_TASK_ID | The ID of the current task. | All tasks except start task. | task001 |
61-
| AZ_BATCH_TASK_SHARED_DIR | A directory path that is identical for the primary task and every subtask of a [multi-instance task](batch-mpi.md). The path exists on every node on which the multi-instance task runs, and is read/write accessible to the task commands running on that node (both the [coordination command](batch-mpi.md#coordination-command) and the [application command](batch-mpi.md#application-command). Subtasks or a primary task that execute on other nodes do not have remote access to this directory (it is not a "shared" network directory). | Multi-instance primary and subtasks. | C:\user\tasks\workitems\multiinstancesamplejob\job-1\multiinstancesampletask |
62-
| AZ_BATCH_TASK_WORKING_DIR | The full path of the [task working directory](files-and-directories.md) on the node. The currently running task has read/write access to this directory. | All tasks. | C:\user\tasks\workitems\batchjob001\job-1\task001\wd |
61+
| AZ_BATCH_TASK_SHARED_DIR | A directory path that is identical for the primary task and every subtask of a [multi-instance task](batch-mpi.md). The path exists on every node on which the multi-instance task runs, and is read/write accessible to the task commands running on that node (both the [coordination command](batch-mpi.md#coordination-command) and the [application command](batch-mpi.md#application-command). Subtasks or a primary task that execute on other nodes do not have remote access to this directory (it is not a "shared" network directory). | Multi-instance primary and subtasks. | [AZ_BATCH_TASK_SHARED_DIR](files-and-directories.md#az_batch_task_shared_dir) |
62+
| AZ_BATCH_TASK_WORKING_DIR | The full path of the [task working directory](files-and-directories.md) on the node. The currently running task has read/write access to this directory. | All tasks. | [AZ_BATCH_TASK_WORKING_DIR](files-and-directories.md#az_batch_task_working_dir) |
6363
| AZ_BATCH_TASK_RESERVED_EPHEMERAL_DISK_SPACE_BYTES | The current threshold for disk space upon which the VM will be marked as `DiskFull`. | All tasks. | 1000000 |
6464
| CCP_NODES | The list of nodes and number of cores per node that are allocated to a [multi-instance task](batch-mpi.md). Nodes and cores are listed in the format `numNodes<space>node1IP<space>node1Cores<space>`<br/>`node2IP<space>node2Cores<space> ...`, where the number of nodes is followed by one or more node IP addresses and the number of cores for each. | Multi-instance primary and subtasks. |`2 10.0.0.4 1 10.0.0.5 1` |
6565

articles/batch/files-and-directories.md

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ The root directory contains the following directory structure:
3939
> [!IMPORTANT]
4040
> When a node is removed from the pool, all of the files that are stored on the node are removed.
4141
42-
## Batch root directory location
42+
## Batch task related files and directories location
4343

44-
The value of the `AZ_BATCH_NODE_ROOT_DIR` compute node environment variable will be determined by the VM size and the presence of a local temporary disk.
44+
Numbers of compute node environment variables' value will be determined by the VM size and the presence of a local temporary disk.
45+
46+
### AZ_BATCH_NODE_ROOT_DIR
4547

4648
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_NODE_ROOT_DIR` Value|
4749
|:---|:---|:---|
@@ -50,6 +52,86 @@ The value of the `AZ_BATCH_NODE_ROOT_DIR` compute node environment variable will
5052
|No|Windows|`C:\batch\data`|
5153
|Yes|Windows|`D:\batch`|
5254

55+
56+
### AZ_BATCH_NODE_STARTUP_DIR
57+
58+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_NODE_STARTUP_DIR` Value|
59+
|:---|:---|:---|
60+
|No|Linux|`/opt/batch/data/startup`|
61+
|Yes|Linux|`/mnt/batch/startup` or `/mnt/resource/batch/startup`|
62+
|No|Windows|`C:\batch\data\startup`|
63+
|Yes|Windows|`D:\batch\startup`|
64+
65+
66+
### AZ_BATCH_NODE_SHARED_DIR
67+
68+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_NODE_SHARED_DIR` Value|
69+
|:---|:---|:---|
70+
|No|Linux|`/opt/batch/data/shared`|
71+
|Yes|Linux|`/mnt/batch/shared` or `/mnt/resource/batch/shared`|
72+
|No|Windows|`C:\batch\data\shared`|
73+
|Yes|Windows|`D:\batch\shared`|
74+
75+
76+
### AZ_BATCH_NODE_MOUNTS_DIR
77+
78+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_NODE_MOUNTS_DIR` Value|
79+
|:---|:---|:---|
80+
|No|Linux|`/opt/batch/data/fsmounts`|
81+
|Yes|Linux|`/mnt/batch/fsmounts` or `/mnt/resource/batch/fsmounts`|
82+
|No|Windows|`C:\batch\data\fsmounts`|
83+
|Yes|Windows|`D:\batch\fsmounts`|
84+
85+
86+
### AZ_BATCH_JOB_PREP_DIR
87+
88+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_JOB_PREP_DIR` Value|
89+
|:---|:---|:---|
90+
|No|Linux|`/opt/batch/data/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation`|
91+
|Yes|Linux|`/mnt/batch/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation` or `/mnt/resource/batch/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation`|
92+
|No|Windows|`C:\batch\data\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation`|
93+
|Yes|Windows|`D:\batch\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation`|
94+
95+
96+
### AZ_BATCH_JOB_PREP_WORKING_DIR
97+
98+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_JOB_PREP_WORKING_DIR` Value|
99+
|:---|:---|:---|
100+
|No|Linux|`/opt/batch/data/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation/wd`|
101+
|Yes|Linux|`/mnt/batch/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation/wd` or `/mnt/resource/batch/tasks/workitems/jobprepreleasesamplejob/job-1/jobpreparation/wd`|
102+
|No|Windows|`C:\batch\data\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation\wd`|
103+
|Yes|Windows|`D:\batch\tasks\workitems\jobprepreleasesamplejob\job-1\jobpreparation\wd`|
104+
105+
106+
### AZ_BATCH_TASK_DIR
107+
108+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_TASK_DIR` Value|
109+
|:---|:---|:---|
110+
|No|Linux|`/opt/batch/data/tasks/workitems/batchjob001/job-1/task001`|
111+
|Yes|Linux|`/mnt/batch/tasks/workitems/batchjob001/job-1/task001` or `/mnt/resource/batch/tasks/workitems/batchjob001/job-1/task001`|
112+
|No|Windows|`C:\batch\data\tasks\workitems\batchjob001\job-1\task001`|
113+
|Yes|Windows|`D:\batch\tasks\workitems\batchjob001\job-1\task001`|
114+
115+
116+
### AZ_BATCH_TASK_WORKING_DIR
117+
118+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_TASK_WORKING_DIR` Value|
119+
|:---|:---|:---|
120+
|No|Linux|`/opt/batch/data/tasks/workitems/batchjob001/job-1/task001/wd`|
121+
|Yes|Linux|`/mnt/batch/tasks/workitems/batchjob001/job-1/task001/wd` or `/mnt/resource/batch/tasks/workitems/batchjob001/job-1/task001/wd`|
122+
|No|Windows|`C:\batch\data\tasks\workitems\batchjob001\job-1\task001\wd`|
123+
|Yes|Windows|`D:\batch\tasks\workitems\batchjob001\job-1\task001\wd`|
124+
125+
126+
### AZ_BATCH_TASK_SHARED_DIR
127+
128+
|Local Temporary Disk Present|Operating System Type|`AZ_BATCH_TASK_SHARED_DIR` Value|
129+
|:---|:---|:---|
130+
|No|Linux|`/opt/batch/data/tasks/workitems/batchjob001/job-1/task001`|
131+
|Yes|Linux|`/mnt/batch/tasks/workitems/batchjob001/job-1/task001` or `/mnt/resource/batch/tasks/workitems/batchjob001/job-1/task001`|
132+
|No|Windows|`C:\batch\data\tasks\workitems\batchjob001\job-1\task001`|
133+
|Yes|Windows|`D:\batch\tasks\workitems\batchjob001\job-1\task001`|
134+
53135
## Next steps
54136

55137
- Learn about [error handling and detection](error-handling.md) in Azure Batch.

0 commit comments

Comments
 (0)