xref: /petsc/src/benchmarks/streams/makefile (revision fbfcfee5110779e3d6a9465ca0a2e0f9a1a6e5e3)
1
2ALL:
3
4CFLAGS	      =
5FFLAGS	      =
6CPPFLAGS      =
7FPPFLAGS      =
8LOCDIR        = src/benchmarks/streams/
9EXAMPLESC     = BasicVersion.c MPIVersion.c OpenMPVersion.c SSEVersion.c PthreadVersion.c
10EXAMPLESF     =
11TESTS         = BasicVersion OpenMPVersion
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
18BasicVersion: BasicVersion.o  chkopts
19	-@${CLINKER} -o BasicVersion BasicVersion.o ${PETSC_LIB}
20	@${RM} -f BasicVersion.o
21
22MPIVersion: MPIVersion.o  chkopts
23	-@${CLINKER} -o MPIVersion MPIVersion.o ${PETSC_LIB}
24	@${RM} -f MPIVersion.o
25
26OpenMPVersion: OpenMPVersion.o  chkopts
27	-@${CLINKER} -o OpenMPVersion OpenMPVersion.o ${PETSC_LIB}
28	@${RM} -f OpenMPVersion.o
29
30SSEVersion: SSEVersion.o chkopts
31	-${CLINKER} -o $@ $< ${PETSC_LIB}
32	${RM} -f $<
33
34PthreadVersion: PthreadVersion.o  chkopts
35	-@${CLINKER} -o PthreadVersion PthreadVersion.o ${PETSC_LIB}
36	@${RM} -f PthreadVersion.o
37
38# make streams [NPMAX=integer_number_of_MPI_processes_to_use] [MPI_BINDING='binding options']
39stream:  MPIVersion
40	-@printf "" > scaling.log
41	-@echo "Running streams with '${MPIEXEC} ${MPI_BINDING}' using 'NPMAX=${NPMAX}' "
42	-@i=0; while [ $${i} -lt ${NPMAX} ]; do i=`expr $${i} + 1`; \
43	  ${MPIEXEC} ${MPI_BINDING} -n $${i} ./MPIVersion | tee -a scaling.log; \
44        done
45	-@echo "------------------------------------------------"
46	-@${PYTHON} process.py createfile
47
48hwloc:
49	-@if [ "${LSTOPO}foo" != "foo" ]; then ${MPIEXEC} ${MPI_BINDING} -n 1 ${LSTOPO} --no-icaches --no-io --ignore PU ; fi
50
51streams: stream hwloc
52	-@${PYTHON} process.py
53
54
55