mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 15:23:26 +03:00
scalapack: switch to openblas + add test
* change from blas,lapack to openblas * add check phase * enable parallel building * fix license
This commit is contained in:
parent
145627391b
commit
41a579aa68
@ -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 ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user