Repository navigation
Commit 9ff9bf7
committed
fix(ray): drop Slurm/PMIx/MPI launcher env in Ray workers so TRT-LLM can import
`import tensorrt_llm` runs MPI_Init. Under srun (ray.sub starts every step with
--mpi=pmix) Open MPI aborts on an inherited SLURM_STEP_ID ("OMPI was not built
with SLURM's PMI support"), and residual OMPI_/MPI_/SLURM_ vars send TRT-LLM to
MPI_Comm_Spawn (MPI_ERR_SPAWN). This breaks every multi-node TRT-LLM run on
such a cluster, including main's own grpo-qwen3-1.7b-2n4g-automodel-trtllm.
A runtime_env cannot delete a variable and TRT-LLM's GPU workers inherit the
raylet's environment, so remove the launcher state inside each worker with a
job-level worker_process_setup_hook. The driver and ray.sub keep their
environment; the OMPI/PRTE root-allow vars set by the TRT-LLM worker are kept.
Verified: grpo-qwen3.5-35ba3b-4n4g-megatron-trtllm-mxfp8-noncolocated passes all
checks on 4 nodes with an unmodified ray.sub.
Signed-off-by: Erin Ho <14718778+hchings@users.noreply.github.com>1 parent e3da39a commit 9ff9bf7
2 files changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
439 | 469 | | |
440 | 470 | | |
441 | 471 | | |
| |||
466 | 496 | | |
467 | 497 | | |
468 | 498 | | |
| 499 | + | |
469 | 500 | | |
470 | 501 | | |
471 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
0 commit comments