-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.source
More file actions
33 lines (21 loc) · 796 Bytes
/
package.source
File metadata and controls
33 lines (21 loc) · 796 Bytes
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
# source this file to bash to build for different cuda versions
#set -v
out='cmd/mumax3-bootstrap/'
go build -o $out/mumax3-convert 'github.com/mumax/3/cmd/mumax3-convert'
go build -o $out/mumax3 'github.com/mumax/3/cmd/mumax3-bootstrap'
for c in 5.0 5.5 6.0; do
sudo rm -f /usr/local/cuda
sudo ln -s /usr/local/cuda-$c /usr/local/cuda
lib=/usr/local/cuda-$c/lib64
cp $lib/libcufft.so.$c $out
cp $lib/libcurand.so.$c $out
cp $lib/libcudart.so.$c $out
arch='cuda'$c
go build -v -o $out/mumax3-$arch 'github.com/mumax/3/cmd/mumax3'
ldd $out/mumax3-$arch
sudo rm -f /usr/local/cuda
echo
done
rm $out/libcudart.so.5.5 $out/libcudart.so.6.0 # cuda5.0 requires libcudart, others not
sudo rm -f /usr/local/cuda
#sudo ln -s /usr/local/cuda-5.5 /usr/local/cuda