source: benchmark/Makefile.am @ 07ec1a2

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 07ec1a2 was 107b01a, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Several changes to the makefiles

  • change .c tests to .cfa
  • add require for libtool in configure
  • libtoolize to fix some warnings
  • Property mode set to 100644
File size: 9.8 KB
RevLine 
[ac93b228]1######################## -*- Mode: Makefile-Automake -*- ######################
2##
3## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
4##
5## The contents of this file are covered under the licence agreement in the
6## file "LICENCE" distributed with Cforall.
7##
8## Makefile.am --
9##
10## Author           : Peter A. Buhr
11## Created On       : Sun May 31 09:08:15 2015
12## Last Modified By : Peter A. Buhr
[dc8511c]13## Last Modified On : Tue Nov  6 09:01:23 2018
14## Update Count     : 26
[ac93b228]15###############################################################################
16
[0c1b566]17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
[107b01a]18ACLOCAL_AMFLAGS  = -I automake
[0c1b566]19
[ac93b228]20# applies to both programs
[7a7ab42]21include $(top_srcdir)/src/cfa.make
22
[43fa66e]23UPPCC = u++
[7a7ab42]24
25AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread
26AM_CFAFLAGS = -quiet -in-tree -nodebug
27AM_UPPFLAGS = -quiet -nodebug -multi
28
[b7170a64]29TOOLSDIR = ${abs_top_srcdir}/tools/
30REPEAT   = ${TOOLSDIR}repeat
31STATS    = ${TOOLSDIR}stat.py
32repeats  = 30
[05f4b85]33skipcompile = no
[a5b7905]34TIME_FORMAT = "%E"
[2086ab2]35PRINT_FORMAT = %20s: #Comments needed for spacing
[034165a]36
[43fa66e]37#prevent any tests in parallel
[034165a]38.NOTPARALLEL:
[ac93b228]39
[43fa66e]40#make sure automake includes the compile rules for C and C++
41EXTRA_PROGRAMS = dummy
42dummy_SOURCES = c.c cxx.cpp
[ac93b228]43
[43fa66e]44## =========================================================================================================
[4cedd9f]45all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
46
[a5b7905]47%.run : %$(EXEEXT) ${REPEAT}
48        @rm -f .result.log
49        @echo "------------------------------------------------------"
50        @echo $<
51        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
52        @${STATS} .result.log
53        @echo "------------------------------------------------------"
[88e139e]54        @rm -f a.out .result.log *.class
[ac93b228]55
[a5b7905]56%.runquiet :
[52df81c]57        @+make $(basename $@) CFLAGS="-w"
[05f4b85]58        @taskset -c 1 ./a.out
[a5b7905]59        @rm -f a.out
60
61%.make :
62        @printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
63        @+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
64
65${REPEAT} :
66        @+make -C ${TOOLSDIR} repeat
67
68## =========================================================================================================
69
70jenkins$(EXEEXT):
71        @echo "{"
72        @echo -e '\t"githash": "'${githash}'",'
73        @echo -e '\t"arch": "'   ${arch}   '",'
[05f4b85]74@DOifskipcompile@
[91496f3]75        @echo -e '\t"compile": {'
76        @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
77        @echo -e '\t\t"dummy" : {}'
78        @echo -e '\t},'
[05f4b85]79@DOendif@
[a5b7905]80        @echo -e '\t"ctxswitch": {'
81        @echo -en '\t\t"coroutine":'
82        @+make ctxswitch-cfa_coroutine.runquiet
83        @echo -en '\t\t,"thread":'
84        @+make ctxswitch-cfa_thread.runquiet
85        @echo -e '\t},'
86        @echo -e '\t"mutex": ['
87        @echo -en '\t\t'
88        @+make mutex-cfa1.runquiet
89        @echo -en '\t\t,'
90        @+make mutex-cfa2.runquiet
91        @echo -e '\t],'
92        @echo -e '\t"scheduling": ['
93        @echo -en '\t\t'
94        @+make signal-cfa1.runquiet
95        @echo -en '\t\t,'
96        @+make signal-cfa2.runquiet
97        @echo -en '\t\t,'
98        @+make waitfor-cfa1.runquiet
99        @echo -en '\t\t,'
100        @+make waitfor-cfa2.runquiet
101        @echo -e '\n\t],'
102        @echo -e '\t"epoch": ' $(shell date +%s)
103        @echo "}"
[ac93b228]104
[d885a58]105## =========================================================================================================
106loop$(EXEEXT):
[43fa66e]107        $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
[d885a58]108
109function$(EXEEXT):
[43fa66e]110        $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c
[d885a58]111
112fetch_add$(EXEEXT):
[43fa66e]113        $(AM_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
[d885a58]114
[034165a]115## =========================================================================================================
[41cca44]116CTXSWITCH_DEPEND  =                 \
[d885a58]117        loop.run                                \
118        function.run                    \
119        fetch_add.run                   \
[b7170a64]120        ctxswitch-pthread.run           \
121        ctxswitch-cfa_coroutine.run     \
122        ctxswitch-cfa_thread.run        \
[6810fcb]123        ctxswitch-cfa_thread2.run       \
[b7170a64]124        ctxswitch-upp_coroutine.run     \
[50abab9]125        ctxswitch-upp_thread.run        \
126        ctxswitch-goroutine.run         \
127        ctxswitch-java_thread.run
[034165a]128
[41cca44]129if WITH_LIBFIBRE
130CTXSWITCH_DEPEND  +=           \
131        ctxswitch-kos_fibre.run  \
132        ctxswitch-kos_fibre2.run
133
134
135ctxswitch-kos_fibre$(EXEEXT):
[43fa66e]136        $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
[41cca44]137
138ctxswitch-kos_fibre2$(EXEEXT):
[43fa66e]139        $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
[41cca44]140endif
141
142ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
143
[6810fcb]144ctxswitch-pthread$(EXEEXT):
[43fa66e]145        $(AM_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
[6810fcb]146
[034165a]147ctxswitch-cfa_coroutine$(EXEEXT):
[43fa66e]148        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.c
[034165a]149
150ctxswitch-cfa_thread$(EXEEXT):
[43fa66e]151        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.c
[6810fcb]152
153ctxswitch-cfa_thread2$(EXEEXT):
[43fa66e]154        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.c
[034165a]155
156ctxswitch-upp_coroutine$(EXEEXT):
[43fa66e]157        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
[034165a]158
159ctxswitch-upp_thread$(EXEEXT):
[43fa66e]160        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
[ac93b228]161
[50abab9]162ctxswitch-goroutine$(EXEEXT):
[43fa66e]163        $(AM_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
[50abab9]164
165ctxswitch-java_thread$(EXEEXT):
[88e139e]166        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
[50abab9]167        @echo "#!/bin/sh" > a.out
[88e139e]168        @echo "java JavaThread" >> a.out
[50abab9]169        @chmod a+x a.out
170
[f54a0ab]171## =========================================================================================================
172mutex$(EXEEXT) :\
[d885a58]173        loop.run                        \
174        function.run            \
175        fetch_add.run           \
[f54a0ab]176        mutex-pthread_lock.run  \
177        mutex-upp.run           \
178        mutex-cfa1.run          \
179        mutex-cfa2.run          \
[6aa537a4]180        mutex-cfa4.run          \
181        mutex-java_thread.run
[f54a0ab]182
183mutex-pthread_lock$(EXEEXT):
[43fa66e]184        $(AM_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
[f54a0ab]185
186mutex-upp$(EXEEXT):
[43fa66e]187        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
[f54a0ab]188
189mutex-cfa1$(EXEEXT):
[43fa66e]190        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.c
[f54a0ab]191
192mutex-cfa2$(EXEEXT):
[43fa66e]193        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.c
[f54a0ab]194
195mutex-cfa4$(EXEEXT):
[43fa66e]196        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.c
[034165a]197
[6aa537a4]198mutex-java_thread$(EXEEXT):
[88e139e]199        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
[6aa537a4]200        @echo "#!/bin/sh" > a.out
[88e139e]201        @echo "java JavaThread" >> a.out
[6aa537a4]202        @chmod a+x a.out
203
[9f0b975]204## =========================================================================================================
205signal$(EXEEXT) :\
[3eb4541]206        signal-pthread_cond.run \
[9f0b975]207        signal-upp.run          \
208        signal-cfa1.run         \
209        signal-cfa2.run         \
[56de6b39]210        signal-cfa4.run         \
211        signal-java_thread.run
[9f0b975]212
[3eb4541]213signal-pthread_cond$(EXEEXT):
[43fa66e]214        $(AM_V_CC)$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
[3eb4541]215
[9f0b975]216signal-upp$(EXEEXT):
[43fa66e]217        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
[9f0b975]218
219signal-cfa1$(EXEEXT):
[43fa66e]220        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.c
[9f0b975]221
222signal-cfa2$(EXEEXT):
[43fa66e]223        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.c
[9f0b975]224
225signal-cfa4$(EXEEXT):
[43fa66e]226        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.c
[9f0b975]227
[6aa537a4]228signal-java_thread$(EXEEXT):
[88e139e]229        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
[6aa537a4]230        @echo "#!/bin/sh" > a.out
[88e139e]231        @echo "java JavaThread" >> a.out
[6aa537a4]232        @chmod a+x a.out
233
234
[9f0b975]235## =========================================================================================================
236waitfor$(EXEEXT) :\
237        waitfor-upp.run         \
238        waitfor-cfa1.run                \
239        waitfor-cfa2.run                \
240        waitfor-cfa4.run
241
242waitfor-upp$(EXEEXT):
[43fa66e]243        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
[9f0b975]244
245waitfor-cfa1$(EXEEXT):
[43fa66e]246        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.c
[9f0b975]247
248waitfor-cfa2$(EXEEXT):
[43fa66e]249        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.c
[9f0b975]250
251waitfor-cfa4$(EXEEXT):
[43fa66e]252        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.c
[9f0b975]253
[4cedd9f]254## =========================================================================================================
255creation$(EXEEXT) :\
[3351cc0]256        creation-pthread.run                    \
257        creation-cfa_coroutine.run              \
258        creation-cfa_coroutine_eager.run        \
259        creation-cfa_thread.run                 \
260        creation-upp_coroutine.run              \
[50abab9]261        creation-upp_thread.run                 \
262        creation-goroutine.run                  \
263        creation-java_thread.run
[4cedd9f]264
265creation-cfa_coroutine$(EXEEXT):
[43fa66e]266        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.c
[4cedd9f]267
[3351cc0]268creation-cfa_coroutine_eager$(EXEEXT):
[43fa66e]269        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.c
[3351cc0]270
[4cedd9f]271creation-cfa_thread$(EXEEXT):
[43fa66e]272        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.c
[4cedd9f]273
274creation-upp_coroutine$(EXEEXT):
[43fa66e]275        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
[4cedd9f]276
277creation-upp_thread$(EXEEXT):
[43fa66e]278        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
[4cedd9f]279
280creation-pthread$(EXEEXT):
[43fa66e]281        $(AM_V_CC)$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
[4cedd9f]282
[50abab9]283creation-goroutine$(EXEEXT):
[43fa66e]284        $(AM_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
[50abab9]285
286creation-java_thread$(EXEEXT):
[88e139e]287        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
[50abab9]288        @echo "#!/bin/sh" > a.out
[88e139e]289        @echo "java JavaThread" >> a.out
[50abab9]290        @chmod a+x a.out
291
[034165a]292## =========================================================================================================
293
[3edc2df]294compile$(EXEEXT) :\
[a5b7905]295        compile-array.make      \
296        compile-attributes.make \
297        compile-empty.make      \
298        compile-expression.make \
299        compile-io.make         \
300        compile-monitor.make    \
301        compile-operators.make  \
302        compile-typeof.make
[3edc2df]303
304
[524ed86]305testdir = $(top_srcdir)/tests
[d3db83c]306
[3edc2df]307compile-array$(EXEEXT):
[43fa66e]308        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.c
[3edc2df]309
310compile-attributes$(EXEEXT):
[515a037]311        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa
[3edc2df]312
313compile-empty$(EXEEXT):
[43fa66e]314        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.c
[3edc2df]315
316compile-expression$(EXEEXT):
[43fa66e]317        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.c
[3edc2df]318
319compile-io$(EXEEXT):
[43fa66e]320        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.c
[3edc2df]321
322compile-monitor$(EXEEXT):
[43fa66e]323        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.c
[3edc2df]324
325compile-operators$(EXEEXT):
[43fa66e]326        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.c
[3edc2df]327
328compile-thread$(EXEEXT):
[43fa66e]329        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.c
[3edc2df]330
331compile-typeof$(EXEEXT):
[43fa66e]332        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.c
[3edc2df]333
Note: See TracBrowser for help on using the repository browser.