xref: /petsc/src/benchmarks/makefile (revision 5d61a7535b1d2e82d2ac32df98b155f0a42c43e3)
1#PETSC_DIR = ../..
2ALL:
3
4CFLAGS	      =	 $(CPPFLAGS) -D__SDIR__='"$(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 PetscVecNorm.c \
23		PetscGetCPUTime.c
24EXAMPLESF     =
25TESTS         = PetscTime PetscGetTime MPI_Wtime PLogEvent PetscMalloc \
26		PetscMemcpy PetscMemzero PetscMemcmp Index PetscVecNorm \
27		PetscGetCPUTime
28
29PetscTime: PetscTime.o  chkopts
30	-$(CLINKER) -o PetscTime PetscTime.o $(PETSC_LIB)
31	$(RM) -f PetscTime.o
32
33PetscGetTime: PetscGetTime.o  chkopts
34	-$(CLINKER) -o PetscGetTime PetscGetTime.o $(PETSC_LIB)
35	$(RM) -f PetscGetTime.o
36
37PetscGetCPUTime: PetscGetCPUTime.o  chkopts
38	-$(CLINKER) -o PetscGetCPUTime PetscGetCPUTime.o $(PETSC_LIB)
39	$(RM) -f PetscGetCPUTime.o
40
41MPI_Wtime: MPI_Wtime.o  chkopts
42	-$(CLINKER) -o MPI_Wtime MPI_Wtime.o $(PETSC_LIB)
43	$(RM) -f MPI_Wtime.o
44
45PLogEvent: PLogEvent.o  chkopts
46	-$(CLINKER) -o PLogEvent PLogEvent.o $(PETSC_LIB)
47	$(RM) -f PLogEvent.o
48
49PetscMalloc: PetscMalloc.o  chkopts
50	-$(CLINKER) -o PetscMalloc PetscMalloc.o $(PETSC_LIB)
51	$(RM) -f PetscMalloc.o
52
53PetscMemcpy: PetscMemcpy.o  chkopts
54	-$(CLINKER) -o PetscMemcpy PetscMemcpy.o $(PETSC_LIB)
55	$(RM) -f PetscMemcpy.o
56
57PetscMemzero: PetscMemzero.o  chkopts
58	-$(CLINKER) -o PetscMemzero PetscMemzero.o $(PETSC_LIB)
59	$(RM) -f PetscMemzero.o
60
61PetscMemcmp: PetscMemcmp.o  chkopts
62	-$(CLINKER) -o PetscMemcmp PetscMemcmp.o $(PETSC_LIB)
63	$(RM) -f PetscMemcmp.o
64
65Index: Index.o  chkopts
66	-$(CLINKER) -o Index Index.o $(PETSC_LIB)
67	$(RM) -f Index.o
68
69PetscVecNorm: PetscVecNorm.o  chkopts
70	-$(CLINKER) -o PetscVecNorm PetscVecNorm.o $(PETSC_LIB)
71	$(RM) -f PetscVecNorm.o
72
73test: $(TESTS)
74
75runtest:
76	-@echo "Time Taken by some PETSc routines are as follows:"
77	-@echo "------------------------------------------------"
78	-@$(MPIRUN) -np 1 PetscTime       > /dev/null
79	-@$(MPIRUN) -np 1 PetscGetTime    > /dev/null
80	-@$(MPIRUN) -np 1 PetscGetCPUTime > /dev/null
81	-@$(MPIRUN) -np 1 MPI_Wtime       > /dev/null
82	-@echo " "
83	-@echo "PLogEventBegin and PLogEventEnd together with options"
84	-@echo "------------------------------------------------"
85	-@$(MPIRUN) -np 1 PLogEvent                    > /dev/null
86	-@$(MPIRUN) -np 1 PLogEvent -log               > /dev/null
87	-@$(MPIRUN) -np 1 PLogEvent -log_summary       > /dev/null
88	-@$(MPIRUN) -np 1 PLogEvent -log_all           > /dev/null
89	-@$(MPIRUN) -np 1 PLogEvent -log_mpe           > /dev/null
90	-@$(MPIRUN) -np 1 PLogEvent -log_mpe -log      > /dev/null
91	-@echo " "
92	-@echo "PetscMalloc and PetscFree together  with options"
93	-@echo "------------------------------------------------"
94	-@$(MPIRUN) -np 1 PetscMalloc            > /dev/null
95	-@$(MPIRUN) -np 1 PetscMalloc -trmalloc  > /dev/null
96	-@echo " "
97	-@echo "Memory Operations "
98	-@echo "------------------------------------------------"
99	-@$(MPIRUN) -np 1 PetscMemcpy  > /dev/null
100	-@$(MPIRUN) -np 1 PetscMemzero > /dev/null
101	-@$(MPIRUN) -np 1 PetscMemcmp  > /dev/null
102	-@echo " "
103	-@echo "Memory Operations "
104	-@echo "------------------------------------------------"
105	-@$(MPIRUN) -np 1 Index  > /dev/null
106
107include $(PETSC_DIR)/bmake/$(PETSC_ARCH)/base
108
109