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