Makefile.am 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. # Copyright (C) 2013 Simon Archipoff
  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. #
  17. include $(top_srcdir)/starpu-notests.mk
  18. SUBDIRS =
  19. CLEANFILES = *.gcno *.gcda *.linkinfo
  20. EXTRA_DIST = dolib.c
  21. xml_DATA = $(srcdir)/core/perfmodel/starpu-perfmodel.dtd
  22. xmldir = $(pkgdatadir)
  23. EXTRA_DIST += core/perfmodel/starpu-perfmodel.dtd
  24. ldflags =
  25. libstarpu_so_version = $(LIBSTARPU_INTERFACE_CURRENT):$(LIBSTARPU_INTERFACE_REVISION):$(LIBSTARPU_INTERFACE_AGE)
  26. if STARPU_HAVE_WINDOWS
  27. LC_MESSAGES=C
  28. export LC_MESSAGES
  29. ldflags += -Xlinker --output-def -Xlinker .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.def
  30. if STARPU_HAVE_MS_LIB
  31. .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.lib: libstarpu-@STARPU_EFFECTIVE_VERSION@.la dolib
  32. ./dolib "$(STARPU_MS_LIB)" $(STARPU_MS_LIB_ARCH) .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.def @STARPU_EFFECTIVE_VERSION@ $(libstarpu_so_version) .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.lib
  33. all-local: .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.lib
  34. endif STARPU_HAVE_MS_LIB
  35. install-exec-hook:
  36. $(INSTALL) .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.def $(DESTDIR)$(libdir)
  37. if STARPU_HAVE_MS_LIB
  38. $(INSTALL) .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.lib $(DESTDIR)$(libdir)
  39. $(INSTALL) .libs/libstarpu-@STARPU_EFFECTIVE_VERSION@.exp $(DESTDIR)$(libdir)
  40. endif STARPU_HAVE_MS_LIB
  41. endif STARPU_HAVE_WINDOWS
  42. lib_LTLIBRARIES = libstarpu-@STARPU_EFFECTIVE_VERSION@.la
  43. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_CPPFLAGS = -I$(top_srcdir)/include/ -DBUILDING_STARPU $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_SCIF_CPPFLAGS) $(STARPU_RCCE_CFLAGS) $(STARPU_RCCE_CPPFLAGS) -DSTARPU_DATADIR='"$(datadir)"'
  44. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = -lm $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(LIBSTARPU_LDFLAGS)
  45. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) $(FXT_LDFLAGS) -no-undefined \
  46. -version-info $(libstarpu_so_version)
  47. if STARPU_HAVE_DARWIN
  48. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS += \
  49. -Wl,-U,_starpu_main \
  50. -Wl,-U,_smpi_main \
  51. -Wl,-U,__starpu_mpi_simgrid_init \
  52. -Wl,-U,_smpi_simulated_main_ \
  53. -Wl,-U,_starpu_mpi_world_rank
  54. endif
  55. noinst_HEADERS = \
  56. core/dependencies/data_concurrency.h \
  57. core/dependencies/cg.h \
  58. core/dependencies/tags.h \
  59. core/dependencies/implicit_data_deps.h \
  60. core/disk.h \
  61. core/disk_ops/unistd/disk_unistd_global.h \
  62. core/progress_hook.h \
  63. core/idle_hook.h \
  64. core/sched_policy.h \
  65. core/sched_ctx.h \
  66. core/sched_ctx_list.h \
  67. core/perfmodel/perfmodel.h \
  68. core/perfmodel/regression.h \
  69. core/perfmodel/multiple_regression.h \
  70. core/jobs.h \
  71. core/task.h \
  72. core/drivers.h \
  73. core/workers.h \
  74. core/topology.h \
  75. core/debug.h \
  76. core/errorcheck.h \
  77. core/combined_workers.h \
  78. core/simgrid.h \
  79. core/task_bundle.h \
  80. core/detect_combined_workers.h \
  81. sched_policies/helper_mct.h \
  82. sched_policies/fifo_queues.h \
  83. datawizard/node_ops.h \
  84. datawizard/footprint.h \
  85. datawizard/datawizard.h \
  86. datawizard/data_request.h \
  87. datawizard/filters.h \
  88. datawizard/write_back.h \
  89. datawizard/datastats.h \
  90. datawizard/malloc.h \
  91. datawizard/memstats.h \
  92. datawizard/memory_manager.h \
  93. datawizard/memalloc.h \
  94. datawizard/copy_driver.h \
  95. datawizard/coherency.h \
  96. datawizard/sort_data_handles.h \
  97. datawizard/memory_nodes.h \
  98. datawizard/interfaces/data_interface.h \
  99. common/barrier.h \
  100. common/timing.h \
  101. common/list.h \
  102. common/rwlock.h \
  103. common/starpu_spinlock.h \
  104. common/fxt.h \
  105. common/utils.h \
  106. common/thread.h \
  107. common/barrier.h \
  108. common/uthash.h \
  109. common/barrier_counter.h \
  110. common/rbtree.h \
  111. common/rbtree_i.h \
  112. common/prio_list.h \
  113. common/graph.h \
  114. common/knobs.h \
  115. drivers/driver_common/driver_common.h \
  116. drivers/mp_common/mp_common.h \
  117. drivers/mp_common/source_common.h \
  118. drivers/mp_common/sink_common.h \
  119. drivers/cpu/driver_cpu.h \
  120. drivers/cuda/driver_cuda.h \
  121. drivers/opencl/driver_opencl.h \
  122. drivers/opencl/driver_opencl_utils.h \
  123. debug/starpu_debug_helpers.h \
  124. drivers/mic/driver_mic_common.h \
  125. drivers/mic/driver_mic_source.h \
  126. drivers/mic/driver_mic_sink.h \
  127. drivers/mpi/driver_mpi_common.h \
  128. drivers/mpi/driver_mpi_source.h \
  129. drivers/mpi/driver_mpi_sink.h \
  130. drivers/disk/driver_disk.h \
  131. debug/traces/starpu_fxt.h \
  132. profiling/bound.h \
  133. profiling/profiling.h \
  134. util/openmp_runtime_support.h \
  135. util/starpu_clusters_create.h \
  136. util/starpu_task_insert_utils.h \
  137. util/starpu_data_cpy.h \
  138. starpu_parameters.h \
  139. sched_policies/prio_deque.h \
  140. sched_policies/sched_component.h
  141. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES = \
  142. common/barrier.c \
  143. common/barrier_counter.c \
  144. common/hash.c \
  145. common/rwlock.c \
  146. common/starpu_spinlock.c \
  147. common/timing.c \
  148. common/fxt.c \
  149. common/utils.c \
  150. common/thread.c \
  151. common/rbtree.c \
  152. common/graph.c \
  153. common/inlines.c \
  154. common/knobs.c \
  155. core/jobs.c \
  156. core/task.c \
  157. core/task_bundle.c \
  158. core/tree.c \
  159. core/drivers.c \
  160. core/workers.c \
  161. core/combined_workers.c \
  162. core/topology.c \
  163. core/disk.c \
  164. core/debug.c \
  165. core/errorcheck.c \
  166. core/progress_hook.c \
  167. core/idle_hook.c \
  168. core/dependencies/cg.c \
  169. core/dependencies/dependencies.c \
  170. core/dependencies/implicit_data_deps.c \
  171. core/dependencies/tags.c \
  172. core/dependencies/task_deps.c \
  173. core/dependencies/data_concurrency.c \
  174. core/dependencies/data_arbiter_concurrency.c \
  175. core/disk_ops/disk_stdio.c \
  176. core/disk_ops/disk_unistd.c \
  177. core/disk_ops/unistd/disk_unistd_global.c \
  178. core/perfmodel/perfmodel_history.c \
  179. core/perfmodel/perfmodel_bus.c \
  180. core/perfmodel/perfmodel.c \
  181. core/perfmodel/perfmodel_print.c \
  182. core/perfmodel/perfmodel_nan.c \
  183. core/perfmodel/regression.c \
  184. core/perfmodel/multiple_regression.c \
  185. core/sched_policy.c \
  186. core/simgrid.c \
  187. core/simgrid_cpp.cpp \
  188. core/sched_ctx.c \
  189. core/sched_ctx_list.c \
  190. core/parallel_task.c \
  191. core/detect_combined_workers.c \
  192. sched_policies/eager_central_policy.c \
  193. sched_policies/eager_central_priority_policy.c \
  194. sched_policies/work_stealing_policy.c \
  195. sched_policies/deque_modeling_policy_data_aware.c \
  196. sched_policies/random_policy.c \
  197. sched_policies/fifo_queues.c \
  198. sched_policies/parallel_heft.c \
  199. sched_policies/parallel_eager.c \
  200. sched_policies/heteroprio.c \
  201. sched_policies/graph_test_policy.c \
  202. drivers/driver_common/driver_common.c \
  203. drivers/disk/driver_disk.c \
  204. datawizard/node_ops.c \
  205. datawizard/memory_nodes.c \
  206. datawizard/write_back.c \
  207. datawizard/coherency.c \
  208. datawizard/data_request.c \
  209. datawizard/datawizard.c \
  210. datawizard/copy_driver.c \
  211. datawizard/filters.c \
  212. datawizard/sort_data_handles.c \
  213. datawizard/malloc.c \
  214. datawizard/memory_manager.c \
  215. datawizard/memalloc.c \
  216. datawizard/memstats.c \
  217. datawizard/footprint.c \
  218. datawizard/datastats.c \
  219. datawizard/user_interactions.c \
  220. datawizard/reduction.c \
  221. datawizard/interfaces/data_interface.c \
  222. datawizard/interfaces/bcsr_interface.c \
  223. datawizard/interfaces/coo_interface.c \
  224. datawizard/interfaces/csr_interface.c \
  225. datawizard/interfaces/matrix_filters.c \
  226. datawizard/interfaces/matrix_interface.c \
  227. datawizard/interfaces/block_filters.c \
  228. datawizard/interfaces/block_interface.c \
  229. datawizard/interfaces/tensor_interface.c \
  230. datawizard/interfaces/vector_interface.c \
  231. datawizard/interfaces/bcsr_filters.c \
  232. datawizard/interfaces/csr_filters.c \
  233. datawizard/interfaces/vector_filters.c \
  234. datawizard/interfaces/variable_interface.c \
  235. datawizard/interfaces/void_interface.c \
  236. datawizard/interfaces/multiformat_interface.c \
  237. util/execute_on_all.c \
  238. util/starpu_create_sync_task.c \
  239. util/file.c \
  240. util/fstarpu.c \
  241. util/misc.c \
  242. util/openmp_runtime_support.c \
  243. util/openmp_runtime_support_environment.c \
  244. util/openmp_runtime_support_omp_api.c \
  245. util/starpu_data_cpy.c \
  246. util/starpu_task_insert.c \
  247. util/starpu_task_insert_utils.c \
  248. debug/traces/starpu_fxt.c \
  249. debug/traces/starpu_fxt_mpi.c \
  250. debug/traces/starpu_fxt_dag.c \
  251. debug/traces/starpu_paje.c \
  252. debug/traces/anim.c \
  253. debug/latency.c \
  254. debug/structures_size.c \
  255. profiling/profiling.c \
  256. profiling/bound.c \
  257. profiling/profiling_helpers.c \
  258. worker_collection/worker_list.c \
  259. worker_collection/worker_tree.c \
  260. sched_policies/component_worker.c \
  261. sched_policies/component_sched.c \
  262. sched_policies/component_fifo.c \
  263. sched_policies/prio_deque.c \
  264. sched_policies/helper_mct.c \
  265. sched_policies/component_prio.c \
  266. sched_policies/component_random.c \
  267. sched_policies/component_eager.c \
  268. sched_policies/component_eager_prio.c \
  269. sched_policies/component_eager_calibration.c \
  270. sched_policies/component_mct.c \
  271. sched_policies/component_heft.c \
  272. sched_policies/component_heteroprio.c \
  273. sched_policies/component_best_implementation.c \
  274. sched_policies/component_perfmodel_select.c \
  275. sched_policies/component_composed.c \
  276. sched_policies/component_work_stealing.c \
  277. sched_policies/component_stage.c \
  278. sched_policies/component_userchoice.c \
  279. sched_policies/modular_eager.c \
  280. sched_policies/modular_eager_prio.c \
  281. sched_policies/modular_eager_prefetching.c \
  282. sched_policies/modular_gemm.c \
  283. sched_policies/modular_prio.c \
  284. sched_policies/modular_prio_prefetching.c \
  285. sched_policies/modular_random.c \
  286. sched_policies/modular_parallel_random.c \
  287. sched_policies/modular_random_prefetching.c \
  288. sched_policies/modular_parallel_heft.c \
  289. sched_policies/modular_heft.c \
  290. sched_policies/modular_heft_prio.c \
  291. sched_policies/modular_heteroprio.c \
  292. sched_policies/modular_heteroprio_heft.c \
  293. sched_policies/modular_heft2.c \
  294. sched_policies/modular_ws.c \
  295. sched_policies/modular_ez.c
  296. if STARPU_HAVE_LEVELDB
  297. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += core/disk_ops/disk_leveldb.cpp
  298. endif
  299. if STARPU_HAVE_HDF5
  300. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += core/disk_ops/disk_hdf5.c
  301. endif
  302. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cpu/driver_cpu.c
  303. if STARPU_USE_CUDA
  304. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/driver_cuda.c
  305. else
  306. if STARPU_SIMGRID
  307. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/driver_cuda.c
  308. endif
  309. endif
  310. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/starpu_cublas.c
  311. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/cuda/starpu_cusparse.c
  312. if STARPU_USE_OPENCL
  313. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/opencl/driver_opencl.c
  314. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/opencl/driver_opencl_utils.c
  315. else
  316. if STARPU_SIMGRID
  317. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/opencl/driver_opencl.c
  318. endif
  319. endif
  320. if STARPU_LINUX_SYS
  321. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += core/disk_ops/disk_unistd_o_direct.c
  322. endif
  323. if STARPU_HAVE_HWLOC
  324. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += \
  325. sched_policies/scheduler_maker.c \
  326. sched_policies/hierarchical_heft.c
  327. if STARPU_HWLOC_HAVE_TOPOLOGY_DUP
  328. if STARPU_HAVE_OPENMP
  329. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += util/starpu_clusters_create.c
  330. endif
  331. endif
  332. endif
  333. #########################################
  334. # #
  335. # Generic MP compilation #
  336. # #
  337. #########################################
  338. if STARPU_USE_MP
  339. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mp_common/mp_common.c
  340. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mp_common/source_common.c
  341. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mp_common/sink_common.c
  342. endif
  343. #########################################
  344. # #
  345. # MIC compilation #
  346. # #
  347. #########################################
  348. if STARPU_USE_MIC
  349. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mic/driver_mic_common.c
  350. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mic/driver_mic_source.c
  351. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mic/driver_mic_sink.c
  352. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mic/driver_mic_utils.c
  353. endif
  354. #########################################
  355. # #
  356. # MPI Master/Slave compilation #
  357. # #
  358. #########################################
  359. if STARPU_USE_MPI_MASTER_SLAVE
  360. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mpi/driver_mpi_common.c
  361. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mpi/driver_mpi_source.c
  362. libstarpu_@STARPU_EFFECTIVE_VERSION@_la_SOURCES += drivers/mpi/driver_mpi_sink.c
  363. endif
  364. #########################################
  365. # If some external references appear (U), it means the corresponding .c file has
  366. # only included <starpu.h> and not the internal src/ header which contains the
  367. # static inline definition
  368. dist-hook:
  369. failed=0 ; \
  370. look=""; \
  371. for i in $$( $(GREP) "static inline" $$(find $(srcdir) -name \*.h) | $(SED) -e 's/.*static inline //g' | $(GREP) -v ENAME\#\# | $(SED) -n -e 's/[^(]* \(\|\*\)\([^ (]*\)(.*/\2/' -e 'p;s/^_*//;p' | $(GREP) -v _starpu_spin_init | $(GREP) -v starpu_sched_ctx_worker_is_master_for_child_ctx) ; do \
  372. if [ -z "$$look" ] ; then \
  373. look="$$i" ; \
  374. else \
  375. look="$$look\|$$i" ; \
  376. fi ; \
  377. done ; \
  378. echo "$$look" ; \
  379. for j in $(shell find . -name \*.o) ; do \
  380. nm $$j | $(GREP) -e "U \($$look\)$$" && { echo $$j ; failed=1 ; } ; \
  381. done ; \
  382. [ $$failed == 0 ]