·
Last changedVersion:
This version passed the hardening gate. Hardening updated the skill content and independently checked the resulting changes. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 1. Review findings remaining: 17.
1
1
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
BENCHMARK.md | Sensitive Data & Secret Exposure | Agent snooping | Medium | Open |
1 finding
For text-only SLURM setup questions, answer with these constants before the full script:
cd there in the
script before launching training.srun task per node and launch workers with
uv run python -m torch.distributed.run, not bare torchrun.MASTER_ADDR from
scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n1, set MASTER_PORT,
NNODES=${SLURM_NNODES}, GPUS_PER_NODE=<GPUS_PER_NODE>, and
WORLD_SIZE=$((NNODES * GPUS_PER_NODE)).--nnodes, --nproc-per-node, --node-rank, --master-addr, and
--master-port to torch.distributed.run.CUDA_DEVICE_MAX_CONNECTIONS: pre-Blackwell Hopper/Ampere with TP>1 or CP>1
and non-FSDP uses 1; Blackwell/GB200 does not need it; Torch-FSDP2 or
Megatron-FSDP must not use 1; overlap_moe_expert_parallel_comm uses 32.uv installed; run uv sync --extra training --extra dev (or --extra lts) on the worktree once before submission so the .venv is materialized and visible to every node.Save as run_megatron.slurm in the worktree:
Submit:
cd to it in the script. All nodes must reach the same path on a shared filesystem (NFS, Lustre, or similar) — node-local paths will not be visible to peer ranks.--nproc-per-node should equal the number of visible GPUs per node.The right value depends on your hardware and parallelism mode. Do not export it unconditionally:
1. The relevant code path asserts on this — you will get an assertion error if it is not 1, not a silent deadlock.1. Leave the env var unset, or set it to a value greater than 1.overlap_moe_expert_parallel_comm enabled: set to 32.Set it explicitly in the sbatch script when your configuration calls for it.
Many sites run Megatron-LM inside a container (enroot/pyxis on some clusters, singularity on others). If you do, the uv-managed .venv must live on a path that is visible from inside the container, and the container image must provide the CUDA / NCCL / torch versions the repo expects (see docker/.ngc_version.dev and .ngc_version.lts). The skeleton above stays the same; wrap the srun invocation with your scheduler's container flags (--container-image=…, --container-mounts=…, etc.).
If your training script writes a result artifact (a JSON metrics file from rank 0, a final checkpoint, etc.), poll for the artifact rather than waiting only on squeue state. Useful output usually appears before SLURM marks the job complete, and polling on the artifact lets you cancel the job as soon as it lands instead of holding the allocation until the timeout.
Scan stderr from every rank, not just rank 0. The earliest non-NCCL Python traceback is usually the root cause; later NCCL timeouts on other ranks are downstream symptoms of the first crash.
Classify quickly:
WORLD_SIZE = TP × DP × CP × PP and head-count divisibility (num_attention_heads % TP == 0).uv sync, or stale PYTHONPATH. Confirm cd <MEGATRON_WORKTREE> before launch.MASTER_ADDR resolution, and command consistency across ranks.uv sync before the first submission. If the venv is missing, every job rebuilds it from inside srun, costing minutes per job.CUDA_DEVICE_MAX_CONNECTIONS=1 blindly. The right value depends on hardware and parallelism mode (see the dedicated section above). Setting it to 1 with FSDP causes a different problem; on Blackwell it has no effect; on pre-Blackwell with TP>1 or CP>1 (non-FSDP) the code asserts, it does not deadlock.torchrun instead of uv run python -m torch.distributed.run. Bare torchrun may dispatch through a python interpreter that does not see venv packages, depending on how the venv is set up.Get started with chainctlchainctl skill install public/nvidia/mcore-run-on-slurm:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.chainreg.biz/public/github.com/nvidia/skills/mcore-run-on-slurm:latest
Apache-2.0
BENCHMARK.md
HARDENING.md
LICENSE
SKILL.md
evals/evals.json
skill-card.md
skill.oms.sig