Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magma: init at 2.0.2 #15654

Merged
merged 1 commit into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions pkgs/development/libraries/science/math/magma/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{ stdenv, fetchurl, cmake, gfortran, cudatoolkit, libpthreadstubs, liblapack }:

with stdenv.lib;

let version = "2.0.2";

in stdenv.mkDerivation {
name = "magma-${version}";
src = fetchurl {
url = "http://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-${version}.tar.gz";
sha256 = "0w3z6k1npfh0d3r8kpw873f1m7lny29sz2bvvfxzk596d4h083lk";
name = "magma-${version}.tar.gz";
};

buildInputs = [ gfortran cudatoolkit libpthreadstubs liblapack cmake ];

doCheck = false;
#checkTarget = "tests";

enableParallelBuilding=true;

# MAGMA's default CMake setup does not care about installation. So we copy files directly.
installPhase = ''
mkdir -p $out
mkdir -p $out/include
mkdir -p $out/lib
mkdir -p $out/lib/pkgconfig
cp -a ../include/*.h $out/include
#cp -a sparse-iter/include/*.h $out/include
cp -a lib/*.a $out/lib
cat ../lib/pkgconfig/magma.pc.in | \
sed -e s:@INSTALL_PREFIX@:"$out": | \
sed -e s:@CFLAGS@:"-I$out/include": | \
sed -e s:@LIBS@:"-L$out/lib -lmagma -lmagma_sparse": | \
sed -e s:@MAGMA_REQUIRED@:: \
> $out/lib/pkgconfig/magma.pc
'';

meta = with stdenv.lib; {
description = "Matrix Algebra on GPU and Multicore Architectures";
license = licenses.bsd3;
homepage = "http://icl.cs.utk.edu/magma/index.html";
platforms = platforms.unix;
maintainers = with maintainers; [ ianwookim ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15887,6 +15887,8 @@ in

openspecfun = callPackage ../development/libraries/science/math/openspecfun {};

magma = callPackage ../development/libraries/science/math/magma { };

mathematica = callPackage ../applications/science/math/mathematica { };
mathematica9 = callPackage ../applications/science/math/mathematica/9.nix { };

Expand Down