-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.source
43 lines (28 loc) · 832 Bytes
/
package.source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# source this file to bash to build for different cuda versions
tmp='tmp/'
mkdir $tmp
rm -rf $tmp/*
src='github.com/mumax/3/mumax3'
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'
out=$tmp/mumax3/mumax3
for c in 4.2 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
echo rm -f $out
rm -f $out
echo go build $src -o $out
go build -v -o $out $src
ldd $out
arch=$name'_linux_cuda'$c
(cd $tmp &&
tar c mumax3 | gzip > mumax$version$arch.tar.gz
)
echo
done
rm -rf $tmp/mumax3
sudo rm -f /usr/local/cuda
echo ln -s /usr/local/cuda-5.0 /usr/local/cuda
sudo ln -s /usr/local/cuda-5.0 /usr/local/cuda