Makefile.am 6.8 KB

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