mpi: use mpi attribute consistently as the default MPI implementations
Use the attribute mpi to provide a system wide default MPI
implementation. The default is openmpi (as before).
This now allows for overriding the MPI implentation by using
the overlay mechanism. Build all packages with mpich instead
of the default openmpi can now be achived like this:
self: super:
{
mpi = super.mpich;
}
All derivations that have been using "mpi ? null" to provide optional
building with MPI have been change in the following way to allow for
optional builds with MPI:
{ ...
, mpi
, useMpi ? false
}
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchgit, fetchFromGitHub, cmake
|
||||
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, openmpi
|
||||
, openblas, blas, lapack, opencv3, libzip, boost, protobuf, mpi
|
||||
, onebitSGDSupport ? false
|
||||
, cudaSupport ? false, addOpenGLRunpath, cudatoolkit, nvidia_x11
|
||||
, cudnnSupport ? cudaSupport, cudnn
|
||||
@@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
|
||||
# Force OpenMPI to use g++ in PATH.
|
||||
OMPI_CXX = "g++";
|
||||
|
||||
buildInputs = [ openblas opencv3 libzip boost protobuf openmpi ]
|
||||
buildInputs = [ openblas opencv3 libzip boost protobuf mpi ]
|
||||
++ lib.optional cudaSupport cudatoolkit
|
||||
++ lib.optional cudnnSupport cudnn;
|
||||
|
||||
@@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
|
||||
"--with-openblas=${openblas}"
|
||||
"--with-boost=${boost.dev}"
|
||||
"--with-protobuf=${protobuf}"
|
||||
"--with-mpi=${openmpi}"
|
||||
"--with-mpi=${mpi}"
|
||||
"--cuda=${if cudaSupport then "yes" else "no"}"
|
||||
# FIXME
|
||||
"--asgd=no"
|
||||
|
||||
Reference in New Issue
Block a user