open-mpi / ompi

Open MPI main development repository
https://www.open-mpi.org
Other
2.12k stars 857 forks source link

refactor/rewrite mpirun to not exec a second executable #12712

Open hppritcha opened 1 month ago

hppritcha commented 1 month ago

As part of the Open MPI fork of PRRTe migration into the Open MPI source tree proper, it would be desirable to rework Open MPI's mpirun tool to not exec the prterun executable.

One option would be to export a function(s) from libprrte.so (which may be renamed as part of this project) that the existing mpirun.c could use to replace the need to fork/exec prterun. This approach would require effectively turning the main function in https://github.com/open-mpi/prrte/blob/master/src/tools/prte/prte.c into a library function(s) provided in libprrte.so.

bosilca commented 1 month ago

Can't we skip the fork and just exec the prterun in the mpirun process ?

hppritcha commented 1 month ago

Can't we skip the fork and just exec the prterun in the mpirun process ?

actually mpirun just execv's pretrun.