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