Makefile.am 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. if !STARPU_SIMGRID
  47. TESTS = $(STARPU_EXAMPLES)
  48. endif
  49. if !STARPU_HAVE_WINDOWS
  50. ## test loader program
  51. if !STARPU_CROSS_COMPILING
  52. LOADER = loader
  53. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  54. LOADER_BIN = ./$(LOADER)
  55. loader_SOURCES = ../../tests/loader.c
  56. else
  57. LOADER =
  58. LOADER_BIN = $(top_builddir)/examples/stencil/loader-cross.sh
  59. endif
  60. if STARPU_HAVE_AM111
  61. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  62. LOG_COMPILER = $(LOADER_BIN)
  63. else
  64. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  65. endif
  66. endif
  67. ###################
  68. # stencil example #
  69. ###################
  70. STARPU_EXAMPLES = \
  71. stencil
  72. examplebindir = $(libdir)/starpu/examples/stencil
  73. examplebin_PROGRAMS = \
  74. stencil
  75. stencil_SOURCES = \
  76. life.c \
  77. stencil-kernels.c \
  78. stencil-tasks.c \
  79. stencil-blocks.c \
  80. stencil.c
  81. noinst_HEADERS = \
  82. stencil.h \
  83. shadow.h
  84. if STARPU_USE_CUDA
  85. stencil_SOURCES += \
  86. life_cuda.cu \
  87. shadow.cu
  88. endif
  89. if STARPU_USE_OPENCL
  90. stencil_SOURCES += \
  91. life_opencl.c \
  92. shadow_opencl.c
  93. endif
  94. outs = \
  95. 0.5.out \
  96. 0.out \
  97. 1.out \
  98. 2.out \
  99. 3.out \
  100. 4.out \
  101. 6.out \
  102. mpi.out
  103. EXTRA_DIST = $(outs) results run README
  104. pics: $(outs:.out=.xpm)
  105. CLEANFILES = *.gcno *.gcda *.xpm starpu_idle_microsec.log
  106. .out.out2:
  107. grep '^|' $< | tr -d ' ' > $@
  108. .out2.xpm:
  109. ( width=$$(expr $$(head -n 1 < $< | wc -c) - 1) ; \
  110. height=`wc -l < $<` ; \
  111. echo "/* XPM */" ; \
  112. echo "static char * test_xpm[] = {" ; \
  113. echo "\"$$width $$height 9 1\"," ; \
  114. echo "\"_ c None\"," ; \
  115. echo "\"0 c #FF0000\"," ; \
  116. echo "\"1 c #00FF00\"," ; \
  117. echo "\"2 c #0000FF\"," ; \
  118. echo "\"3 c #FFFF00\"," ; \
  119. echo "\"4 c #FF00FF\"," ; \
  120. echo "\"5 c #00FFFF\"," ; \
  121. echo "\"| c #FFFFFF\"," ; \
  122. echo "\"* c #000000\"," ; \
  123. < $< sed -e 's/^/"/' -e 's/$$/",/' | sed -e '$$s/",$$/"};/' ) > $@
  124. view:
  125. feh --zoom 800 -F 0.xpm 0.5.xpm 1.xpm 2.xpm 3.xpm 4.xpm 6.xpm mpi.xpm