xref: /petsc/src/benchmarks/makefile (revision 19bcc07ff2e1ed103f891a90425af0415610a77d)
1PETSC_DIR = ../..
2ALL:
3
4CFLAGS	      =	 $(PETSC_INCLUDE) $(COPT) $(PCONF)
5FFLAGS	      =
6SOURCEC	      =
7SOURCEF	      =
8SOURCEH	      =
9OBJSC	      =
10OBJSF	      =
11LIBBASE	      = libpetscsys
12EXAMPLES_1    =
13RUNEXAMPLES_1 =
14EXAMPLES_2    =
15RUNEXAMPLES_2 =
16EXAMPLES_3    =
17RUNEXAMPLES_3 =
18EXAMPLES_4    =
19RUNEXAMPLES_4 =
20EXAMPLESC     =
21EXAMPLESF     =
22TESTS         = PetscTime PetscGetTime MPI_Wtime PLogEvent PetscMalloc \
23		PetscMemcpy PetscMemzero PetscMemcmp Index
24
25PetscTime: PetscTime.o  chkopts
26	-$(CLINKER) -o PetscTime PetscTime.o $(PETSC_LIB)
27	$(RM) -f PetscTime.o
28
29PetscGetTime: PetscGetTime.o  chkopts
30	-$(CLINKER) -o PetscGetTime PetscGetTime.o $(PETSC_LIB)
31	$(RM) -f PetscGetTime.o
32
33MPI_Wtime: MPI_Wtime.o  chkopts
34	-$(CLINKER) -o MPI_Wtime MPI_Wtime.o $(PETSC_LIB)
35	$(RM) -f MPI_Wtime.o
36
37PLogEvent: PLogEvent.o  chkopts
38	-$(CLINKER) -o PLogEvent PLogEvent.o $(PETSC_LIB)
39	$(RM) -f PLogEvent.o
40
41PetscMalloc: PetscMalloc.o  chkopts
42	-$(CLINKER) -o PetscMalloc PetscMalloc.o $(PETSC_LIB)
43	$(RM) -f PetscMalloc.o
44
45PetscMemcpy: PetscMemcpy.o  chkopts
46	-$(CLINKER) -o PetscMemcpy PetscMemcpy.o $(PETSC_LIB)
47	$(RM) -f PetscMemcpy.o
48
49PetscMemzero: PetscMemzero.o  chkopts
50	-$(CLINKER) -o PetscMemzero PetscMemzero.o $(PETSC_LIB)
51	$(RM) -f PetscMemzero.o
52
53PetscMemcmp: PetscMemcmp.o  chkopts
54	-$(CLINKER) -o PetscMemcmp PetscMemcmp.o $(PETSC_LIB)
55	$(RM) -f PetscMemcmp.o
56
57Index: Index.o  chkopts
58	-$(CLINKER) -o Index Index.o $(PETSC_LIB)
59	$(RM) -f Index.o
60
61
62test: $(TESTS)
63
64runtest:
65	-@echo "Time Taken by some PETSc routines are as follows:"
66	-@echo "------------------------------------------------"
67	-@$(MPIRUN) PetscTime    > /dev/null
68	-@$(MPIRUN) PetscGetTime > /dev/null
69	-@$(MPIRUN) MPI_Wtime    > /dev/null
70	-@echo " "
71	-@echo "PLogEventBegin and PLogEventEnd together with options"
72	-@echo "------------------------------------------------"
73	-@$(MPIRUN) PLogEvent                    > /dev/null
74	-@$(MPIRUN) PLogEvent -log               > /dev/null
75	-@$(MPIRUN) PLogEvent -log_summary       > /dev/null
76	-@$(MPIRUN) PLogEvent -log_all           > /dev/null
77	-@$(MPIRUN) PLogEvent -log_mpe           > /dev/null
78	-@$(MPIRUN) PLogEvent -log_mpe -log      > /dev/null
79	-@echo " "
80	-@echo "PetscMalloc and PetscFree together  with options"
81	-@echo "------------------------------------------------"
82	-@$(MPIRUN) PetscMalloc            > /dev/null
83	-@$(MPIRUN) PetscMalloc -trmalloc  > /dev/null
84	-@echo " "
85	-@echo "Memory Operations "
86	-@echo "------------------------------------------------"
87	-@$(MPIRUN) PetscMemcpy  > /dev/null
88	-@$(MPIRUN) PetscMemzero > /dev/null
89	-@$(MPIRUN) PetscMemcmp  > /dev/null
90	-@echo " "
91	-@echo "Memory Operations "
92	-@echo "------------------------------------------------"
93	-@$(MPIRUN) Index  > /dev/null
94
95include $(PETSC_DIR)/bmake/$(PETSC_ARCH)/$(PETSC_ARCH)
96
97