-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile_profiling
111 lines (95 loc) · 4.16 KB
/
Makefile_profiling
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Makefile for profiling:
# - SDE
# - Vtune
# - Allinea Map
#
# PROFILING:
# - 0: No profiling
# - 1: Analysis of the kernel without the initialization
# - 2: Analysis of the current deposition
# - 3: Analysis of the field gathering
# ______________________________________________________________________________
# Preparation
# Following parameters can be tuned for your system
# C compiler
CC=icc
# Fortran compiler
FC=mpiifort
# Fortran arguments
FARGS= -D DFP=1 -D SDE=1 -D VTUNE=1 -O3 -align array64byte -g -Bdynamic -qopenmp -xMIC-AVX512 -debug inline-debug-info
#-opt-streaming-stores always -DSTREAM_ARRAY_SIZE=64000000 -align array64byte -xMIC-AVX512
# C arguments
CARGS= -D DFP=1 -D SDE=1 -D VTUNE=1 -O3 -g -Bdynamic -qopenmp -xMIC-AVX512 -I $(VTUNE_AMPLIFIER_XE_2016_DIR)/include -debug inline-debug-info
# Path to Vtune for Vtune start and stop functions
LDFLAGS=$(VTUNE_AMPLIFIER_XE_2016_DIR)/lib64/libittnotify.a
# Source directory
SRCDIR= src
# Binary directory
BINDIR=fortran_bin
# Application name
APPNAME=picsar_knl_ai
# ______________________________________________________________________________
# Compilation
$(SRCDIR)/%.o:$(SRCDIR)/%.c
$(CC) $(CARGS) -c -o $@ $<
$(SRCDIR)/%.o:$(SRCDIR)/%.F90
$(FC) $(FARGS) -c -o $@ $<
all: clean build
test: test1 test2 test3
build:$(SRCDIR)/modules/modules.o \
$(SRCDIR)/profiling/api_fortran_itt.o \
$(SRCDIR)/profiling/itt_fortran.o \
$(SRCDIR)/profiling/api_fortran_sde.o \
$(SRCDIR)/profiling/sde_fortran.o \
$(SRCDIR)/field_solvers/Maxwell/yee_solver/yee.o \
$(SRCDIR)/field_solvers/Maxwell/karkkainen_solver/karkkainen.o \
$(SRCDIR)/field_solvers/Maxwell/maxwell_solver_manager.o \
$(SRCDIR)/parallelization/tiling/tiling.o \
$(SRCDIR)/housekeeping/sorting.o \
$(SRCDIR)/particle_pushers/vay_pusher/vay_3d.o \
$(SRCDIR)/particle_pushers/boris_pusher/boris_3d.o \
$(SRCDIR)/particle_pushers/boris_pusher/boris_2d.o \
$(SRCDIR)/particle_pushers/particle_pusher_manager_2d.o \
$(SRCDIR)/particle_pushers/particle_pusher_manager_3d.o \
$(SRCDIR)/particle_deposition/current_deposition/current_deposition_manager_2d.o \
$(SRCDIR)/particle_deposition/current_deposition/current_deposition_manager_3d.o \
$(SRCDIR)/particle_deposition/current_deposition/direct/direct_current_deposition_2d.o \
$(SRCDIR)/particle_deposition/current_deposition/direct/direct_current_deposition_3d.o \
$(SRCDIR)/particle_deposition/current_deposition/esirkepov/esirkepov_2d.o \
$(SRCDIR)/particle_deposition/current_deposition/esirkepov/esirkepov_3d.o \
$(SRCDIR)/field_gathering/field_gathering_manager_2d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_on_2d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o1_2d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o2_2d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o3_2d.o \
$(SRCDIR)/field_gathering/field_gathering_manager_3d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_on_3d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o1_3d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o2_3d.o \
$(SRCDIR)/field_gathering/energy_conserving/field_gathering_o3_3d.o \
$(SRCDIR)/parallelization/mpi/mpi_derived_types.o \
$(SRCDIR)/boundary_conditions/field_boundaries.o \
$(SRCDIR)/boundary_conditions/particle_boundaries.o \
$(SRCDIR)/particle_deposition/charge_deposition/charge_deposition_manager.o \
$(SRCDIR)/particle_deposition/charge_deposition/charge_deposition_2d.o \
$(SRCDIR)/particle_deposition/charge_deposition/charge_deposition_3d.o \
$(SRCDIR)/diags/diags.o \
$(SRCDIR)/ios/simple_io.o \
$(SRCDIR)/parallelization/mpi/mpi_routines.o \
$(SRCDIR)/submain.o \
$(SRCDIR)/initilization/control_file.o \
$(SRCDIR)/main.o
$(FC) $(FARGS) -o $(APPNAME) $(SRCDIR)/*.o $(LDFLAGS)
mkdir -p $(BINDIR)
mv $(APPNAME) $(BINDIR)
clean:
rm -rf $(SRCDIR)/*.o *.mod $(BINDIR)/$(APPNAME) RESULTS
test1:
cd Acceptance_testing/Fortran_tests/test_plasma_drift && \
py.test -s --ttest=1 --trun=1
test2:
cd Acceptance_testing/Fortran_tests/test_homogeneous_plasma && \
py.test -s --ttest=1 --trun=1
test3:
cd Acceptance_testing/Fortran_tests/test_Langmuir_wave && \
py.test -s --ttest=1 --trun=1