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