Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/nemo_run/core/execution/templates/slurm.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES={{max_retries}}
{%- for env_var in env_vars %}
{{env_var}}
{%- endfor %}

set +e

Expand All @@ -33,6 +30,10 @@ head_node=${nodes_array[0]}
{%- endfor %}
{% endif %}

{%- for env_var in env_vars %}
{{env_var}}
{%- endfor %}

{%- if setup_lines %}
{{setup_lines}}
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/dummy_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -29,6 +28,7 @@ nodes_array=($nodes)
head_node=${nodes_array[0]}
head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)

export ENV_VAR=value


# Command 1
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/ft_het_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -41,6 +40,7 @@ head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)
het_group_host_0=$(scontrol show hostnames=$SLURM_JOB_NODELIST_HET_GROUP_0 | head -n1)
het_group_host_1=$(scontrol show hostnames=$SLURM_JOB_NODELIST_HET_GROUP_1 | head -n1)

export ENV_VAR=value
# This script uses experimental fault tolerance launcher
# Fault tolerance related items
export FAULT_TOL_CFG_PATH="/root/experiment/sample_job/sample_job_ft_cfg.yml"
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/ft_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -29,6 +28,7 @@ nodes_array=($nodes)
head_node=${nodes_array[0]}
head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)

export ENV_VAR=value
# This script uses experimental fault tolerance launcher
# Fault tolerance related items
export FAULT_TOL_CFG_PATH="/root/sample_job/sample_job_ft_cfg.yml"
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/group_resource_req_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -31,6 +30,7 @@ nodes_array=($nodes)
head_node=${nodes_array[0]}
head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)

export ENV_VAR=value


# Command 1
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/group_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -31,6 +30,7 @@ nodes_array=($nodes)
head_node=${nodes_array[0]}
head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)

export ENV_VAR=value


# Command 1
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/group_slurm_no_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -31,6 +30,7 @@ nodes_array=($nodes)
head_node=${nodes_array[0]}
head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)

export ENV_VAR=value


# Command 1
Expand Down
2 changes: 1 addition & 1 deletion test/core/execution/artifacts/het_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ set -evx
export PYTHONUNBUFFERED=1
export SLURM_UNBUFFEREDIO=1
export TORCHX_MAX_RETRIES=3
export ENV_VAR=value

set +e

Expand All @@ -45,6 +44,7 @@ head_node_ip=$(srun --nodes=1 --ntasks=1 -w "$head_node" hostname --ip-address)
het_group_host_0=$(scontrol show hostnames=$SLURM_JOB_NODELIST_HET_GROUP_0 | head -n1)
het_group_host_1=$(scontrol show hostnames=$SLURM_JOB_NODELIST_HET_GROUP_1 | head -n1)

export ENV_VAR=value


# Command 1
Expand Down
Loading