-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile_debug
47 lines (38 loc) · 1.53 KB
/
Makefile_debug
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
#
# Makefile used for debugging
# ______________________________________________________________________________
FC=mpif90
# Debug options:
# 1 - Current deposition
# 2 -
# 9 - simple_io
FARGS= -g -fopenmp -D DEBUG=1 -fcheck=bound
#-ftree-vectorize -ffast-math -ftree-vectorizer-verbose=2 -fopt-info
SRCDIR= src
BINDIR = fortran_bin
APPNAME=picsar_debug
$(SRCDIR)/%.o:$(SRCDIR)/%.F90
$(FC) $(FARGS) -c -o $@ $<
all: clean build
test: test1 test2 test3
build:$(SRCDIR)/modules.o $(SRCDIR)/maxwell.o $(SRCDIR)/tiling.o $(SRCDIR)/sorting.o $(SRCDIR)/particles_push_2d.o $(SRCDIR)/particles_push.o $(SRCDIR)/current_deposition_2d.o $(SRCDIR)/current_deposition.o $(SRCDIR)/field_gathering_2d.o $(SRCDIR)/field_gathering.o $(SRCDIR)/mpi_derived_types.o $(SRCDIR)/boundary.o $(SRCDIR)/diags.o $(SRCDIR)/simple_io.o $(SRCDIR)/mpi_routines.o $(SRCDIR)/submain.o $(SRCDIR)/control_file.o $(SRCDIR)/main.o
$(FC) $(FARGS) -o $(APPNAME) $(SRCDIR)/*.o
mkdir -p $(BINDIR)
mv $(APPNAME) $(BINDIR)
clean:
rm -rf $(SRCDIR)/*.o *.mod $(BINDIR) 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
# Previous version
#mkdir -p RESULTS
#cp $(BINDIR)/$(APPNAME) RESULTS
#cp example_decks_fortran/test.pixr RESULTS/input_file.pixr
#cd RESULTS && \
#mpirun -np 8 ./picsar -ntilex 10 -ntiley 10 -ntilez 10 -distr 1