Skip to content

Terminal size under OpenMPI  #7900

Open
@mrzv

Description

@mrzv

Background information

What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)

v4.0.4

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

Homebrew (same result for packages from the ArchLinux distribution)


Details of the problem

When querying the size of the terminal under OpenMPI, the result comes back as 0 columns, which messes up code that relies on this number for formatting.

Here's an example in Python.

# terminal-size.py
import shutil
print(shutil.get_terminal_size())

Running without OpenMPI, reports 191 columns.

python3 terminal-size.py            
os.terminal_size(columns=191, lines=75)

Running with OpenMPI, reports 0 columns.

mpirun -n 1 python3 terminal-size.py
os.terminal_size(columns=0, lines=0)

FWIW, under MPICH the terminal size is reported as 80 columns.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions