HPC systems (Slurm, Slingshot)¶
Slurm job scripts¶
job-vae-single.sh runs vae-ddp.py as one srun step; job-vae-core-extra.sh runs the core/extra split as two steps. --help lists the options. The #SBATCH lines target Frontier (8 ranks × 7 cores per node).
sbatch examples/vae/script/job-vae-single.sh --method=1 --num-workers=1
sbatch examples/vae/script/job-vae-single.sh --method=1 --gpudirect --image-scale=2
sbatch examples/vae/script/job-vae-core-extra.sh # split-node: 1 core node, the rest extra
sbatch examples/vae/script/job-vae-core-extra.sh --gpudirect --core-nnodes=2
For your own scripts using methods 1/2, export the CPU→NIC map in the batch step before srun so ranks don’t each query the topology (details):
export DDSTORE_NIC_MAP=$(python3 -m cpu_nic_map --env)
On Perlmutter (detected via NERSC_HOST) the scripts use 4 ranks per node, each seeing its node’s 4 GPUs (needed by NCCL). Override the #SBATCH lines:
sbatch -A <account> -C gpu --gpus-per-node=4 examples/vae/script/job-vae-single.sh --method=1
Slingshot VNIs and --network¶
Each srun step gets its own VNI (network isolation ID); endpoints reach each other only on a shared VNI.
Layout |
Perlmutter, no flags |
Perlmutter, |
Frontier |
|---|---|---|---|
One |
works |
works |
works; one-node steps need |
Core and extra as separate one-node steps ( |
works |
needs |
needs both flags + wrapper |
Core and extra on the same nodes, or multi-node steps |
extra can’t reach core |
needs |
second step fails to launch |
job-vae-core-extra.sh does both parts for its two steps:
#SBATCH --network=single_node_vni,job_vni:job_vniadds a job-wide VNI to every step (SLINGSHOT_VNIS=<step>,<job>); on Frontiersingle_node_vnialso gives one-node steps a CXI service.The wrapper, in each task before Python starts:
export SLINGSHOT_VNIS=${SLINGSHOT_VNIS##*,}. The cxi provider uses only the first VNI, so without it reads fail withVNI_NOT_FOUND.
It defaults to --layout=split-node; --layout=colocate works on Perlmutter only. Perlmutter columns measured on 2 nodes (results).
Troubleshooting (cxi)¶
fi_domain()fails with-38, orinit_fabric failed: no suitable fabric found: the step has no CXI service. Add#SBATCH --network=single_node_vni(Frontier, any one-node step).VNI_NOT_FOUNDbetween steps: see Slingshot VNIs.
Perlmutter filesystems¶
Use
$SCRATCH(Lustre) forhandshake_dirandDDSTORE_TEST_DIR. On CFS, file handshakes across nodes are erratic (slow, orDDSTORE_HANDSHAKE_TIMEOUT_Sreached).torch’s
file://rendezvous fails on CFS from compute nodes (DistStoreError: Unknown error 524: noflock()). Useenv://or a$SCRATCHpath.