Makefile.am 3.7 KB

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