Bug 2307533 - "--stdin" doesn't work correctly except for 0
Summary: "--stdin" doesn't work correctly except for 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: prrte
Version: 40
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact:
URL: https://discussion.fedoraproject.org/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-23 12:33 UTC by navrasy+fedora
Modified: 2024-10-30 03:23 UTC (History)
4 users (show)

Fixed In Version: prrte-3.0.6-1.fc42 prrte-3.0.6-1.fc41 prrte-3.0.6-1.fc40
Clone Of:
Environment:
Last Closed: 2024-10-21 03:58:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github open-mpi ompi issues 12777 0 None open "--stdin" doesn't work correctly for non-zero 2024-08-24 08:35:25 UTC

Description navrasy+fedora 2024-08-23 12:33:17 UTC
When --stdin is changed to other process rank, the process reading from stdin will be stuck waiting even though an input is provided.
Here is a minimal example:

#include <mpi.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
    MPI_Init(&argc, &argv);
    int rank;
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    if (rank == 1)
    {
        printf("rank %d\n", rank);
        getchar();
    }
    MPI_Finalize();
    return 0;
}

Reproducible: Always

Steps to Reproduce:
1.$ module load mpi
2.$ mpicc -Wall -pedantic -o test test.c
3.$ mpirun -n 2 --stdin 1 ./test
Actual Results:  
$ mpirun -n 2 --stdin 1 ./test
rank 1
a
b
...
After being given several input the program still doesn't terminate. Debugging shows that it's stuck on getchar().

Expected Results:  
Program terminates after being given 1 input.

$ mpirun -V
mpirun (Open MPI) 5.0.2

This issue does not happen on 4.1.6 on Ubuntu. Program terminates as expected.

Edit: Turns out it also happens on 5.0.5 on Arch. Reported upstream.

Comment 1 Orion Poplawski 2024-08-25 00:59:11 UTC
Thank you for reporting it upstream.

Comment 2 Orion Poplawski 2024-10-21 03:45:27 UTC
This turns out to be a bug in prrte.

Comment 3 Fedora Update System 2024-10-21 03:55:08 UTC
FEDORA-2024-4b5225284f (prrte-3.0.6-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-4b5225284f

Comment 4 Fedora Update System 2024-10-21 03:58:09 UTC
FEDORA-2024-4b5225284f (prrte-3.0.6-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2024-10-21 14:50:46 UTC
FEDORA-2024-cd690a7bb3 (prrte-3.0.6-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-cd690a7bb3

Comment 6 Fedora Update System 2024-10-22 02:03:29 UTC
FEDORA-2024-37467e08e2 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-37467e08e2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-37467e08e2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-10-22 02:34:41 UTC
FEDORA-2024-cd690a7bb3 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-cd690a7bb3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-cd690a7bb3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-10-30 02:36:42 UTC
FEDORA-2024-cd690a7bb3 (prrte-3.0.6-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2024-10-30 03:23:12 UTC
FEDORA-2024-37467e08e2 (prrte-3.0.6-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.