`--exec-type=docker` Launches Only a Single Process, Ignores `--num-accelerators`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 203
- Forks
- 67
- Avg merge
- 20m
- Merged PRs (30d)
- 8
Description
When running mlpstorage training run with --exec-type=docker and --num-accelerators=6, only one process is executed, even though multiple accelerators are specified:
[OUTPUT] Running DLIO [Training & Checkpointing] with 1 process(es)
The benchmark command generated:
/local/.venv/bin/dlio_benchmark workload=unet3d_h100 \
++hydra.run.dir=/mnt/array/j25/result_j16/run7/training/unet3d/run/20250812_115117 \
++hydra.output_subdir=dlio_config \
++workload.dataset.num_files_train=21000 \
++workload.dataset.num_subfolders_train=70 \
++workload.reader.read_threads=26 \
++workload.reader.odirect=True \
++workload.reader.prefetch_size=1 \
++workload.workflow.profiling=iostat \
++workload.workflow.hydra_logging=enabled \
++workload.workflow.job_logging=enabled \
++workload.dataset.data_folder=/mnt/array/j25/data/unet3d \
--config-dir=/local/.venv/lib/python3.10/site-packages/configs/dlio
Works as Expected with --exec-type=mpi
Using MPI does correctly spawn all 6 processes:
mpirun -n 6 -host <ip1>:6 /local/.venv/bin/dlio_benchmark workload=unet3d_h100 \
++hydra.run.dir=/mnt/array/j25/result_j16/run7/training/unet3d/run/20250812_121415 \
...
Output:
[OUTPUT] Running DLIO [Training & Checkpointing] with 6 process(es)
Additional Observation:
In version 2.0 of the code, the logic for wrapping the benchmark command with mpirun is only applied if exec_type == mpi, but bypassed entirely when exec_type == docker.
Relevant code snippet:
if self.args.exec_type == EXEC_TYPE.MPI:
self.logger.debug(f'Generating MPI Command with binary "{self.args.mpi_bin}"')
mpi_prefix = generate_mpi_prefix_cmd(
self.args.mpi_bin, self.args.hosts, self.args.num_processes,
self.args.oversubscribe, self.args.allow_run_as_root,
self.args.mpi_params, self.logger
)
cmd = f"{mpi_prefix} {cmd}"
It seems the assumption might have been that Docker manages process launching internally but it doesn't. This causes it to default to a single process.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the version 2.0 command-construction logic around the exec_type check and generate_mpi_prefix_cmd. Verify how Docker runs the generated benchmark command with num_accelerators set, then confirm that the Docker path launches all requested processes rather than one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100