Skip to content

Commit 6ae7472

Browse files
[Finalize] Del_proc also spawned processes that have different jobids
Signed-off-by: Brelle Emmanuel <emmanuel.brelle@atos.net>
1 parent 38962d8 commit 6ae7472

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ompi/instance/instance.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* reserved.
99
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
1010
* Copyright (c) 2024 NVIDIA Corporation. All rights reserved.
11+
* Copyright (c) 2025 Bull SAS. All rights reserved.
1112
* $COPYRIGHT$
1213
*
1314
* Additional copyrights may follow
@@ -184,8 +185,13 @@ static int ompi_mpi_instance_cleanup_pml (void)
184185
size_t nprocs = 0;
185186
ompi_proc_t **procs;
186187

187-
procs = ompi_proc_get_allocated (&nprocs);
188+
/* MPI_Comm_spawn calls PML add_procs on procs that have different jobid,
189+
* ompi_proc_get_allocated cannot be used here */
190+
procs = ompi_proc_all (&nprocs);
188191
MCA_PML_CALL(del_procs(procs, nprocs));
192+
for (int proc_idx = 0; proc_idx < nprocs; ++proc_idx) {
193+
OBJ_RELEASE(procs[proc_idx]);
194+
}
189195
free(procs);
190196

191197
return OMPI_SUCCESS;

0 commit comments

Comments
 (0)