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