sheet3
This commit is contained in:
parent
56614805cf
commit
2195a9db0a
51 changed files with 13038 additions and 0 deletions
44
sheet3/1/Makefile
Normal file
44
sheet3/1/Makefile
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O3
|
||||
DIMENSIONS = -DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20
|
||||
|
||||
FF = gfortran
|
||||
FFLAGS = -O3
|
||||
|
||||
all: stream_f.exe stream_c.exe flops.exe
|
||||
|
||||
stream_f.exe: stream.f mysecond.o
|
||||
$(CC) $(CFLAGS) -c mysecond.c
|
||||
$(FF) $(FFLAGS) $(DIMENSIONS) -c stream.f
|
||||
$(FF) $(FFLAGS) stream.o mysecond.o -o stream_f.exe
|
||||
|
||||
stream_c.exe: stream.c
|
||||
$(CC) $(CFLAGS) $(DIMENSIONS) stream.c -o stream_c.exe
|
||||
|
||||
clean:
|
||||
rm -f *.exe *.o
|
||||
|
||||
# an example of a more complex build line for the Intel icc compiler
|
||||
stream.icc: stream.c
|
||||
icc -O3 -xCORE-AVX2 -ffreestanding -qopenmp -DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20 stream.c -o stream.omp.AVX2.80M.20x.icc
|
||||
|
||||
# GH
|
||||
flops.exe:
|
||||
$(CC) $(CFLAGS) -DUNIX flops.c -o flops.exe
|
||||
|
||||
run: clean all
|
||||
./stream_c.exe
|
||||
./flops.exe
|
||||
|
||||
MY_DIR = `basename ${PWD}`
|
||||
tar: clean
|
||||
@cd .. ;\
|
||||
tar cf ${MY_DIR}.tar ${MY_DIR} *default.mk ;\
|
||||
cd ${MY_DIR}
|
||||
|
||||
|
||||
zip: clean
|
||||
@cd .. ;\
|
||||
zip -r ${MY_DIR}.zip ${MY_DIR} *default.mk;\
|
||||
cd ${MY_DIR}
|
||||
# HG
|
||||
Loading…
Add table
Add a link
Reference in a new issue