Commit 2f4ba1b
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]>1 parent 86961a2 commit 2f4ba1b
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
339 | | - | |
| 340 | + | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | | - | |
| 368 | + | |
| 369 | + | |
365 | 370 | | |
366 | 371 | | |
367 | 372 | | |
| |||
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| 386 | + | |
| 387 | + | |
381 | 388 | | |
382 | 389 | | |
383 | | - | |
| 390 | + | |
| 391 | + | |
384 | 392 | | |
385 | 393 | | |
386 | 394 | | |
| |||
391 | 399 | | |
392 | 400 | | |
393 | 401 | | |
| 402 | + | |
| 403 | + | |
394 | 404 | | |
395 | 405 | | |
396 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
397 | 409 | | |
398 | 410 | | |
399 | 411 | | |
| |||
404 | 416 | | |
405 | 417 | | |
406 | 418 | | |
| 419 | + | |
| 420 | + | |
407 | 421 | | |
408 | 422 | | |
409 | 423 | | |
| |||
0 commit comments