@@ -31,6 +31,14 @@ import warnings
31
31
cimport mkl._mkl_service as mkl
32
32
33
33
34
+ cdef extern from * :
35
+ """
36
+ /* defind MKL_BLACS_MPICH2 if undefined */
37
+ #ifndef MKL_BLACS_MPICH2
38
+ #define MKL_BLACS_MPICH2 -1
39
+ #endif
40
+ """
41
+
34
42
ctypedef struct MemStatData:
35
43
# DataAllocatedBytes, AllocatedBuffers
36
44
mkl.MKL_INT64 allocated_bytes
@@ -874,7 +882,6 @@ cdef __set_mpi(vendor, custom_library_name=None):
874
882
' custom' : mkl.MKL_BLACS_CUSTOM,
875
883
' msmpi' : mkl.MKL_BLACS_MSMPI,
876
884
' intelmpi' : mkl.MKL_BLACS_INTELMPI,
877
- ' mpich2' : mkl.MKL_BLACS_MPICH2,
878
885
},
879
886
' output' : {
880
887
0 : ' success' ,
@@ -883,6 +890,8 @@ cdef __set_mpi(vendor, custom_library_name=None):
883
890
- 3 : ' MPI library cannot be set at this point' ,
884
891
},
885
892
}
893
+ if mkl.MKL_BLACS_LASTMPI > mkl.MKL_BLACS_INTELMPI + 1 :
894
+ __variables[' input' ][' mpich2' ] = mkl.MKL_BLACS_MPICH2
886
895
if ((vendor is ' custom' or custom_library_name is not None ) and
887
896
(vendor is not ' custom' or custom_library_name is None )):
888
897
raise ValueError (" Selecting custom MPI for BLACS requires specifying "
0 commit comments