2019-11-20 21:44:33 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, openssh
|
2018-10-26 23:06:07 +00:00
|
|
|
, gfortran, mpi, openblasCompat
|
|
|
|
} :
|
|
|
|
|
2018-09-13 19:27:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "scalapack";
|
2020-02-17 23:29:02 +00:00
|
|
|
version = "2.1.0";
|
2018-09-13 19:27:47 +00:00
|
|
|
|
2019-11-20 21:44:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Reference-ScaLAPACK";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-02-17 23:29:02 +00:00
|
|
|
sha256 = "1c10d18gj3kvpmyv5q246x35hjxaqn4ygy1cygaydhyxnm4klzdj";
|
2018-09-13 19:27:47 +00:00
|
|
|
};
|
|
|
|
|
2018-10-26 23:06:07 +00:00
|
|
|
nativeBuildInputs = [ cmake openssh ];
|
|
|
|
buildInputs = [ mpi gfortran openblasCompat ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlagsArray+=(
|
|
|
|
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
|
|
|
|
-DLAPACK_LIBRARIES="-lopenblas"
|
|
|
|
-DBLAS_LIBRARIES="-lopenblas"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2019-05-27 18:08:32 +00:00
|
|
|
# Increase individual test timeout from 1500s to 10000s because hydra's builds
|
|
|
|
# sometimes fail due to this
|
|
|
|
checkFlagsArray = [ "ARGS=--timeout 10000" ];
|
|
|
|
|
2018-11-19 22:16:16 +00:00
|
|
|
preCheck = ''
|
2018-10-26 23:06:07 +00:00
|
|
|
# make sure the test starts even if we have less than 4 cores
|
|
|
|
export OMPI_MCA_rmaps_base_oversubscribe=1
|
|
|
|
|
|
|
|
# Run single threaded
|
|
|
|
export OMP_NUM_THREADS=1
|
|
|
|
|
2020-01-02 00:29:34 +00:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib
|
2018-10-26 23:06:07 +00:00
|
|
|
'';
|
2018-09-13 19:27:47 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.netlib.org/scalapack/";
|
2018-09-13 19:27:47 +00:00
|
|
|
description = "Library of high-performance linear algebra routines for parallel distributed memory machines";
|
2018-10-26 23:06:07 +00:00
|
|
|
license = licenses.bsd3;
|
2019-02-06 12:12:39 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ costrouc markuskowa ];
|
2018-09-13 19:27:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|