Skip to content

Commit

Permalink
I added my Project 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Krebrov001 committed Nov 29, 2019
1 parent 0e040c3 commit 77dc934
Show file tree
Hide file tree
Showing 126 changed files with 37,300 additions and 0 deletions.
22 changes: 22 additions & 0 deletions konstantin-assignment4/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
VERSIONS := \
rows \
cols

.PHONY: build
build:
@for d in $(VERSIONS); do \
$(MAKE) -s -C $$d build; \
done;

.PHONY: run
run:
@for d in $(VERSIONS); do \
$(MAKE) -s -C $$d run; \
done;

.PHONY: clean
clean:
@for d in $(VERSIONS); do \
$(MAKE) -s -C $$d clean; \
done;

11 changes: 11 additions & 0 deletions konstantin-assignment4/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
I setup my code so that the Makefiles automates the building and testing of the code. cd into the programming directory and here you will find the master Makefile and two directories rows and cols. The master Makefile completely automates the process and recursively calls the other two Makefiles in the rows and cols directories. Then type

make build

To build the mpi executables. Then please type

make run

to run the mpi executables. This might take a very long time, as the individual input files are run multiple times to obtain reliable timing information. If you're curious, make run generates a whole bunch of output and timing files while running the mpi programs.
Please DO NOT run make clean, or make any modifications to the files other than running those two above make commands from the programming directory!

28 changes: 28 additions & 0 deletions konstantin-assignment4/cols/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PROGRAM=game_of_life_mpi_cols

.PHONY: build
build: $(PROGRAM)
echo "building $(PROGRAM)"

$(PROGRAM): $(PROGRAM).c
mpicc -g -Wall -o $(PROGRAM) $(PROGRAM).c

.PHONY: run
run:
@for num in `seq 1 60`; do \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
mpirun -n 8 --hostfile ../../hostfile ./$(PROGRAM) input$$num; \
done;

.PHONY: clean
clean:
rm output* timing*

613 changes: 613 additions & 0 deletions konstantin-assignment4/cols/game_of_life_mpi_cols.c

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions konstantin-assignment4/cols/input1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
8 16 1
00000000
00000000
00000000
00010000
00001000
00111000
00000000
00000000
25 changes: 25 additions & 0 deletions konstantin-assignment4/cols/input10
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
24 21 3
000000010100101100011101
001001001001011101111010
011001111011100000011100
011110101000111110000001
100010011010000010001110
100001111101100001010111
111101111011101011101000
111100011001100000110010
110111100000001100010010
011110111100011011011000
001001010101110100111010
101101101000101111100110
011111011101111011011100
010010111000101001110010
101011001100111001010000
111000010100000110100000
011011001101100010001010
011011010011110000101000
000100001110010111011011
111011011111110001000010
001100011010100111000000
100010010100100101101110
010000011110111101101110
100001100110010101111001
25 changes: 25 additions & 0 deletions konstantin-assignment4/cols/input11
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
24 9 9
000101110001011000110010
001111010000011010101000
011011011110111110111111
101001001000100001010101
111100011101000100011011
110110001110011101010000
100001111100110000001010
101101010010100010001110
110010010100100101100101
010101110010001011000010
010001100100011110110010
100100001001100110101011
100100110010011111011001
001000110110101100001111
000000110011000011010100
001110000001110111011110
011000100000000110001010
101010011001010010010001
001101111010001101100101
111111100010110011001011
101010101000010010011010
000100110010010110011011
000101001001011110101111
010100000000001101110001
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input12
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 35 7
01100110101111010100011101000000
01000100001111000000111001010010
10001101111001010011111001101001
01100111001000100110010001101110
00001111011011010110010101101001
00011101011101101001010001011011
01000011010001110110010111001100
00011101001100000100101010011010
11100111100110110111011111000101
01110000001101000010100000000110
00110110100010000001001010011111
11010100000100110001001100011001
11010010010101001010011010100011
10010001100110010111001101001110
10100111111111010101100010000001
01101010101011000010010100100110
11001001001011000100000001011010
10000010010000001010010001111110
11010010100100000100001010001100
11111110101101110110001111000011
10001000000011101101110000111000
01101101101101110101100111001101
01111000011000100101000111100110
11101101000101101111100011010011
10101011010010101011011100000101
11101001000101101010101100101111
10101101000011001100001000110001
10101111110000110110100101100111
11110000100111011110110111010100
01111110011111000101000110000000
11100000011101100111000101101111
00111011110001010000000011111001
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input13
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 9 9
01111000010100000111100101000000
11110110111111010111110100111110
11110111001011110001010010101110
00101000010101000110010110011111
11111110011000001101110010101111
00010110011011101110010100111001
10011011100001010111010010000011
10000001001011110000011111011110
11111100110000100010100010101011
00011110000101101010010110000110
10001101100110010111000100101110
11000010001001100010001001100001
11111010010001111010010101101110
00000101001110001101010001001101
10100110101011101111000110100101
01101000101010001100101100101101
11100001011111010010001000110111
00100110100010100000010011010101
11101100100100100101011101110100
11000000101100011001110011111110
01010011000100011000100001010111
11011101100110000000010000110001
10001000001111111011100101000011
01011010001111101000001110110111
01001001011000010011010011110001
11101101011110010001101000101010
10101110011111011100110100010111
00111011100001010001001001100010
10001100001011111111001010111000
10001001111001000110111010100101
11111000101011010101011010010111
00010100110000101110000100101001
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input14
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 6 1
10011001010001100101010001100011
01010000111000011100000011111001
01101101011101010011011100111111
00101110101111001011100011101011
00101000011000010101101001011100
10010011111111010001000010100001
00000011100010110111111011111111
01101100100111011100001010101011
00011001000100110110100000000110
01011000001010110111100000000110
11101001000101000000000000001100
00110110110000010010010111100011
00001101001111010100001111101011
01101111000110011001110000010101
11101011000100101110000101000111
00110100100111100100101110101111
11100101000110111100111110101001
11110100011110101101010011011001
11000100000101100110010101011001
11100100101010011101000011111001
11110110000100111101101110010001
11010110110111000011100010110111
01111010010100001100000110011110
10100000000010101101100001000101
11111001000101110111010000011000
10110100100111111011111010100100
11111100000111101010110011011010
10000010011100010111001111101011
11111011100110010010000101011100
00110000101010110010111101000100
10110111011111011110101100101010
00100100011101000101101100010110
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input15
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 14 14
01111111001000100100100100000101
01000110001000001001010010000110
01011111101110100011101000001111
11001010000101011100111011001100
10000101100000110101011000011010
11010100110111110110000001001100
11010011111100001111011001001100
00101110001100111001000010001101
10101111100000100010011101010010
00011111011010000000110110110011
00001111100000010110011110100011
01101010010001100100000001011100
01011111101111110010010000101100
00111100101011111011001001000001
01000101101010101011001110100111
01110101101000011101000101100011
00000001010100010100111101111101
10010011110110011110011001110111
11101010110010011111010001001110
00010111010000111010110100111101
10000010110111110011111100111111
11111001000101001110100111000111
10101111100111110111110001100001
11000111111100011101111100001000
10011101010100011000100100010011
01010001000000100000001001001111
11110100000001011111100000011010
10011011110110001101001001111001
00000011111001111101111110001011
00110101010011000011000100111111
10011100000110111001000111000111
00011111101100011101100001000000
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input16
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 24 1
00101101100110110101111100010000
01110100011110111100011100000010
10111111001110001011000000000101
11111001111011000100000010110111
10000111001000001001100001100001
00111100100100111110110001000000
11100000001011100000100110011000
11001101111001011011010010100100
11000001110000101011111001100101
00000000100001011110000011101111
01001001001011000100111100111011
01011001111001100110001100010110
01011000001010101000011011111001
10110110101100100100010101010011
00011011000101100100001001000110
10100110111000001101110110111110
11010011111010011100000101010011
10010001101000111011011111011010
01101010011010100011000100010100
11001011101000011101000000110111
10100001011101010000000000101110
11111100011001101111111011010011
10001000110100111001001111011000
00100101100101100110101010110110
10010001100101101000011010110001
10111100001001011010100111011000
11101101011001101000101010100111
10100110100111101100100001101000
01001100101011010010000011101100
00011110110100001101110101100000
00001101010010101101000111111110
11011001100101110101100001110111
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input17
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 32 2
00100100010101100001001111011101
11000001100101000000111001110010
11001011010010111110010000010111
01111001010111000100010110011101
00110100001011011111000100001011
00010110110101010010011001011010
01100010111001101001010000100001
01101001011010101101101100111101
01100010100001111100111101010001
01101001001000011010000010101111
00100110100110001111011110101011
00101001110011000110000001010010
00101110010000010010010111011111
00110010010011111101000111000000
01100010110100011011111001111110
01001101110110101010100001110011
10111000100001011110000011100111
10000011011101011011001110111010
11110010101100010100111111011110
10010111110110010011100111010111
01000000101010110000011001100000
00100101101000100001111100110110
00101101111101001010001000110110
10010001011001011011000111010110
01100110000110010001000100001101
11110111110110000011110111100001
11000110011011001110011101111100
11010111001011010110011100010011
10001010000010111011100100001010
00010110110011100001001111101101
11110010000110010011000111110001
11010010001101101010011111011110
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input18
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 34 1
10111000000011000000001010101110
11001010110001011011010111000101
00001100000110000100000110101010
01010011010010011000001001011111
11111000000100101101111101011010
10110010010111100101010110000100
11101000101010111101000111110110
10000001110011000000100011101100
10000111010000000011111001010011
00111101001100110001100010111101
10001111110010110110110011100001
00111101011110011111011011011011
10001011100001000111101011100011
11100101100010001110100110110101
00001000000000011101100001010001
00110101101111100111111011110100
00001011000111010100100011110000
00110000110000011010010000100110
10110001100100010101001000100001
00100101100101000011101110010000
01100111100111111100100000110011
10101110101011100011010011111101
10111010010101001111010111000110
10101001101111110100001101000101
01110101111100001000111111111011
10010011000000101100111010100010
11111001010111100101011101101000
10110001100011100110110101110001
01001110111100101010111101101101
00101101010111111011110001010001
11100111110001100111011010110101
01011100100110111011001100011101
33 changes: 33 additions & 0 deletions konstantin-assignment4/cols/input19
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
32 35 5
00001100100100000001011011000100
10100101101011010000001111100101
01101010000100001101110011010110
00010001000011000111011100101011
01111100100011010100000001111001
11010010110001000011011000110000
11101000101011001110000010110011
10100110000110100000111010110101
10001101101000001110000101010000
00001010000011100000001011101000
00000100010101101101110001011010
01001001110101100111011010000101
10101010110101101111000100011000
11001100000001010101000000101100
11000011111100011001100111101000
10010101000100011010011101111110
10101010001001111011111000110111
10100100110100110010100101000101
01000011011010000100101110001011
11000110000000011010000100100111
01100101111011111011010110111011
00001011101110000110101000011101
10111100111111111110110110001011
11000001100010101000111111111100
00000111101000110110001010101111
11110101110111010111101010001100
11110111010100001010000101010011
10101011100101101101111001101100
11011000011000011101011000011001
10000000111101010100010101011001
10111000110100111110101111000111
11001010110011110011000111010101
Loading

0 comments on commit 77dc934

Please sign in to comment.