xref: /petsc/src/benchmarks/makefile (revision a91f3ead952e4901dc6bb3f6125eb3ed6fbc984d)
1# $Id: makefile,v 1.26 2000/08/17 04:53:35 bsmith Exp bsmith $
2
3ALL:
4
5CFLAGS	      =
6FFLAGS	      =
7CPPFLAGS      =
8FPPFLAGS      =
9LOCDIR        = src/benchmarks/
10EXAMPLESC     = PetscTime.c PetscGetTime.c MPI_Wtime.c PLogEvent.c PetscMalloc.c \
11		PetscMemcpy.c PetscMemzero.c PetscMemcmp.c Index.c PetscVecNorm.c \
12		PetscGetCPUTime.c
13EXAMPLESF     =
14TESTS         = PetscTime PetscGetTime MPI_Wtime PLogEvent PetscMalloc \
15		PetscMemcpy PetscMemzero PetscMemcmp Index PetscVecNorm \
16		PetscGetCPUTime
17
18include ${PETSC_DIR}/bmake/${PETSC_ARCH}/base
19include ${PETSC_DIR}/bmake/common_test
20
21PetscTime: PetscTime.o  chkopts
22	-${CLINKER} -o PetscTime PetscTime.o ${PETSC_LIB}
23	${RM} -f PetscTime.o
24
25PetscGetTime: PetscGetTime.o  chkopts
26	-${CLINKER} -o PetscGetTime PetscGetTime.o ${PETSC_LIB}
27	${RM} -f PetscGetTime.o
28
29PetscGetCPUTime: PetscGetCPUTime.o  chkopts
30	-${CLINKER} -o PetscGetCPUTime PetscGetCPUTime.o ${PETSC_LIB}
31	${RM} -f PetscGetCPUTime.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
61PetscVecNorm: PetscVecNorm.o  chkopts
62	-${CLINKER} -o PetscVecNorm PetscVecNorm.o ${PETSC_LIB}
63	${RM} -f PetscVecNorm.o
64
65sizeof: sizeof.o  chkopts
66	-${CLINKER} -o sizeof sizeof.o ${PETSC_LIB}
67	${RM} -f sizeof.o
68
69test: ${TESTS}
70
71runtest:
72	-@echo "Time Taken by some PETSc routines are as follows:"
73	-@echo "------------------------------------------------"
74	-@${MPIRUN} -np 1 PetscTime       > /dev/null
75	-@${MPIRUN} -np 1 PetscGetTime    > /dev/null
76	-@${MPIRUN} -np 1 PetscGetCPUTime > /dev/null
77	-@${MPIRUN} -np 1 MPI_Wtime       > /dev/null
78	-@echo " "
79	-@echo "PLogEventBegin and PLogEventEnd together with options"
80	-@echo "------------------------------------------------"
81	-@${MPIRUN} -np 1 PLogEvent                    > /dev/null
82	-@${MPIRUN} -np 1 PLogEvent -log_summary       > /dev/null
83	-@${MPIRUN} -np 1 PLogEvent -log_mpe           > /dev/null
84	-@echo " "
85	-@echo "PetscMalloc and PetscFree together  with options"
86	-@echo "------------------------------------------------"
87	-@${MPIRUN} -np 1 PetscMalloc            > /dev/null
88	-@${MPIRUN} -np 1 PetscMalloc -trmalloc  > /dev/null
89	-@echo " "
90	-@echo "Memory Operations "
91	-@echo "------------------------------------------------"
92	-@${MPIRUN} -np 1 PetscMemcpy  > /dev/null
93	-@${MPIRUN} -np 1 PetscMemzero > /dev/null
94	-@${MPIRUN} -np 1 PetscMemcmp  > /dev/null
95	-@echo " "
96	-@echo "Memory Operations "
97	-@echo "------------------------------------------------"
98	-@${MPIRUN} -np 1 Index  > /dev/null
99
100
101