Makefile.am 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2012, 2015-2017 Université de Bordeaux
  4. # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 CNRS
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. include $(top_srcdir)/starpu.mk
  17. if STARPU_SIMGRID
  18. STARPU_PERF_MODEL_DIR=$(abs_top_srcdir)/tools/perfmodels/sampling
  19. STARPU_HOSTNAME=mirage
  20. MALLOC_PERTURB_=0
  21. export STARPU_PERF_MODEL_DIR
  22. export STARPU_HOSTNAME
  23. export MALLOC_PERTURB_
  24. endif
  25. CC=$(MPICC)
  26. CCLD=$(MPICC)
  27. if STARPU_HAVE_WINDOWS
  28. LOADER_BIN =
  29. else
  30. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  31. if !STARPU_SIMGRID
  32. LOADER = loader
  33. LOADER_BIN = $(abs_top_builddir)/mpi/tests/$(LOADER)
  34. endif
  35. loader_SOURCES = ../../tests/loader.c
  36. endif
  37. if STARPU_SIMGRID
  38. MPI = $(abs_top_builddir)/tools/starpu_smpirun -np 4 -platform $(abs_top_srcdir)/tools/perfmodels/cluster.xml -hostfile $(abs_top_srcdir)/tools/perfmodels/hostfile
  39. else
  40. # we always test on 4 processes, the execution time is not that bigger
  41. if STARPU_QUICK_CHECK
  42. MPI = $(MPIEXEC) $(MPIEXEC_ARGS) -np 4
  43. else
  44. MPI = $(MPIEXEC) $(MPIEXEC_ARGS) -np 4
  45. endif
  46. endif
  47. if STARPU_HAVE_AM111
  48. TESTS_ENVIRONMENT = STARPU_WORKERS_NOBIND=1 STARPU_NCPU=4 top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)"
  49. LOG_COMPILER = $(MPI) $(LOADER_BIN)
  50. else
  51. TESTS_ENVIRONMENT = STARPU_WORKERS_NOBIND=1 STARPU_NCPU=4 top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(MPI) $(LOADER_BIN)
  52. endif
  53. if STARPU_MPI_CHECK
  54. TESTS = $(starpu_mpi_TESTS)
  55. endif
  56. check_PROGRAMS = $(LOADER) $(starpu_mpi_TESTS)
  57. BUILT_SOURCES =
  58. CLEANFILES = *.gcno *.gcda *.linkinfo starpu_idle_microsec.log
  59. EXTRA_DIST = \
  60. user_defined_datatype_value.h \
  61. helper.h
  62. examplebindir = $(libdir)/starpu/examples/mpi
  63. examplebin_PROGRAMS =
  64. if STARPU_USE_CUDA
  65. if STARPU_COVERITY
  66. include $(top_srcdir)/starpu-mynvcc.mk
  67. else
  68. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ $(HWLOC_CFLAGS)
  69. .cu.cubin:
  70. $(MKDIR_P) `dirname $@`
  71. $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
  72. .cu.o:
  73. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  74. endif
  75. endif
  76. AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  77. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
  78. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/mpi/include -I$(top_srcdir)/mpi/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/examples/
  79. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  80. ########################
  81. # Unit testcases #
  82. ########################
  83. if BUILD_TESTS
  84. starpu_mpi_TESTS =
  85. starpu_mpi_TESTS += \
  86. attr \
  87. cache \
  88. cache_disable \
  89. callback \
  90. early_request \
  91. insert_task \
  92. insert_task_block \
  93. insert_task_dyn_handles \
  94. insert_task_node_choice \
  95. insert_task_owner \
  96. insert_task_owner2 \
  97. insert_task_owner_data \
  98. matrix \
  99. matrix2 \
  100. mpi_detached_tag \
  101. mpi_irecv_detached \
  102. mpi_isend_detached \
  103. mpi_reduction \
  104. mpi_scatter_gather \
  105. policy_register \
  106. policy_register_many \
  107. policy_selection \
  108. policy_selection2 \
  109. ring_async_implicit \
  110. temporary
  111. if !STARPU_SIMGRID
  112. starpu_mpi_TESTS += \
  113. pingpong \
  114. mpi_test \
  115. mpi_isend \
  116. mpi_earlyrecv \
  117. mpi_earlyrecv2 \
  118. mpi_earlyrecv2_sync \
  119. mpi_irecv \
  120. mpi_redux \
  121. ring \
  122. ring_sync \
  123. ring_sync_detached \
  124. ring_async \
  125. block_interface \
  126. block_interface_pinned \
  127. matrix2 \
  128. insert_task_compute \
  129. insert_task_sent_cache \
  130. insert_task_recv_cache \
  131. insert_task_count \
  132. multiple_send \
  133. user_defined_datatype \
  134. tags_checking \
  135. sync \
  136. gather \
  137. gather2
  138. if STARPU_USE_MPI_MPI
  139. starpu_mpi_TESTS += \
  140. load_balancer
  141. endif
  142. # Expected to fail
  143. starpu_mpi_TESTS += \
  144. policy_register_toomany \
  145. policy_unregister \
  146. starpu_redefine
  147. endif
  148. noinst_PROGRAMS = \
  149. datatypes \
  150. pingpong \
  151. mpi_test \
  152. mpi_isend \
  153. mpi_earlyrecv \
  154. mpi_earlyrecv2 \
  155. mpi_earlyrecv2_sync \
  156. mpi_irecv \
  157. mpi_isend_detached \
  158. mpi_irecv_detached \
  159. mpi_detached_tag \
  160. mpi_redux \
  161. ring \
  162. ring_sync \
  163. ring_sync_detached \
  164. ring_async \
  165. ring_async_implicit \
  166. temporary \
  167. block_interface \
  168. block_interface_pinned \
  169. attr \
  170. cache \
  171. cache_disable \
  172. callback \
  173. matrix \
  174. matrix2 \
  175. insert_task \
  176. insert_task_compute \
  177. insert_task_sent_cache \
  178. insert_task_recv_cache \
  179. insert_task_block \
  180. insert_task_owner \
  181. insert_task_owner2 \
  182. insert_task_owner_data \
  183. insert_task_node_choice \
  184. insert_task_count \
  185. insert_task_dyn_handles \
  186. multiple_send \
  187. mpi_scatter_gather \
  188. mpi_reduction \
  189. user_defined_datatype \
  190. tags_checking \
  191. sync \
  192. gather \
  193. gather2 \
  194. policy_register \
  195. policy_register_many \
  196. policy_register_toomany \
  197. policy_unregister \
  198. policy_selection \
  199. policy_selection2 \
  200. early_request \
  201. starpu_redefine \
  202. load_balancer
  203. XFAIL_TESTS= \
  204. policy_register_toomany \
  205. policy_unregister \
  206. starpu_redefine
  207. ring_SOURCES = ring.c
  208. ring_sync_SOURCES = ring_sync.c
  209. ring_sync_detached_SOURCES = ring_sync_detached.c
  210. ring_async_SOURCES = ring_async.c
  211. ring_async_implicit_SOURCES = ring_async_implicit.c
  212. insert_task_count_SOURCES = insert_task_count.c
  213. if STARPU_USE_CUDA
  214. ring_SOURCES += ring_kernel.cu
  215. ring_sync_SOURCES += ring_kernel.cu
  216. ring_sync_detached_SOURCES += ring_kernel.cu
  217. ring_async_SOURCES += ring_kernel.cu
  218. ring_async_implicit_SOURCES += ring_kernel.cu
  219. insert_task_count_SOURCES += ring_kernel.cu
  220. endif
  221. mpi_reduction_SOURCES = mpi_reduction.c
  222. mpi_reduction_SOURCES += mpi_reduction_kernels.c
  223. user_defined_datatype_SOURCES = user_defined_datatype.c
  224. user_defined_datatype_SOURCES += ../../examples/interface/complex_interface.c
  225. mpi_earlyrecv2_SOURCES = mpi_earlyrecv2.c
  226. mpi_earlyrecv2_SOURCES += ../../examples/interface/complex_interface.c
  227. mpi_earlyrecv2_sync_SOURCES = mpi_earlyrecv2_sync.c
  228. mpi_earlyrecv2_sync_SOURCES += ../../examples/interface/complex_interface.c
  229. endif