From cc6bfddcc4dcdcdbc235e8dfaeb4666839c3b8b9 Mon Sep 17 00:00:00 2001 From: Arne Vansteenkiste Date: Wed, 20 Nov 2013 16:35:48 +0100 Subject: [PATCH] package.source test runs all binaries --- bootstrap/main.go | 2 +- package.source | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/bootstrap/main.go b/bootstrap/main.go index f96e2a793..af1147b23 100644 --- a/bootstrap/main.go +++ b/bootstrap/main.go @@ -25,7 +25,7 @@ func main() { } } - cmds := []string{"mumax3-cuda5.5", "mumax3-cuda5.0", "mumax3-cuda4.2"} + cmds := []string{"mumax3-cuda5.5", "mumax3-cuda5.0", "mumax3-cuda4.2.9"} mumax := "" for _, cmd := range cmds { cmd := bin + "/" + cmd diff --git a/package.source b/package.source index 04bc8c65b..035550d54 100644 --- a/package.source +++ b/package.source @@ -9,16 +9,18 @@ version='3.3-BETA1' go build -o $tmp/mumax3/mumax3-convert 'github.com/mumax/3/tools/mumax3-convert' go build -o $tmp/mumax3/mumax3-plot 'github.com/mumax/3/tools/mumax3-plot' +go build -o $tmp/mumax3/mumax3 'github.com/mumax/3/bootstrap' -for c in 4.2 5.0 5.5; do +for c in 4.2.9 5.0 5.5; do sudo rm -f /usr/local/cuda echo ln -s /usr/local/cuda-$c /usr/local/cuda sudo ln -s /usr/local/cuda-$c /usr/local/cuda - lib=/usr/local/cuda-$c/lib64 - cp $lib/libcufft.so.$c $tmp/mumax3 - cp $lib/libcurand.so.$c $tmp/mumax3 + lib=/usr/local/cuda-$c/lib64 + cp $lib/libcufft.so.$c $tmp/mumax3 + cp $lib/libcurand.so.$c $tmp/mumax3 + cp $lib/libcudart.so.$c $tmp/mumax3 arch='cuda'$c out=$tmp/mumax3/mumax3-$arch @@ -26,11 +28,24 @@ for c in 4.2 5.0 5.5; do echo go build $src -o $out go build -v -o $out $src ldd $out + + (cd $tmp/mumax3 && + ./mumax3 -v -test + ) echo done +(cd $tmp/mumax3 && + mv libcufft.so.4.2.9 libcufft.so.4 + mv libcurand.so.4.2.9 libcurand.so.4 + mv libcudart.so.4.2.9 libcudart.so.4 + rm libcudart.so.5.5 +) + sudo rm -f /usr/local/cuda + + echo ln -s /usr/local/cuda-5.5 /usr/local/cuda sudo ln -s /usr/local/cuda-5.5 /usr/local/cuda