Merge pull request #49199 from markuskowa/fet-scalapack

scalapack: switch to openblas and add test
This commit is contained in:
markuskowa 2018-11-05 21:12:01 +01:00 committed by GitHub
commit bf8c031074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,7 @@
{ stdenv
, fetchurl
, gfortran
, cmake
, blas
, liblapack
, mpi
}:
{ stdenv, fetchurl, cmake, openssh
, gfortran, mpi, openblasCompat
} :
stdenv.mkDerivation rec {
name = "scalapack-${version}";
@ -16,12 +12,38 @@ stdenv.mkDerivation rec {
sha256 = "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c";
};
buildInputs = [ cmake mpi liblapack blas gfortran ];
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"
)
'';
checkPhase = ''
# 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
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib
export CTEST_OUTPUT_ON_FAILURE=1
make test
'';
meta = with stdenv.lib; {
homepage = http://www.netlib.org/scalapack/;
description = "Library of high-performance linear algebra routines for parallel distributed memory machines";
license = licenses.bsdOriginal;
license = licenses.bsd3;
platforms = platforms.all;
maintainers = [ maintainers.costrouc ];
};