Makefile.am 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. $(V_nvcc) $(NVCC) -cubin $< -o $@ $(NVCCFLAGS)
  71. .cu.o:
  72. $(V_nvcc) $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  73. endif
  74. endif
  75. AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS) -Wno-unused
  76. LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ ../src/libstarpumpi-@STARPU_EFFECTIVE_VERSION@.la @LIBS@ $(FXT_LIBS) $(MAGMA_LIBS)
  77. 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/
  78. AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(FXT_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
  79. ########################
  80. # Unit testcases #
  81. ########################
  82. if BUILD_TESTS
  83. starpu_mpi_TESTS =
  84. starpu_mpi_TESTS += \
  85. cache \
  86. cache_disable \
  87. callback \
  88. early_request \
  89. insert_task \
  90. insert_task_block \
  91. insert_task_dyn_handles \
  92. insert_task_node_choice \
  93. insert_task_owner \
  94. insert_task_owner2 \
  95. insert_task_owner_data \
  96. matrix \
  97. matrix2 \
  98. mpi_detached_tag \
  99. mpi_irecv_detached \
  100. mpi_isend_detached \
  101. mpi_reduction \
  102. mpi_scatter_gather \
  103. policy_register \
  104. policy_register_many \
  105. policy_selection \
  106. policy_selection2 \
  107. ring_async_implicit \
  108. temporary
  109. if !STARPU_SIMGRID
  110. starpu_mpi_TESTS += \
  111. attr \
  112. pingpong \
  113. mpi_test \
  114. mpi_isend \
  115. mpi_earlyrecv \
  116. mpi_earlyrecv2 \
  117. mpi_earlyrecv2_sync \
  118. mpi_irecv \
  119. mpi_redux \
  120. ring \
  121. ring_sync \
  122. ring_sync_detached \
  123. ring_async \
  124. block_interface \
  125. block_interface_pinned \
  126. matrix2 \
  127. insert_task_compute \
  128. insert_task_sent_cache \
  129. insert_task_recv_cache \
  130. insert_task_count \
  131. insert_task_seq \
  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. insert_task_seq \
  187. multiple_send \
  188. mpi_scatter_gather \
  189. mpi_reduction \
  190. user_defined_datatype \
  191. tags_checking \
  192. sync \
  193. gather \
  194. gather2 \
  195. policy_register \
  196. policy_register_many \
  197. policy_register_toomany \
  198. policy_unregister \
  199. policy_selection \
  200. policy_selection2 \
  201. early_request \
  202. starpu_redefine \
  203. load_balancer
  204. XFAIL_TESTS= \
  205. policy_register_toomany \
  206. policy_unregister \
  207. starpu_redefine
  208. ring_SOURCES = ring.c
  209. ring_sync_SOURCES = ring_sync.c
  210. ring_sync_detached_SOURCES = ring_sync_detached.c
  211. ring_async_SOURCES = ring_async.c
  212. ring_async_implicit_SOURCES = ring_async_implicit.c
  213. insert_task_count_SOURCES = insert_task_count.c
  214. if STARPU_USE_CUDA
  215. ring_SOURCES += ring_kernel.cu
  216. ring_sync_SOURCES += ring_kernel.cu
  217. ring_sync_detached_SOURCES += ring_kernel.cu
  218. ring_async_SOURCES += ring_kernel.cu
  219. ring_async_implicit_SOURCES += ring_kernel.cu
  220. insert_task_count_SOURCES += ring_kernel.cu
  221. endif
  222. mpi_reduction_SOURCES = mpi_reduction.c
  223. mpi_reduction_SOURCES += mpi_reduction_kernels.c
  224. user_defined_datatype_SOURCES = user_defined_datatype.c
  225. user_defined_datatype_SOURCES += ../../examples/interface/complex_interface.c
  226. mpi_earlyrecv2_SOURCES = mpi_earlyrecv2.c
  227. mpi_earlyrecv2_SOURCES += ../../examples/interface/complex_interface.c
  228. mpi_earlyrecv2_sync_SOURCES = mpi_earlyrecv2_sync.c
  229. mpi_earlyrecv2_sync_SOURCES += ../../examples/interface/complex_interface.c
  230. endif