@@ -41,32 +41,30 @@ def get():
41
41
return 'none'
42
42
43
43
oob_val = overrides .get ('CHPL_COMM_OFI_OOB' )
44
- if oob_val :
45
- check_valid_var ("CHPL_COMM_OFI_OOB" , oob_val , ("mpi" , "pmi2" , "sockets" ))
46
- return oob_val
47
-
48
- #
49
- # By default, use PMI2 out-of-band support on Cray X* and HPE Cray EX
50
- # systems, MPI on other Cray systems or with an MPI-based launcher,
51
- # and "sockets" otherwise.
52
- #
53
- platform_val = chpl_platform .get ('target' )
54
- launcher_val = chpl_launcher .get ()
55
- if 'cray-x' in platform_val or chpl_platform .is_hpe_cray ('target' ):
56
- oob_val = 'pmi2'
57
- elif 'cray-' in platform_val :
58
- oob_val = 'mpi'
59
- elif 'mpi' in launcher_val :
60
- oob_val = 'mpi'
61
- else :
62
- import chpl_compiler
63
- if _find_pmi2 () is not None :
64
- oob_val = 'pmi2'
65
- elif "-lpmi2" in chpl_compiler .get_system_link_args ('target' ):
44
+ if not oob_val :
45
+ #
46
+ # By default, use PMI2 out-of-band support on Cray X* and HPE Cray EX
47
+ # systems, MPI on other Cray systems or with an MPI-based launcher,
48
+ # and "sockets" otherwise.
49
+ #
50
+ platform_val = chpl_platform .get ('target' )
51
+ launcher_val = chpl_launcher .get ()
52
+ if 'cray-x' in platform_val or chpl_platform .is_hpe_cray ('target' ):
66
53
oob_val = 'pmi2'
54
+ elif 'cray-' in platform_val :
55
+ oob_val = 'mpi'
56
+ elif 'mpi' in launcher_val :
57
+ oob_val = 'mpi'
67
58
else :
68
- oob_val = 'sockets'
69
-
59
+ import chpl_compiler
60
+ if _find_pmi2 () is not None :
61
+ oob_val = 'pmi2'
62
+ elif "-lpmi2" in chpl_compiler .get_system_link_args ('target' ):
63
+ oob_val = 'pmi2'
64
+ else :
65
+ oob_val = 'sockets'
66
+
67
+ check_valid_var ("CHPL_COMM_OFI_OOB" , oob_val , ("mpi" , "pmi2" , "sockets" ))
70
68
return oob_val
71
69
72
70
# returns 2-tuple of lists
0 commit comments