@@ -31,6 +31,14 @@ import warnings
3131cimport mkl._mkl_service as mkl
3232
3333
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+
3442ctypedef struct MemStatData:
3543 # DataAllocatedBytes, AllocatedBuffers
3644 mkl.MKL_INT64 allocated_bytes
@@ -874,7 +882,6 @@ cdef __set_mpi(vendor, custom_library_name=None):
874882 ' custom' : mkl.MKL_BLACS_CUSTOM,
875883 ' msmpi' : mkl.MKL_BLACS_MSMPI,
876884 ' intelmpi' : mkl.MKL_BLACS_INTELMPI,
877- ' mpich2' : mkl.MKL_BLACS_MPICH2,
878885 },
879886 ' output' : {
880887 0 : ' success' ,
@@ -883,6 +890,8 @@ cdef __set_mpi(vendor, custom_library_name=None):
883890 - 3 : ' MPI library cannot be set at this point' ,
884891 },
885892 }
893+ if mkl.MKL_BLACS_LASTMPI > mkl.MKL_BLACS_INTELMPI + 1 :
894+ __variables[' input' ][' mpich2' ] = mkl.MKL_BLACS_MPICH2
886895 if ((vendor is ' custom' or custom_library_name is not None ) and
887896 (vendor is not ' custom' or custom_library_name is None )):
888897 raise ValueError (" Selecting custom MPI for BLACS requires specifying "
0 commit comments