# Generated automatically from Makefile.in by configure. # $Source: runtime/gasnet/tests/Makefile.in $ # $Date: Sat, 23 Jul 2005 12:19:17 -0700 $ # $Revision: 1.22.1.16 $ # Description: Makefile for GASNet tests # Generated automatically from Makefile.in by configure. # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt all: @echo This Makefile is not intended to be called directly @echo do a "make tests-seq" or "make tests-par" within the conduit directory # linker to be used for MPI programs GASNET_MPI_LD = /usr/mill/pkg/mpich-gm/bin/mpicc srcdir="/project/cs/yelick/c/home/grad/bonachea/Ti/bsrs-yang/runtime/gasnet/tests" configfile=/dev/null # must be overridden by caller include $(configfile) Makefile: /project/cs/yelick/c/home/grad/bonachea/Ti/bsrs-yang/runtime/gasnet/tests/Makefile.in cd /project/cs/yelick/c/home/grad/bonachea/Ti/bsrs-yang/runtime/gasnet ; \ CONFIG_HEADERS= CONFIG_FILES=tests/Makefile ./config.status # GASNet-related MPI tests MPI_TESTS_SEQ = MPI_TESTS_PAR = testmpi # non-GASNet plain MPI tests MPI1_TESTS = \ testmpiperf \ testmpinbr \ testosumpi_bw \ testosumpi_bw2 \ testosumpi_lat \ testosumpi_bcast_lat MPI2_TESTS = \ testosumpi2_put_lat \ testosumpi2_put_bw \ testosumpi2_put_bw2 \ testosumpi2_get_lat \ testosumpi2_get_bw \ testosumpi2_acc_lat MPI_TESTS = $(MPI1_TESTS) $(MPI2_TESTS) # tests that can be built in any mode # in order of most useful execution # NOTE: if you add a test here that is expected to pass on all conduits, # please also add it to upcr/upc-tests/gasnet-tests/harness.conf testprograms_seq = \ testgasnet \ testenv \ testsmall \ testlarge \ testam \ testcore1 \ testbarrier \ testlogGP \ testvis \ testmisc \ testalign \ testrand \ testexit \ testhsl \ testbarrierconf \ testbarrierlate \ testtools \ testcoll \ testnbr \ testqueue \ $(CONDUIT_TESTS) \ $(MPI_TESTS_SEQ) # tests that should only be built in PARSYNC and PAR modes testprograms_parsync = \ # tests that should only be built in PAR mode testprograms_par = \ testthreads \ testcontend \ $(MPI_TESTS_PAR) testprograms = $(testprograms_seq) $(testprograms_parsync) $(testprograms_par) $(MPI_TESTS) tests-seq: clean $(testprograms_seq) tests-parsync: clean $(testprograms_seq) $(testprograms_parsync) tests-par: clean $(testprograms_seq) $(testprograms_parsync) $(testprograms_par) tests-mpi: $(MPI1_TESTS) tests-mpi2: $(MPI2_TESTS) clean: rm -f $(testprograms:=) $(TESTEXIT_SCRIPT) distclean: rm -f Makefile #GASNET_SEGMENT_STR="FAST" #GASNET_SEGMENT_STR="LARGE" GASNET_SEGMENT_STR="EVERYTHING" # GASNET_DEBUG_STR="debug" GASNET_DEBUG_STR="nodebug" GASNET_CONFIG_STR=$(GASNET_SEGMENT_STR)-$(GASNET_DEBUG_STR) #CROSS_COMPILING=yes CROSS_COMPILING=no #DEBUG_MALLOC=MALLOC_CHECK_=2 TEST_ENV=$(DEBUG_MALLOC) # default node count TEST_NODES=2 # provide args and node counts for specific tests, user can override with MANUAL_TESTPARAMS TEST_PARAMS= \ testcore1_args="1000"; \ testrand_args="1024"; \ testlogGP_args="1000 8 65536"; \ testthreads_args="2"; \ testmisc_nodes="1"; \ testbarrierconf_nodes="3"; \ testmpi_args="2"; \ testmpiperf_args="BPFE 1000"; \ testqueue_args="1 256 262144"; \ testenv_args='GASNet is \"Global Address Space Networking\"'; \ $(CONDUIT_TESTPARAMS) dummy=1 ; \ $(MANUAL_TESTPARAMS) dummy=1 ; # omit tests that are supposed to fail or known to cause failures testprograms_err = \ testexit \ testhsl \ $(MPI_TESTS_SEQ) \ $(MPI_TESTS_PAR) # tests that do not link libgasnet and should execute directly on the frontend with no spawner # (except in the case of cross-compilation, where we run them on the compute node using MPIRUN_CMD) testprograms_nongasnet = \ testtools CONDUIT_NAME_UC=`echo $(CONDUIT_NAME) | mawk '{print toupper($$0)}'` awk_cmdbuild={ qargs="'"'"$$args"'"'"; gsub("'"'"\x22"'"'","'"'"\x5C\x22"'"'",qargs); \ gsub("'"'"%C"'"'", "'"'"%P %A"'"'"); \ gsub("'"'"%P"'"'", "'"'"./$$file"'"'"); \ gsub("'"'"%L"'"'", "'"'"DUMMY"'"'"); \ gsub("'"'"%V "'"'","'"'""'"'"); \ gsub("'"'"%N"'"'", "'"'"$$nodes"'"'"); \ gsub("'"'"%A"'"'", "'"'"$$args"'"'"); \ gsub("'"'"%D"'"'", "'"'"$$cwd"'"'"); \ gsub("'"'"%H"'"'", "'"'"$${GASNET_NODEFILE:-$$PBS_NODEFILE}"'"'"); \ gsub("'"'"%Q"'"'", qargs); print } perl_threadscan=print $$1 if (/\\\$$GASNetThreadModel: GASNET_([^ ]*) \\\$$/); run-tests: force @$(TEST_PARAMS) \ export `echo "$(TEST_PARAMS)" | mawk 'BEGIN {FS="=";RS=";"}{ print $$1 }'` ; \ line='+++++++++++++++++++++++++++++++++++++++' ; line="$$line$$line" ; \ tests_to_run="" export tests_to_run ; \ tests_to_ignore="" export tests_to_ignore ; \ for file in $(testprograms) ; do if test -x "$$file" ; then \ if test "`echo \"$(testprograms_err)\"| grep $$file ; exit 0`"; then \ tests_to_ignore="$$tests_to_ignore $$file" ; \ else \ tests_to_run="$$tests_to_run $$file" ; \ fi ; \ fi ; done ; \ echo $$line ; \ echo " Running $(CONDUIT_NAME)-conduit tests:" ; \ if test "$(TESTS)" ; then \ tests_to_run="$(TESTS)" ; tests_to_ignore="" ; \ fi ; \ for file in $$tests_to_run ; do echo " $$file" ; done ; \ if test "$$tests_to_ignore" ; then \ echo " Ignoring tests: $$tests_to_ignore" ; \ fi ; \ echo " If this fails to spawn a job," \ "you may need to re-run with a command like:" ; \ echo " gmake run-tests $(CONDUIT_NAME_UC)_RUNCMD=\"$(CONDUIT_RUNCMD)\"" ; \ echo $$line ; \ TEST_RUNCMD="$$$(CONDUIT_NAME_UC)_RUNCMD" export TEST_RUNCMD ; \ TEST_RUNCMD="`eval echo $$TEST_RUNCMD`" ; \ if test -z "$$TEST_RUNCMD" ; then \ TEST_RUNCMD="$(CONDUIT_RUNCMD)" ; \ fi ; \ MPI_RUNCMD="$${MPI_RUNCMD:=/project/cs/yelick/c/home/grad/bonachea/Ti/bsrs-yang/runtime/gasnet/mpi-conduit/contrib/gasnetrun_mpi -np %N %C}" \ export MPI_RUNCMD ; \ if test -z "$$TIMECMD" ; then \ TIMECMD="/usr/bin/time" ; \ fi ; \ for file in $$tests_to_run ; do \ test_nongasnet=`echo " $(testprograms_nongasnet) "| grep " $$file "` ; \ test_mpi=`echo " $(MPI_TESTS) " | grep " $$file "` ; \ if test "$$test_nongasnet" -a "$(CROSS_COMPILING)" = "yes"; then \ test_mpi=1 ; eval $${file}_nodes=1 ; \ fi ; \ args="$$""$${file}_args" ; \ args="`eval echo $$args`" ; \ nodes="$$\{""$${file}_nodes-$(TEST_NODES)\}" ; \ nodes="`eval eval echo $$nodes`" ; \ cwd=`pwd` ; \ if test "$$test_mpi" ; then \ echo "*** Running MPI test $$file ***" ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$$MPI_RUNCMD" | eval mawk \'$$awk_cmdbuild\'` ; \ faildesc="MPI test: $$file $$args" ; \ elif test "$$test_nongasnet" ; then \ echo "*** Running conduit-independent $$file ***" ; \ cmd="./$$file $$args" ; \ faildesc="$(CONDUIT_NAME)-conduit/$(GASNET_CONFIG_STR)/$$file $$args" ; \ else \ threadmode=`/usr/sww/bin/perl -n -e '$(perl_threadscan)' \ $$file 2> /dev/null` ; \ echo "*** Running $(CONDUIT_NAME)-conduit $$file" \ "in $$threadmode/$(GASNET_SEGMENT_STR) mode ***" ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$$TEST_RUNCMD" | eval mawk \'$$awk_cmdbuild\'` ; \ faildesc="$(CONDUIT_NAME)-conduit/$$threadmode-$(GASNET_CONFIG_STR)/$$file $$args" ; \ fi; \ echo "$$cmd" ; \ ( eval env GASNET_DUMMY=\"GASNet dummy value\" $(TEST_ENV) \ $$TIMECMD $$cmd || echo "ERROR: Test exited with failure code=$$?" ) \ 2>&1 | tee .test-output ; \ failure=`grep -e ERROR -e 'fatal signal' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $$line ; \ done ; \ echo "TESTS COMPLETE" TESTEXIT_SCRIPT=run-testexit TESTEXIT_SEQMAX=13 TESTEXIT_PARMAX=18 do-run-testexit: force @echo "Building $(TESTEXIT_SCRIPT) script..." @echo "#!/bin/sh" > $(TESTEXIT_SCRIPT) @nodes=$${TEST_NODES-2} ; args="" ; file="testexit" ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$(CONDUIT_RUNCMD)" | eval mawk \'$$awk_cmdbuild\'` ; \ echo "INTERACTIVE_RUNCMD='$$cmd'" >> $(TESTEXIT_SCRIPT) @echo "BATCH_RUNCMD='testexit'" >> $(TESTEXIT_SCRIPT) @echo '#BATCH_RUNCMD="$$INTERACTIVE_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo 'if test "$$PBS_O_WORKDIR" ; then ' >> $(TESTEXIT_SCRIPT) @echo ' cd "$$PBS_O_WORKDIR"' >> $(TESTEXIT_SCRIPT) @echo 'fi' >> $(TESTEXIT_SCRIPT) @echo 'if test "$$MP_PROCS" -o "$$PBS_NODEFILE" ; then' >> $(TESTEXIT_SCRIPT) @echo ' RUNCMD="$$BATCH_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo "else" >> $(TESTEXIT_SCRIPT) @echo ' RUNCMD="$$INTERACTIVE_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo "fi" >> $(TESTEXIT_SCRIPT) @echo "MALLOC_CHECK_=2; export MALLOC_CHECK_" >> $(TESTEXIT_SCRIPT) @echo 'echo "Starting run-testexit at: `date`"' >> $(TESTEXIT_SCRIPT) @echo 'ID="`hostname`-$$MP_CHILD$$PBS_NODENUM"' >> $(TESTEXIT_SCRIPT) @i=0; \ while test "$$i" != "$(TESTEXIT_SEQMAX)" ; do \ i=`expr $$i + 1`; \ echo "" >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: testexit '$$i'"' >> $(TESTEXIT_SCRIPT) ; \ echo '$$RUNCMD'" $$i" >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: result=$$?"' >> $(TESTEXIT_SCRIPT) ; \ echo "sleep 2" >> $(TESTEXIT_SCRIPT) ; \ done ; \ echo 'threadmode=`/usr/sww/bin/perl -n -e '"'"'$(perl_threadscan)'"'"' ' \ 'testexit 2> /dev/null`' >> $(TESTEXIT_SCRIPT) ; \ echo 'if test "$$threadmode" = "SEQ" -o ' \ '"$$threadmode" = "PARSYNC" ; then' >> $(TESTEXIT_SCRIPT) ; \ echo ' echo "WARNING: testexit was compiled' \ 'in GASNET_$$threadmode mode"' >> $(TESTEXIT_SCRIPT) ; \ echo ' echo "WARNING: be sure to recompile the test in' \ 'GASNET_PAR mode for full results"' >> $(TESTEXIT_SCRIPT) ; \ echo 'else' >> $(TESTEXIT_SCRIPT) ; \ while test "$$i" != "$(TESTEXIT_PARMAX)" ; do \ i=`expr $$i + 1`; \ echo "" >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: testexit '$$i'"' >> $(TESTEXIT_SCRIPT) ; \ echo '$$RUNCMD'" $$i" >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: result=$$?"' >> $(TESTEXIT_SCRIPT) ; \ echo "sleep 2" >> $(TESTEXIT_SCRIPT) ; \ done ; \ echo 'fi' >> $(TESTEXIT_SCRIPT) @echo 'echo "`hostname`: done."' >> $(TESTEXIT_SCRIPT) @chmod +x $(TESTEXIT_SCRIPT) @echo "Complete. Starting execution..." @./$(TESTEXIT_SCRIPT) # testtools is a special minimal case for an app that just uses GASNet tools # specifically, we carefully omit BUILDCONFIG_DEFINES TOOLS_CPPFLAGS = -DNDEBUG testtools: force /project/cs/titanium/srs/i686-pc-linux-gnu/bin/gcc-4.0.0 -O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline $(GASNET_INCLUDES) -D_REENTRANT -D_GNU_SOURCE $(TOOLS_CPPFLAGS) $(MANUAL_CFLAGS) -c -o $@.o $(srcdir)/$@.c /project/cs/titanium/srs/i686-pc-linux-gnu/bin/gcc-4.0.0 -O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline -o $@ $@.o -lpthread -lm rm -f $@.o # some tests need delay.o testlogGP: delay.o testlogGP_extraobjs = delay.o testbarrierlate: delay.o testbarrierlate_extraobjs = delay.o # delay function, used by multiple tests # need to deliberately exclude optimization for this object file to prevent breaking delay # some compilers implicitly enable optimization, so don't complain about that delay.o: force $(GASNET_CC) $(GASNET_CPPFLAGS) $(GASNET_MISC_CFLAGS) $(MANUAL_CFLAGS) -DGASNET_ALLOW_OPTIMIZED_DEBUG -c -o $@ $(srcdir)/$*.c # testmpi must be compiled like an MPI program with GASNet support testmpi: force /usr/mill/pkg/mpich-gm/bin/mpicc -I$(srcdir) $(GASNET_CPPFLAGS) -DGASNET_NDEBUG -O $(MANUAL_CFLAGS) -c -o $@.o $(srcdir)/$@.c $(GASNET_MPI_LD) $(GASNET_LDFLAGS) -DGASNET_NDEBUG -O -o $@ $@.o $(GASNET_LIBS) rm -f $@.o # the following are just plain MPI programs # testmpinbr requires libm $(MPI_TESTS): force /usr/mill/pkg/mpich-gm/bin/mpicc -I$(srcdir)/mpi -I/project/cs/yelick/c/home/grad/bonachea/Ti/bsrs-yang/runtime/gasnet/other -DGASNET_NDEBUG -O $(MANUAL_CFLAGS) -c -o $@.o $(srcdir)/mpi/$@.c $(GASNET_MPI_LD) $(GASNET_LDFLAGS) -DGASNET_NDEBUG -O -o $@ $@.o -lm rm -f $@.o # testcxx tests support for compiling a C++-based GASNet client # this is unlikely to work on conduits requiring a special linker (eg mpi-conduit) testcxx: force /project/cs/titanium/srs/i686-pc-linux-gnu/bin/g++-4.0.0 -static -O2 -g3 -Wall -Wno-unused -Wpointer-arith -Wwrite-strings -Wmissing-format-attribute -I$(srcdir) $(GASNET_CPPFLAGS) $(MANUAL_CFLAGS) -c -o $@.o $(srcdir)/$@.cc /project/cs/titanium/srs/i686-pc-linux-gnu/bin/g++-4.0.0 -static -O2 $(GASNET_LDFLAGS) -o $@ $@.o $($@_extraobjs) $(GASNET_LIBS) rm -f $@.o # This is a model for how GASNet clients should be built: test% : force $(GASNET_CC) -I$(srcdir) $(GASNET_CPPFLAGS) $(GASNET_CFLAGS) -c -o $@.o $(srcdir)/$@.c $(GASNET_LD) $(GASNET_LDFLAGS) -o $@ $@.o $($@_extraobjs) $(GASNET_LIBS) rm -f $@.o force: .PHONY: force all tests-mpi tests-mpi2