xref: /petsc/src/benchmarks/makefile (revision fff3f5fae336d1caaec33911beb15ba4efbb662b)
1-include ../../petscdir.mk
2
3ALL:
4
5MANSEC    = Sys
6
7include ${PETSC_DIR}/lib/petsc/conf/variables
8include ${PETSC_DIR}/lib/petsc/conf/rules
9include ${PETSC_DIR}/lib/petsc/conf/test
10
11PetscTime: PetscTime.o
12	-${CLINKER} -o PetscTime PetscTime.o ${PETSC_LIB}
13	${RM} -f PetscTime.o
14
15PetscGetTime: PetscGetTime.o
16	-${CLINKER} -o PetscGetTime PetscGetTime.o ${PETSC_LIB}
17	${RM} -f PetscGetTime.o
18
19PetscGetCPUTime: PetscGetCPUTime.o
20	-${CLINKER} -o PetscGetCPUTime PetscGetCPUTime.o ${PETSC_LIB}
21	${RM} -f PetscGetCPUTime.o
22
23MPI_Wtime: MPI_Wtime.o
24	-${CLINKER} -o MPI_Wtime MPI_Wtime.o ${PETSC_LIB}
25	${RM} -f MPI_Wtime.o
26
27PLogEvent: PLogEvent.o
28	-${CLINKER} -o PLogEvent PLogEvent.o ${PETSC_LIB}
29	${RM} -f PLogEvent.o
30
31PetscMalloc: PetscMalloc.o
32	-${CLINKER} -o PetscMalloc PetscMalloc.o ${PETSC_LIB}
33	${RM} -f PetscMalloc.o
34
35PetscMemcpy: PetscMemcpy.o
36	-${CLINKER} -o PetscMemcpy PetscMemcpy.o ${PETSC_LIB}
37	${RM} -f PetscMemcpy.o
38
39PetscMemzero: PetscMemzero.o
40	-${CLINKER} -o PetscMemzero PetscMemzero.o ${PETSC_LIB}
41	${RM} -f PetscMemzero.o
42
43PetscMemcmp: PetscMemcmp.o
44	-${CLINKER} -o PetscMemcmp PetscMemcmp.o ${PETSC_LIB}
45	${RM} -f PetscMemcmp.o
46
47Index: Index.o
48	-${CLINKER} -o Index Index.o ${PETSC_LIB}
49	${RM} -f Index.o
50
51PetscVecNorm: PetscVecNorm.o
52	-${CLINKER} -o PetscVecNorm PetscVecNorm.o ${PETSC_LIB}
53	${RM} -f PetscVecNorm.o
54
55sizeof: sizeof.o
56	-${CLINKER} -o sizeof sizeof.o ${PETSC_LIB}
57	${RM} -f sizeof.o
58
59test: ${TESTS}
60
61runtest:
62	-@echo "Time Taken by some PETSc routines are as follows:"
63	-@echo "------------------------------------------------"
64	-@${MPIEXEC} -n 1 ./PetscTime
65	-@${MPIEXEC} -n 1 ./PetscGetTime
66	-@${MPIEXEC} -n 1 ./PetscGetCPUTime
67	-@${MPIEXEC} -n 1 ./MPI_Wtime
68	-@echo " "
69	-@echo "PLogEventBegin and PLogEventEnd together with options"
70	-@echo "------------------------------------------------"
71	-@${MPIEXEC} -n 1 ./PLogEvent              > /dev/null
72	-@${MPIEXEC} -n 1 ./PLogEvent -log_view > /dev/null
73	-@${MPIEXEC} -n 1 ./PLogEvent -log_mpe     > /dev/null
74	-@echo " "
75	-@echo "PetscMalloc and PetscFree together  with options"
76	-@echo "------------------------------------------------"
77	-@${MPIEXEC} -n 1 ./PetscMalloc
78	-@${MPIEXEC} -n 1 ./PetscMalloc -malloc
79	-@echo " "
80	-@echo "Memory Operations "
81	-@echo "------------------------------------------------"
82	-@${MPIEXEC} -n 1 ./PetscMemcpy
83	-@${MPIEXEC} -n 1 ./PetscMemzero
84	-@${MPIEXEC} -n 1 ./PetscMemcmp
85	-@echo " "
86	-@echo "Memory Operations "
87	-@echo "------------------------------------------------"
88	-@${MPIEXEC} -n 1 ./Index
89	-@echo " "
90	-@echo "Datatype Sizes "
91	-@echo "------------------------------------------------"
92	-@${MPIEXEC} -n 1 ./sizeof
93	-@echo "------------------------------------------------"
94