3 # This Makefile fragment is meant to be included by packages
4 # that use any MPI implementation instead of one particular one.
5 # The available MPI implementations are "mpich" and "openmpi".
7 # === User-settable variables ===
10 # This value represents the type of MPI we wish to use on the system.
12 # Possible: mpich, openmpi
15 .if
!defined
(MPI_BUILDLINK3_MK
)
16 MPI_BUILDLINK3_MK
= # define it
18 .
include "../../mk/bsd.prefs.mk"
20 # Try to find if we have anything installed already
21 .if exists
($(LOCALBASE
)/bin
/mpicc
)
22 _MPI_PACKAGE
!= $(PKG_INFO
) -Q PKGPATH
-F
$(LOCALBASE
)/bin
/mpicc
23 MPI_TYPE?
= $(_MPI_PACKAGE
:T
)
26 MPI_TYPE?
= mpich
# default to MPICH due to backward compatibility
27 .if
$(MPI_TYPE
) == "mpich"
28 _MPI_PACKAGE
= parallel
/mpi-ch
29 .elif
$(MPI_TYPE
) == "openmpi"
30 _MPI_PACKAGE
= parallel
/openmpi
31 .
else # invalid or unimplemented type
33 "${MPI_TYPE} is not an acceptable MPI type for ${PKGNAME}."
37 .
include "../../$(_MPI_PACKAGE)/buildlink3.mk"
39 .
endif # MPI_BUILDLINK3_MK