-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (59 loc) · 1.76 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
default: run
clean:
rm -f output-*.tar
clobber:
$(MAKE) clean
rm -f *~ *.pyc
rm -rf __pycache__
run:
mpirun-mpich-mp -n 25 ./run.py
serial:
for cnt in $$(seq 1 10); do \
stepdir=$$(printf "step_%05d" $$cnt) ; \
echo $$stepdir && mkdir -p $$stepdir && cd $$stepdir; \
../write_rand_data.py && cd - >/dev/null 2>&1; \
done
list:
for file in out*.tar; do \
echo $$file ":" ; \
tar tvf $$file ; \
done
extract:
for file in out*.tar; do \
echo $$file ":" ; \
tar xvf $$file ; \
done
output.tar: $(wildcard output-?????.tar)
echo "Combining $?"
echo " into $@"
rm -f output.tar
mv output-00001.tar tmp-out.tar
for file in output-?????.tar; do \
echo $$file ; \
tar --concatenate --file=tmp-out.tar $$file ; \
rm -f $$file ; \
done
mv tmp-out.tar output.tar
summary:
for file in out*.tar; do \
tar xf $$file --wildcards "*/summary.txt" --to-command=cat; \
done
byte_summary:
for file in out*.tar; do \
tar xf $$file --wildcards "*/summary.txt" --to-command="cat | grep \"bytes\""; \
done
testtree: Makefile
rm -rf testtree testdir.tmp
for a in $$(seq 1 16); do \
dirname=$$(printf "testdir.tmp/%02d/" $$a) ; \
echo $$dirname && mkdir -p $$dirname && echo $$dirname > $$dirname/out1.txt && date > $$dirname/out1.txt ; \
for b in $$(seq 1 16); do \
dirname=$$(printf "testdir.tmp/%02d/%02d/" $$a $$b) ; \
echo $$dirname && mkdir -p $$dirname && echo $$dirname > $$dirname/out2.txt && date > $$dirname/out2.txt ; \
for c in $$(seq 1 16); do \
dirname=$$(printf "testdir.tmp/%02d/%02d/%02d/" $$a $$b $$c) ; \
echo $$dirname && mkdir -p $$dirname && echo $$dirname > $$dirname/out3.txt && date >> $$dirname/out3.txt ; \
done ; \
done ; \
done
mv testdir.tmp testtree && find testtree -type f