Repository navigation
Description
System Info
- Containers:
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc27(amd64 and arm64) and1.3.0rc28(amd64 checked). - Both ship HPC-X v2.50 (
/opt/hpcx/VERSION)./opt/hpcx/ompipoints to Open MPI v5.0.10rc2. rc26 defaulted to Open MPI 4.1.9a1. - mpi4py 3.1.5.
- No GPU is needed. The failure reproduces on a CPU-only host.
Who can help?
The upstream fix, open-mpi/ompi#14398, is by @tongyuantongyu.
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
A singleton MPI.COMM_SELF.Spawn fails when the hostname is long. TensorRT-LLM's MpiPoolSession starts its workers this way, through mpi4py.futures.MPIPoolExecutor. The container's own Python and mpi4py are enough to show it:
IMG=nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc27
SPAWN='
import sys
from mpi4py import MPI
child = "from mpi4py import MPI; p = MPI.Comm.Get_parent(); p.send(7, dest=0); p.Disconnect()"
comm = MPI.COMM_SELF.Spawn(sys.executable, args=["-c", child], maxprocs=1)
print("spawned child sent", comm.recv(source=0))
comm.Disconnect()
'
for n in 30 46; do
echo "hostname length $n:"
docker run --rm --user 1000:1000 -e HOME=/tmp \
--hostname "$(printf 'h%.0s' $(seq 1 $n))" \
--entrypoint python3 "$IMG" -c "$SPAWN" 2>&1 | tail -1
doneOutput, the same on amd64 and arm64:
hostname length 30:
spawned child sent 7
hostname length 46:
mpi4py.MPI.Exception: MPI_ERR_UNKNOWN: unknown error
The command runs as a non-root user, because Open MPI 5 refuses to start its runtime as root, which is a different error.
Expected behavior
MPI.COMM_SELF.Spawn from a singleton works regardless of the hostname length, as it did with Open MPI 4 in rc26.
actual behavior
The spawn fails with MPI_ERR_UNKNOWN when the hostname length plus the number of digits in the process ID exceeds 37. Measured with a 2-digit process ID: a 35-character hostname spawns, and a 36-character one fails. With a 5-digit process ID, 32 spawns and 33 fails. An MPIPoolExecutor pool fails the same way.
In Kubernetes, the hostname is the pod name, which can have up to 63 characters. So on many pods, TensorRT-LLM cannot start its workers from a single process. Dynamo's CI runs in pods with 46- and 50-character names, and its arm64 job failed this way.
additional notes
Root cause, in Open MPI itself:
- For a singleton,
MPI_Comm_spawnstarts aprtedaemon instart_dvm()(ompi/dpm/dpm.c), and passes the singleton's name as--singleton OMPI_PRINT_ID(OMPI_PROC_MYID). ompi_pmix_print_id()formats"%s.%u"into a buffer ofOPAL_PRINT_NAME_ARGS_MAX_SIZE, which is 50 bytes in v5.0.10.- The singleton's namespace is
singleton.<hostname>.<pid>, so a long name is truncated.prtethen registers a different namespace and rank, and rejects the singleton when it connects.
Status upstream:
- Fixed by ompi/rte: Increase job name printing buffer size open-mpi/ompi#14398 (main), [v6.0.x] ompi/rte: Increase job name printing buffer size open-mpi/ompi#14402 (v6.0.x) and [v5.0.x] ompi/rte: Increase job name printing buffer size open-mpi/ompi#14409 (v5.0.x). The fix raises the buffer to
PMIX_MAX_NSLEN + 12. - No release carries it yet. v5.0.11 was tagged before the fix and still has the 50-byte buffer.
- Mellanox/ompi's
v5.0.x_hpcxbranch includes the fix since v5.0.x hpcx Mellanox/ompi#61 (merged 2026-09-19). - 1.3.0rc28 still ships HPC-X v2.50 with Open MPI v5.0.10rc2, and a 36-character hostname fails there as well.
Request: ship an HPC-X build that includes the fix, or backport the upstream commit while building the container, the way #18907 backports an Open MPI commit for ARM64.
Workarounds until then:
- Set
PMIX_HOSTNAMEto a short value in a process that no MPI launcher started. PMIx uses it instead of the real hostname, and the spawn then works. Processes thatmpirunorprtestart getPMIX_HOSTNAMEfrom the launcher, so they keep the real name. Dynamo does this with a startup hook in chore: OPS-8654 bump trtllm to v1.3.0rc27 ai-dynamo/dynamo#15060 (container/deps/trtllm/_dynamo_pmix_hostname.py). - Start the process under
mpirun -n 1, which avoids the singleton path. - On amd64, Open MPI 4.1.9a1 is still in the container at
/opt/hpcx/ompi4, and it spawns with a 50-character hostname. On arm64 this is not an option, because the container'slibtorch_cpu.soneedsompi_mpi_short_float, which only Open MPI 5 defines.
Internal tracking: NVBug 6722913.
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
Activity
docs(trtllm): say when to remove the Open MPI 5 hostname workaround
chzblych commentedon Sep 28, 2026
@dmitry-tokarev-nv TRT-LLM also uses the
PMIX_HOSTNAMEworkaround in our CI testing (https://github.com/NVIDIA/TensorRT-LLM/blob/main/jenkins/L0_Test.groovy#L5561).However, we decided not to set this env variable by default in our release container, as there were concerns about how it might be interpreted or consumed by other user applications.
Instead, we documented the workaround as a known limitation in https://github.com/NVIDIA/TensorRT-LLM/blob/main/docs/source/installation/installation-guide.md#known-limitations.
Since the root cause is an upstream OpenMPI issue rather than a TRT-LLM issue, I’m going to close this ticket.
We don’t have a strong preference for a specific OpenMPI version. In general, TRT-LLM will use the OpenMPI version shipped with the base NGC PyTorch image, where v5 came in through the NGC PyTorch 26.08 base image update.
optimized-baseline: set PMIX_HOSTNAME for TensorRT-LLM 1.3.0rc27+ ima…
optimized-baseline: set PMIX_HOSTNAME for TensorRT-LLM 1.3.0rc27+ ima…