Skip to content

Commit d3199ab

Browse files
Add mkl.MKL_BLACS_LASTMPI
Used it to conditional use mkl.MKL_BLACS_MPICH2 which may not exist on Windows
1 parent fce93dd commit d3199ab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mkl/_mkl_service.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ cdef extern from "mkl.h":
9191
int MKL_BLACS_MSMPI
9292
int MKL_BLACS_INTELMPI
9393
int MKL_BLACS_MPICH2
94+
int MKL_BLACS_LASTMPI
9495

9596
# VML Constants
9697
int VML_HA

mkl/_mkl_service.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,6 @@ cdef __set_mpi(vendor, custom_library_name=None):
874874
'custom': mkl.MKL_BLACS_CUSTOM,
875875
'msmpi': mkl.MKL_BLACS_MSMPI,
876876
'intelmpi': mkl.MKL_BLACS_INTELMPI,
877-
'mpich2': mkl.MKL_BLACS_MPICH2,
878877
},
879878
'output': {
880879
0: 'success',
@@ -883,6 +882,8 @@ cdef __set_mpi(vendor, custom_library_name=None):
883882
-3: 'MPI library cannot be set at this point',
884883
},
885884
}
885+
if mkl.MKL_BLACS_LASTMPI > mkl.MKL_BLACS_INTELMPI + 1:
886+
__variables['input']['mpich2'] = mkl.MKL_BLACS_MPICH2
886887
if ((vendor is 'custom' or custom_library_name is not None) and
887888
(vendor is not 'custom' or custom_library_name is None)):
888889
raise ValueError("Selecting custom MPI for BLACS requires specifying "

0 commit comments

Comments
 (0)