Commit 56f49eb
committed
ofi/common: fix code that broke sessions
With sessions initialization model (section 11.3 of MPI 4 standard)
MPI may be initialized and finalized any number of times.
This patch refactors code that was assuming a one shot init/finalize
sequence for initializing Open MPI and its MCA param space
The underlying problem with the replaced code was that when an app calls MPI_Session_finalize
and there are no more sessions active, the MCA param space is
destroyed. So if one does not build Open MPI to use dynamically load components,
and a component is using static variables in a way that assumes the MCA param
space is always preserved if a static variable is set to some value,
then things break if a subsequent MPI_Session_init is invoked.
Related to #12869
Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit 2f4ba1b)1 parent e25d3e6 commit 56f49eb
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
335 | | - | |
| 336 | + | |
| 337 | + | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
| |||
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| 360 | + | |
| 361 | + | |
358 | 362 | | |
359 | 363 | | |
360 | | - | |
| 364 | + | |
| 365 | + | |
361 | 366 | | |
362 | 367 | | |
363 | 368 | | |
| |||
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| 382 | + | |
| 383 | + | |
377 | 384 | | |
378 | 385 | | |
379 | | - | |
| 386 | + | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
387 | 395 | | |
388 | 396 | | |
389 | 397 | | |
| 398 | + | |
| 399 | + | |
390 | 400 | | |
391 | 401 | | |
392 | 402 | | |
| |||
0 commit comments