Hi Team,
I am using MPICH 3.0.4.
My top level script invokes a ‘batch script’ in background and then runs my mpi-program using mpiexec.
I run this top-level script in background mode ( please check details later).
It seems once I invoke the mpiexec, my batch-script execution is suspended.
I tried OpenMPI and they do not have the issue.
I have attached 3 files.
1>
run.sh : run script to run the top-level program
2>
background.sh : invoked from run.sh as a background job. Just prints something on a while loop
3>
myprog.c : simple MPI program which just waits on a loop
Compile step : mpicc myprog.c
à a.out
#! /bin/bash
./background.sh &
mpiexec -n 1 ./a.out
To reproduce :
Shell >> ./run.sh &
Shell >> jobs
[1] + Suspended (tty input) ./run.sh
Here the background.sh is suspended. However, a.out keeps running.
If I change the script so that mpiexec takes input from /dev/null, then the issue is resolved.
#! /bin/bash
./background.sh &
mpiexec -n 1 ./a.out
< /dev/null
It seems to be a MPICH specific issue.
Could you please have a look and file a bug for this.
Thanks,
Hirak