Makefile.am 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2010-2012, 2015-2016 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. include $(top_srcdir)/starpu.mk
  16. AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  17. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(HWLOC_LIBS) @LIBS@ $(FXT_LIBS)
  18. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  19. AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@ $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  20. if USE_MPI
  21. LIBS += $(top_builddir)/mpi/src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la
  22. AM_CPPFLAGS += -I$(top_srcdir)/mpi/include
  23. endif
  24. CC = $(CC_OR_MPICC)
  25. if STARPU_USE_CUDA
  26. if STARPU_COVERITY
  27. include $(top_srcdir)/starpu-mynvcc.mk
  28. else
  29. NVCCFLAGS += $(HWLOC_CFLAGS)
  30. .cu.cubin:
  31. $(MKDIR_P) `dirname $@`
  32. $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing $(NVCCFLAGS)
  33. .cu.o:
  34. $(MKDIR_P) `dirname $@`
  35. $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(NVCCFLAGS)
  36. endif
  37. endif
  38. #####################################
  39. # What to install and what to check #
  40. #####################################
  41. if STARPU_HAVE_WINDOWS
  42. check_PROGRAMS = $(STARPU_EXAMPLES)
  43. else
  44. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  45. endif
  46. TESTS = $(STARPU_EXAMPLES)
  47. if !STARPU_HAVE_WINDOWS
  48. ## test loader program
  49. if !STARPU_CROSS_COMPILING
  50. LOADER = loader
  51. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  52. LOADER_BIN = ./$(LOADER)
  53. loader_SOURCES = ../../tests/loader.c
  54. else
  55. LOADER =
  56. LOADER_BIN = $(top_builddir)/examples/stencil/loader-cross.sh
  57. endif
  58. if STARPU_HAVE_AM111
  59. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  60. LOG_COMPILER = $(LOADER_BIN)
  61. else
  62. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  63. endif
  64. endif
  65. ###################
  66. # stencil example #
  67. ###################
  68. STARPU_EXAMPLES = \
  69. stencil
  70. examplebindir = $(libdir)/starpu/examples/stencil
  71. examplebin_PROGRAMS = \
  72. stencil
  73. stencil_SOURCES = \
  74. life.c \
  75. stencil-kernels.c \
  76. stencil-tasks.c \
  77. stencil-blocks.c \
  78. stencil.c
  79. noinst_HEADERS = \
  80. stencil.h \
  81. shadow.h
  82. if STARPU_USE_CUDA
  83. stencil_SOURCES += \
  84. life_cuda.cu \
  85. shadow.cu
  86. endif
  87. if STARPU_USE_OPENCL
  88. stencil_SOURCES += \
  89. life_opencl.c \
  90. shadow_opencl.c
  91. endif
  92. outs = \
  93. 0.5.out \
  94. 0.out \
  95. 1.out \
  96. 2.out \
  97. 3.out \
  98. 4.out \
  99. 6.out \
  100. mpi.out
  101. EXTRA_DIST = $(outs) results run README
  102. pics: $(outs:.out=.xpm)
  103. CLEANFILES = *.gcno *.gcda *.xpm starpu_idle_microsec.log
  104. .out.out2:
  105. grep '^|' $< | tr -d ' ' > $@
  106. .out2.xpm:
  107. ( width=$$(expr $$(head -n 1 < $< | wc -c) - 1) ; \
  108. height=`wc -l < $<` ; \
  109. echo "/* XPM */" ; \
  110. echo "static char * test_xpm[] = {" ; \
  111. echo "\"$$width $$height 9 1\"," ; \
  112. echo "\"_ c None\"," ; \
  113. echo "\"0 c #FF0000\"," ; \
  114. echo "\"1 c #00FF00\"," ; \
  115. echo "\"2 c #0000FF\"," ; \
  116. echo "\"3 c #FFFF00\"," ; \
  117. echo "\"4 c #FF00FF\"," ; \
  118. echo "\"5 c #00FFFF\"," ; \
  119. echo "\"| c #FFFFFF\"," ; \
  120. echo "\"* c #000000\"," ; \
  121. < $< sed -e 's/^/"/' -e 's/$$/",/' | sed -e '$$s/",$$/"};/' ) > $@
  122. view:
  123. feh --zoom 800 -F 0.xpm 0.5.xpm 1.xpm 2.xpm 3.xpm 4.xpm 6.xpm mpi.xpm