summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/biology/migrate/default.nix4
-rw-r--r--pkgs/applications/science/biology/neuron/default.nix9
-rw-r--r--pkgs/applications/science/biology/raxml/default.nix10
-rw-r--r--pkgs/applications/science/chemistry/openmolcas/default.nix4
-rw-r--r--pkgs/applications/science/chemistry/quantum-espresso/default.nix7
-rw-r--r--pkgs/applications/science/chemistry/siesta/default.nix9
-rw-r--r--pkgs/applications/science/electronics/openems/default.nix5
-rw-r--r--pkgs/applications/science/math/cntk/default.nix6
-rw-r--r--pkgs/applications/science/math/getdp/default.nix4
-rw-r--r--pkgs/applications/science/math/scotch/default.nix4
-rw-r--r--pkgs/applications/science/molecular-dynamics/gromacs/default.nix4
-rw-r--r--pkgs/applications/science/molecular-dynamics/lammps/default.nix4
-rw-r--r--pkgs/applications/science/physics/elmerfem/default.nix4
13 files changed, 38 insertions, 36 deletions
diff --git a/pkgs/applications/science/biology/migrate/default.nix b/pkgs/applications/science/biology/migrate/default.nix
index 0e2aa1c1a791..ba55898e4f9d 100644
--- a/pkgs/applications/science/biology/migrate/default.nix
+++ b/pkgs/applications/science/biology/migrate/default.nix
@@ -1,4 +1,4 @@
-{ gccStdenv, fetchurl, zlib, openmpi }:
+{ gccStdenv, fetchurl, zlib, mpi }:
gccStdenv.mkDerivation rec {
version = "3.7.2";
@@ -9,7 +9,7 @@ gccStdenv.mkDerivation rec {
sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v";
};
- buildInputs = [ zlib openmpi ];
+ buildInputs = [ zlib mpi ];
setSourceRoot = ''sourceRoot=$(echo */src)'';
buildFlags = [ "thread" "mpis" ];
preInstall = "mkdir -p $out/man/man1";
diff --git a/pkgs/applications/science/biology/neuron/default.nix b/pkgs/applications/science/biology/neuron/default.nix
index 154965b15214..7bfef3a82fed 100644
--- a/pkgs/applications/science/biology/neuron/default.nix
+++ b/pkgs/applications/science/biology/neuron/default.nix
@@ -8,7 +8,8 @@
, readline
, which
, python ? null
-, mpi ? null
+, useMpi ? false
+, mpi
, iv
}:
@@ -17,7 +18,8 @@ stdenv.mkDerivation rec {
version = "7.5";
nativeBuildInputs = [ which pkg-config automake autoconf libtool ];
- buildInputs = [ ncurses readline python mpi iv ];
+ buildInputs = [ ncurses readline python iv ]
+ ++ lib.optional useMpi mpi;
src = fetchurl {
url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz";
@@ -54,7 +56,7 @@ stdenv.mkDerivation rec {
configureFlags = with lib;
[ "--with-readline=${readline}" "--with-iv=${iv}" ]
++ optionals (python != null) [ "--with-nrnpython=${python.interpreter}" ]
- ++ (if mpi != null then ["--with-mpi" "--with-paranrn"]
+ ++ (if useMpi then ["--with-mpi" "--with-paranrn"]
else ["--without-mpi"]);
@@ -84,4 +86,3 @@ stdenv.mkDerivation rec {
platforms = platforms.x86_64 ++ platforms.i686;
};
}
-
diff --git a/pkgs/applications/science/biology/raxml/default.nix b/pkgs/applications/science/biology/raxml/default.nix
index 4f9b5aca1b2d..6e747e318f57 100644
--- a/pkgs/applications/science/biology/raxml/default.nix
+++ b/pkgs/applications/science/biology/raxml/default.nix
@@ -1,7 +1,7 @@
{ lib, stdenv
, fetchFromGitHub
-, pkgs
-, mpi ? false
+, useMpi ? false
+, mpi
}:
stdenv.mkDerivation rec {
@@ -15,16 +15,16 @@ stdenv.mkDerivation rec {
sha256 = "1jqjzhch0rips0vp04prvb8vmc20c5pdmsqn8knadcf91yy859fh";
};
- buildInputs = lib.optionals mpi [ pkgs.openmpi ];
+ buildInputs = lib.optionals useMpi [ mpi ];
# TODO darwin, AVX and AVX2 makefile targets
- buildPhase = if mpi then ''
+ buildPhase = if useMpi then ''
make -f Makefile.MPI.gcc
'' else ''
make -f Makefile.SSE3.PTHREADS.gcc
'';
- installPhase = if mpi then ''
+ installPhase = if useMpi then ''
mkdir -p $out/bin && cp raxmlHPC-MPI $out/bin
'' else ''
mkdir -p $out/bin && cp raxmlHPC-PTHREADS-SSE3 $out/bin
diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix
index 1297e595b9a8..4bd88456b8f6 100644
--- a/pkgs/applications/science/chemistry/openmolcas/default.nix
+++ b/pkgs/applications/science/chemistry/openmolcas/default.nix
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl
, openblas, hdf5-cpp, python3, texlive
-, armadillo, openmpi, globalarrays, openssh
+, armadillo, mpi, globalarrays, openssh
, makeWrapper, fetchpatch
} :
@@ -33,7 +33,7 @@ in stdenv.mkDerivation {
hdf5-cpp
python
armadillo
- openmpi
+ mpi
globalarrays
openssh
];
diff --git a/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/pkgs/applications/science/chemistry/quantum-espresso/default.nix
index c7b1f9010468..6d70e9f984f6 100644
--- a/pkgs/applications/science/chemistry/quantum-espresso/default.nix
+++ b/pkgs/applications/science/chemistry/quantum-espresso/default.nix
@@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl
, gfortran, fftw, blas, lapack
-, mpi ? null
+, useMpi ? false
+, mpi
}:
stdenv.mkDerivation rec {
@@ -21,9 +22,9 @@ stdenv.mkDerivation rec {
'';
buildInputs = [ fftw blas lapack gfortran ]
- ++ (lib.optionals (mpi != null) [ mpi ]);
+ ++ (lib.optionals useMpi [ mpi ]);
-configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
+configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
makeFlags = [ "all" ];
diff --git a/pkgs/applications/science/chemistry/siesta/default.nix b/pkgs/applications/science/chemistry/siesta/default.nix
index 0df953f71067..02ff4c1ca440 100644
--- a/pkgs/applications/science/chemistry/siesta/default.nix
+++ b/pkgs/applications/science/chemistry/siesta/default.nix
@@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl
-, gfortran, blas, lapack
-, mpi ? null, scalapack
+, gfortran, blas, lapack, scalapack
+, useMpi ? false
+, mpi
}:
stdenv.mkDerivation {
@@ -17,7 +18,7 @@ stdenv.mkDerivation {
};
buildInputs = [ blas lapack gfortran ]
- ++ (lib.optionals (mpi != null) [ mpi scalapack ]);
+ ++ lib.optionals useMpi [ mpi scalapack ];
enableParallelBuilding = true;
@@ -29,7 +30,7 @@ stdenv.mkDerivation {
cp gfortran.make arch.make
'';
- preBuild = if (mpi != null) then ''
+ preBuild = if useMpi then ''
makeFlagsArray=(
CC="mpicc" FC="mpifort"
FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="."
diff --git a/pkgs/applications/science/electronics/openems/default.nix b/pkgs/applications/science/electronics/openems/default.nix
index e1063f8e26cf..64afe3222c2d 100644
--- a/pkgs/applications/science/electronics/openems/default.nix
+++ b/pkgs/applications/science/electronics/openems/default.nix
@@ -11,16 +11,15 @@
, cmake
, octave
, gl2ps
+, mpi
, withQcsxcad ? true
, withMPI ? false
, withHyp2mat ? true
, qcsxcad ? null
-, openmpi ? null
, hyp2mat ? null
}:
assert withQcsxcad -> qcsxcad != null;
-assert withMPI -> openmpi != null;
assert withHyp2mat -> hyp2mat != null;
stdenv.mkDerivation {
@@ -50,7 +49,7 @@ stdenv.mkDerivation {
csxcad
(octave.override { inherit hdf5; }) ]
++ lib.optionals withQcsxcad [ qcsxcad ]
- ++ lib.optionals withMPI [ openmpi ]
+ ++ lib.optionals withMPI [ mpi ]
++ lib.optionals withHyp2mat [ hyp2mat ];
postFixup = ''
diff --git a/pkgs/applications/science/math/cntk/default.nix b/pkgs/applications/science/math/cntk/default.nix
index a348210179e2..e15e2a43d774 100644
--- a/pkgs/applications/science/math/cntk/default.nix
+++ b/pkgs/applications/science/math/cntk/default.nix
@@ -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"
diff --git a/pkgs/applications/science/math/getdp/default.nix b/pkgs/applications/science/math/getdp/default.nix
index 915c7e1147f1..39d9c866caef 100644
--- a/pkgs/applications/science/math/getdp/default.nix
+++ b/pkgs/applications/science/math/getdp/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, openmpi, petsc, python3 }:
+{ lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, mpi, petsc, python3 }:
stdenv.mkDerivation rec {
name = "getdp-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake gfortran ];
- buildInputs = [ blas lapack openmpi petsc python3 ];
+ buildInputs = [ blas lapack mpi petsc python3 ];
meta = with lib; {
description = "A General Environment for the Treatment of Discrete Problems";
diff --git a/pkgs/applications/science/math/scotch/default.nix b/pkgs/applications/science/math/scotch/default.nix
index 6f8753ff38ac..b6613f25cbc7 100644
--- a/pkgs/applications/science/math/scotch/default.nix
+++ b/pkgs/applications/science/math/scotch/default.nix
@@ -1,11 +1,11 @@
-{ lib, stdenv, fetchurl, bison, openmpi, flex, zlib}:
+{ lib, stdenv, fetchurl, bison, mpi, flex, zlib}:
stdenv.mkDerivation rec {
version = "6.0.4";
pname = "scotch";
src_name = "scotch_${version}";
- buildInputs = [ bison openmpi flex zlib ];
+ buildInputs = [ bison mpi flex zlib ];
src = fetchurl {
url = "https://gforge.inria.fr/frs/download.php/file/34618/${src_name}.tar.gz";
diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
index c40faddbbf94..bdec2ccc669f 100644
--- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
+++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
@@ -3,10 +3,10 @@
, cmake
, hwloc
, fftw
-, openmpi
, perl
, singlePrec ? true
, mpiEnabled ? false
+, mpi
, cpuAcceleration ? null
}:
@@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ fftw perl hwloc ]
- ++ (lib.optionals mpiEnabled [ openmpi ]);
+ ++ (lib.optionals mpiEnabled [ mpi ]);
cmakeFlags = [
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix
index 123afef03e86..51ce64115ea5 100644
--- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix
+++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix
@@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub
, libpng, gzip, fftw, blas, lapack
-, mpi ? null
+, withMPI ? false
+, mpi
}:
let packages = [
"asphere" "body" "class2" "colloid" "compress" "coreshell"
@@ -8,7 +9,6 @@ let packages = [
"opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc"
];
lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64";
- withMPI = (mpi != null);
in
stdenv.mkDerivation rec {
# LAMMPS has weird versioning converted to ISO 8601 format
diff --git a/pkgs/applications/science/physics/elmerfem/default.nix b/pkgs/applications/science/physics/elmerfem/default.nix
index 6fa25ce66aeb..5033b28bd3b3 100644
--- a/pkgs/applications/science/physics/elmerfem/default.nix
+++ b/pkgs/applications/science/physics/elmerfem/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, openmpi, blas, liblapack, qt4, qwt6_qt4, pkg-config }:
+{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, qt4, qwt6_qt4, pkg-config }:
stdenv.mkDerivation rec {
pname = "elmerfem";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
nativeBuildInputs = [ cmake pkg-config git ];
- buildInputs = [ gfortran openmpi blas liblapack qt4 qwt6_qt4 ];
+ buildInputs = [ gfortran mpi blas liblapack qt4 qwt6_qt4 ];
preConfigure = ''
patchShebangs ./