Makefile.am 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2010-2012, 2015 Université de Bordeaux
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  16. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) @LIBS@
  17. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  18. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  19. if USE_MPI
  20. LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  21. AM_CPPFLAGS += -I$(top_srcdir)/mpi/include
  22. endif
  23. CC = $(CC_OR_MPICC)
  24. if STARPU_USE_CUDA
  25. NVCCFLAGS += $(HWLOC_CFLAGS)
  26. .cu.cubin:
  27. $(MKDIR_P) `dirname $@`
  28. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  29. .cu.o:
  30. $(MKDIR_P) `dirname $@`
  31. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(NVCCFLAGS)
  32. endif
  33. #####################################
  34. # What to install and what to check #
  35. #####################################
  36. if STARPU_HAVE_WINDOWS
  37. check_PROGRAMS = $(STARPU_EXAMPLES)
  38. else
  39. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  40. endif
  41. TESTS = $(STARPU_EXAMPLES)
  42. if !STARPU_HAVE_WINDOWS
  43. ## test loader program
  44. if !STARPU_CROSS_COMPILING
  45. LOADER = loader
  46. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  47. LOADER_BIN = ./$(LOADER)
  48. loader_SOURCES = ../../tests/loader.c
  49. else
  50. LOADER =
  51. LOADER_BIN = $(top_builddir)/tests/loader-cross.sh
  52. endif
  53. if STARPU_HAVE_AM111
  54. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  55. LOG_COMPILER = $(LOADER_BIN)
  56. else
  57. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  58. endif
  59. endif
  60. ###################
  61. # stencil example #
  62. ###################
  63. STARPU_EXAMPLES = \
  64. stencil
  65. examplebindir = $(libdir)/starpu/examples/stencil
  66. examplebin_PROGRAMS = \
  67. stencil
  68. stencil_SOURCES = \
  69. life.c \
  70. stencil-kernels.c \
  71. stencil-tasks.c \
  72. stencil-blocks.c \
  73. stencil.c
  74. noinst_HEADERS = \
  75. stencil.h \
  76. shadow.h
  77. if STARPU_USE_CUDA
  78. stencil_SOURCES += \
  79. life_cuda.cu \
  80. shadow.cu
  81. endif
  82. if STARPU_USE_OPENCL
  83. stencil_SOURCES += \
  84. life_opencl.c \
  85. shadow_opencl.c
  86. endif
  87. outs = \
  88. 0.5.out \
  89. 0.out \
  90. 1.out \
  91. 2.out \
  92. 3.out \
  93. 4.out \
  94. 6.out \
  95. mpi.out
  96. EXTRA_DIST = $(outs) results run README
  97. pics: $(outs:.out=.xpm)
  98. CLEANFILES = *.xpm starpu_idle_microsec.log
  99. .out.out2:
  100. grep '^|' $< | tr -d ' ' > $@
  101. .out2.xpm:
  102. ( width=$$(expr $$(head -n 1 < $< | wc -c) - 1) ; \
  103. height=`wc -l < $<` ; \
  104. echo "/* XPM */" ; \
  105. echo "static char * test_xpm[] = {" ; \
  106. echo "\"$$width $$height 9 1\"," ; \
  107. echo "\"_ c None\"," ; \
  108. echo "\"0 c #FF0000\"," ; \
  109. echo "\"1 c #00FF00\"," ; \
  110. echo "\"2 c #0000FF\"," ; \
  111. echo "\"3 c #FFFF00\"," ; \
  112. echo "\"4 c #FF00FF\"," ; \
  113. echo "\"5 c #00FFFF\"," ; \
  114. echo "\"| c #FFFFFF\"," ; \
  115. echo "\"* c #000000\"," ; \
  116. < $< sed -e 's/^/"/' -e 's/$$/",/' | sed -e '$$s/",$$/"};/' ) > $@
  117. view:
  118. feh --zoom 800 -F 0.xpm 0.5.xpm 1.xpm 2.xpm 3.xpm 4.xpm 6.xpm mpi.xpm
  119. showcheck:
  120. -cat $(TEST_LOGS) /dev/null
  121. ! grep -q "ERROR: AddressSanitizer: " $(TEST_LOGS) /dev/null
  122. ! grep -q "WARNING: AddressSanitizer: " $(TEST_LOGS) /dev/null
  123. ! grep -q "ERROR: ThreadSanitizer: " $(TEST_LOGS) /dev/null
  124. ! grep -q "WARNING: ThreadSanitizer: " $(TEST_LOGS) /dev/null