Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CFLAGS= -g -O3
- DEPS =
- OBJOMP = bucketomp.o
- OBJPT = bucketpt.o
- LIBOMP = -fopenmp
- LIBPT = -ggdb -pthread
- ini: run1 run2 clean
- bucketomp.o: bucketomp.c $(DEPS)
- $(CC) $(CFLAGS) -c -o $@ $< $(LIBOMP)
- bucketpt.o: bucketpt.c $(DEPS)
- $(CC) $(CFLAGS) -c -o $@ $< $(LIBPT)
- bucketomp: $(OBJOMP)
- gcc $(CFLAGS) -o $@ $^ $(LIBOMP)
- bucketpt: $(OBJPT)
- gcc $(CFLAGS) -o $@ $^ $(LIBPT)
- run1: bucketomp
- echo Utilizando OpenMP: > resultado.txt
- echo 1 Thread: >> resultado.txt
- ./bucketomp 1000 1 >> resultado.txt
- ./bucketomp 10000 1 >> resultado.txt
- ./bucketomp 20000 1 >> resultado.txt
- echo 2 Threads: >> resultado.txt
- ./bucketomp 1000 2 >> resultado.txt
- ./bucketomp 10000 2 >> resultado.txt
- ./bucketomp 20000 2 >> resultado.txt
- echo 4 Threads: >> resultado.txt
- ./bucketomp 1000 4 >> resultado.txt
- ./bucketomp 10000 4 >> resultado.txt
- ./bucketomp 20000 4 >> resultado.txt
- echo 8 Threads: >> resultado.txt
- ./bucketomp 1000 8 >> resultado.txt
- ./bucketomp 10000 8 >> resultado.txt
- ./bucketomp 20000 8 >> resultado.txt
- echo --------------------------------- >> resultado.txt
- run2: bucketpt
- echo Utilizando PThread: >> resultado.txt
- echo 1 Thread: >> resultado.txt
- ./bucketpt 1000 1 >> resultado.txt
- ./bucketpt 10000 1 >> resultado.txt
- ./bucketpt 20000 1 >> resultado.txt
- echo 2 Threads: >> resultado.txt
- ./bucketpt 1000 2 >> resultado.txt
- ./bucketpt 10000 2 >> resultado.txt
- ./bucketpt 20000 2 >> resultado.txt
- echo 4 Threads: >> resultado.txt
- ./bucketpt 1000 4 >> resultado.txt
- ./bucketpt 10000 4 >> resultado.txt
- ./bucketpt 20000 4 >> resultado.txt
- echo 8 Threads: >> resultado.txt
- ./bucketpt 1000 8 >> resultado.txt
- ./bucketpt 10000 8 >> resultado.txt
- ./bucketpt 20000 8 >> resultado.txt
- clean:
- rm *.o
- rm bucketomp
- rm bucketpt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement