-
Notifications
You must be signed in to change notification settings - Fork 16
Docker image experiments for Spatter
Jeffrey Young edited this page Oct 23, 2019
·
5 revisions
While you don't need a container to run Spatter, it could be useful in certain situations since it encapsulates your build environment.
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get -y install git cmake g++
#Clone the latest tagged commit of the Spatter repo into the container with no history
RUN git clone --depth 1 https://github.com/hpcgarage/spatter.git
#Checkout the latest version
RUN cd spatter && git checkout tags/v0.4 -b v0.4
RUN cd spatter && ./configure/configure_omp_gnu
run cd spatter/build_omp_gnu && make -j4
#Run the Dockerfile to build a Spatter image
docker build - <spatter-dockerfile -tspatter/v0.4
#Save your local image to a tarball
docker save spatter/v0.4 > spatter_docker_user.tar
#Copy the tarball to another machine, untar and feed to docker load
cat spatter_docker.tar | docker load
a090697502b8: Loading layer [==================================================>] 65.57MB/65.57MB
97e6b67a30f1: Loading layer [==================================================>] 991.2kB/991.2kB
100ef12ce3a4: Loading layer [==================================================>] 15.87kB/15.87kB
19331eff40f0: Loading layer [==================================================>] 3.072kB/3.072kB
2982f83240bc: Loading layer [==================================================>] 27.38MB/27.38MB
b308374e9591: Loading layer [==================================================>] 307.3MB/307.3MB
da172660e5f4: Loading layer [==================================================>] 76.27MB/76.27MB
4d63024071d9: Loading layer [==================================================>] 62.46kB/62.46kB
11324f44d780: Loading layer [==================================================>] 310.8kB/310.8kB
220ccf0cd28d: Loading layer [==================================================>] 217.6kB/217.6kB
Loaded image: spatter/v0.4:latest
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
spatter/v0.4 latest 6b82381966be 13 minutes ago 469MB
We could also make it automatically run a script once it loads
$ docker run --rm -it spatter/v0.4
root@e4bd9e983419:/# cd spatter/build_omp_gnu/ && ./spatter -pFILE=../json/amg.json
Running Spatter version 0.4
Compiler: GNU ver. 7.4.0
Compiler Location: /usr/bin/gcc
Backend: OPENMP
Aggregate Results? YES
Run Configurations
[ {'name':'amg', 'kernel':'Gather', 'pattern':[1333,0,1,2,36,37,38,72,73,74,1296,1297,1298,1332,1334,1368], 'delta':587, 'length':1539898, 'agg':10, 'wrap':1, 'threads':40} ]
config time(s) bw(MB/s)
0 0.01571 12547.9
Min 25% Med 75% Max
12547.9 12547.9 12547.9 12547.9 12547.9
H.Mean H.StdErr
12547.9 0