Skip to content

Commit 2d65d67

Browse files
committedJan 24, 2017
Creation of the repository
0 parents  commit 2d65d67

File tree

101 files changed

+15450
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+15450
-0
lines changed
 

‎.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<<<<<<< HEAD
2+
#ignore output files & executables
3+
*.o
4+
*.bin
5+
shot*
6+
*.swp
7+
*.intel64
8+
*.test
9+
ModelGenerator
10+
ScheduleGenerator
11+
12+
#ignore logfiles
13+
*.log
14+
valgrind.*
15+
*.nvprof
16+
17+
# OS X files
18+
._DS*
19+
.DS*
20+
21+
22+
#ignore output folders
23+
Trash
24+
*/Trash

‎0_version_openmp/Makefile

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# possible values <INTEL,GNU>
2+
COMPILER ?=INTEL
3+
# possible values <YES,NO>
4+
PERFORM_IO ?=NO
5+
# possible values <YES,NO>
6+
IO_STATS ?=NO
7+
# possible values <YES,NO>
8+
DEBUG ?=NO
9+
10+
# Add include directory
11+
CINCS =-I../common -I./
12+
13+
ifeq ($(COMPILER),INTEL)
14+
CC = icc
15+
# CFLAGS = -std=c99 -O2 -restrict -qopenmp #-qopt-report=2
16+
# -opt-streaming-cache-evict=0 -opt-streaming-stores always
17+
CFLAGS = -std=c99 -xHost -qopenmp -restrict -prec-div -fp-model precise -ftz -qopt-prefetch-distance=64
18+
# CFLAGS = -std=c99 -O2 -qopenmp -restrict
19+
CINCS +=
20+
CLIBS = -lm
21+
else
22+
CC = gcc
23+
CFLAGS = -std=c99 -O3 -march=native -fopenmp -Wall
24+
CINCS +=
25+
CLIBS = -lm
26+
endif
27+
28+
ifeq ($(PERFORM_IO),NO)
29+
DEFINES += -DDO_NOT_PERFORM_IO
30+
endif
31+
32+
ifeq ($(IO_STATS),NO)
33+
DEFINES +=
34+
CFLAGS += -Wno-unused-variable -Wno-unused-but-set-variable
35+
else
36+
DEFINES += -DLOG_IO_STATS
37+
CFLAGS +=
38+
endif
39+
40+
ifeq ($(DEBUG),YES)
41+
DEFINES += -DDEBUG
42+
CFLAGS += -g
43+
endif
44+
45+
TARGET=fwi.intel64 ModelGenerator
46+
47+
all:$(TARGET)
48+
49+
fwi.intel64:fwi_main.o fwi_common.o fwi_kernel.o fwi_propagator.o
50+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $+ -o $@ $(CLIBS)
51+
52+
ModelGenerator:fwi_generatemodel.o fwi_common.o fwi_kernel.o fwi_propagator.o
53+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $+ -o $@ $(CLIBS)
54+
55+
fwi_generatemodel.o:../common/fwi_generatemodel.c
56+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $^ -c -o $@
57+
58+
fwi_main.o:fwi_main.c
59+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $^ -c -o $@
60+
61+
fwi_common.o:../common/fwi_common.c
62+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $^ -c -o $@
63+
64+
fwi_kernel.o:../common/fwi_kernel.c
65+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $^ -c -o $@
66+
67+
fwi_propagator.o:fwi_propagator.c
68+
$(CC) $(DEFINES) $(CFLAGS) $(CINCS) $^ -c -o $@
69+
70+
71+
.PHONY:all clean run debug memcheck input printvars
72+
73+
clean:
74+
rm -rf *.o *.optrpt *.log $(TARGET) *.log *.csv ../Results/*
75+
76+
input: ModelGenerator
77+
./ModelGenerator ../SetupParams/fwi_params.txt ../SetupParams/fwi_frequencies.txt
78+
79+
run: fwi.intel64
80+
./fwi.intel64 ../SetupParams/fwi_params.txt ../SetupParams/fwi_frequencies.txt
81+
82+
debug: fwi.intel64
83+
gdb --args fwi.intel64 ../SetupParams/fwi_params.txt ../SetupParams/fwi_frequencies.txt
84+
85+
memcheck: fwi.intel64
86+
valgrind --leak-check=full ./fwi.intel64 ../SetupParams/fwi_params.txt ../SetupParams/fwi_frequencies.txt > valgrind.log 2>&1
87+

0 commit comments

Comments
 (0)
Please sign in to comment.