-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
260 lines (219 loc) · 8.93 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# This file is part of NODES and is licensed under the terms contained in the COPYING file.
#
# Copyright (C) 2021-2024 Barcelona Supercomputing Center (BSC)
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(srcdir)/api -I$(top_srcdir)/src -I$(builddir)/src
AM_CXXFLAGS = -I$(srcdir)/api -I$(top_srcdir)/src -I$(builddir)/src
AM_CFLAGS = -I$(srcdir)/api -I$(top_srcdir)/src -I$(builddir)/src
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(nosv_LIBS) $(BOOST_LDFLAGS) $(ovni_LIBS)
AM_LIBS = -lrt -lpthread -lnosv
SUBDIRS = . tests
# See info page of libtool "Updating version info"
lib_current = 0
lib_revision = 0
lib_age = 0
# Expected shared object numbers
lib_major = $(shell expr $(lib_current) - $(lib_age))
lib_suffix = $(lib_major).$(lib_age).$(lib_revision)
nodesincludedir = $(includedir)/nodes
nodesinclude_HEADERS = \
api/nodes/blocking.h \
api/nodes/bootstrap.h \
api/nodes/constants.h \
api/nodes/debug.h \
api/nodes/dependencies.h \
api/nodes/events.h \
api/nodes/final.h \
api/nodes/library-mode.h \
api/nodes/loop.h \
api/nodes/major.h \
api/nodes/reductions.h \
api/nodes/task-info-registration.h \
api/nodes/task-instantiation.h \
api/nodes/taskwait.h \
api/nodes/user-mutex.h \
api/nodes/version.h
if HAVE_CXX_20
nodesinclude_HEADERS += api/nodes/coroutines.hpp
endif
nodist_nodesinclude_HEADERS = \
nodes/multidimensional-dependencies.h \
nodes/multidimensional-release.h
include_HEADERS = \
api/nodes.h
noinst_HEADERS = \
src/common/AtomicBitset.hpp \
src/common/Chrono.hpp \
src/common/Containers.hpp \
src/common/EnvironmentVariable.hpp \
src/common/ErrorHandler.hpp \
src/common/MathSupport.hpp \
src/common/PaddedSpinLock.hpp \
src/common/PaddedTicketSpinLock.hpp \
src/common/Padding.hpp \
src/common/SpinLock.hpp \
src/common/SpinWait.hpp \
src/common/StringSupport.hpp \
src/common/TicketSpinLock.hpp \
src/common/UserMutex.hpp \
src/dependencies/DataAccessBase.hpp \
src/dependencies/DataAccessRegion.hpp \
src/dependencies/DataAccessType.hpp \
src/dependencies/DataTrackingSupport.hpp \
src/dependencies/MultidimensionalAPITraversal.hpp \
src/dependencies/SymbolTranslation.hpp \
src/dependencies/discrete/BottomMapEntry.hpp \
src/dependencies/discrete/CPUDependencyData.hpp \
src/dependencies/discrete/CommutativeSemaphore.hpp \
src/dependencies/discrete/DataAccess.hpp \
src/dependencies/discrete/DataAccessFlags.hpp \
src/dependencies/discrete/DataAccessRegistration.hpp \
src/dependencies/discrete/DependencySystem.hpp \
src/dependencies/discrete/DeviceReductionStorage.hpp \
src/dependencies/discrete/MultidimensionalAPI.hpp \
src/dependencies/discrete/ReductionInfo.hpp \
src/dependencies/discrete/ReductionSpecific.hpp \
src/dependencies/discrete/TaskDataAccesses.hpp \
src/dependencies/discrete/TaskDataAccessesInfo.hpp \
src/dependencies/discrete/TaskiterReductionInfo.hpp \
src/dependencies/discrete/devices/HostReductionStorage.hpp \
src/dependencies/discrete/taskiter/TaskGroupMetadata.hpp \
src/dependencies/discrete/taskiter/TaskiterGraph.hpp \
src/dependencies/discrete/taskiter/TaskiterNode.hpp \
src/hardware/HardwareInfo.hpp \
src/instrument/OVNIInstrumentation.hpp \
src/memory/MemoryAllocator.hpp \
src/memory/ObjectAllocator.hpp \
src/system/SpawnFunction.hpp \
src/system/TaskCreation.hpp \
src/system/TaskFinalization.hpp \
src/tasks/TaskInfo.hpp \
src/tasks/TaskiterChildLoopMetadata.hpp \
src/tasks/TaskiterChildMetadata.hpp \
src/tasks/TaskiterMetadata.hpp \
src/tasks/TaskMetadata.hpp \
src/tasks/TaskloopMetadata.hpp \
tests/common/Atomic.hpp \
tests/common/Functors.hpp \
tests/common/TAPDriver.hpp \
tests/common/Timer.hpp
common_sources = \
src/bootstrap/Initialization.cpp \
src/common/ErrorHandler.cpp \
src/common/SpinLock.cpp \
src/dependencies/DataTrackingSupport.cpp \
src/dependencies/discrete/CPUDependencyData.cpp \
src/dependencies/discrete/CommutativeSemaphore.cpp \
src/dependencies/discrete/DataAccess.cpp \
src/dependencies/discrete/DataAccessRegistration.cpp \
src/dependencies/discrete/ReductionInfo.cpp \
src/dependencies/discrete/RegisterDependencies.cpp \
src/dependencies/discrete/ReleaseDirective.cpp \
src/dependencies/discrete/devices/HostReductionStorage.cpp \
src/dependencies/discrete/taskiter/TaskGroupMetadata.cpp \
src/dependencies/discrete/taskiter/TaskiterGraph.cpp \
src/hardware/HardwareInfo.cpp \
src/system/DebugAPI.cpp \
src/system/EventsAPI.cpp \
src/system/SpawnFunction.cpp \
src/system/TaskBlocking.cpp \
src/system/TaskCreation.cpp \
src/system/TaskFinalization.cpp \
src/system/TaskWait.cpp \
src/system/VersionAPI.cpp \
src/tasks/Task.cpp \
src/tasks/TaskInfo.cpp \
src/tasks/TaskInfoAPI.cpp \
src/tasks/TaskiterMetadata.cpp \
src/tasks/TaskloopMetadata.cpp \
src/tasks/TaskMetadata.cpp
if HAVE_CXX_20
common_sources += \
src/system/CoAwaitables.cpp \
src/system/TaskCoroutine.cpp
endif
dependency_flags = -I$(srcdir)/src/dependencies -I$(srcdir)/src/dependencies/discrete
lib_LTLIBRARIES = libnodes.la
libnodes_la_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(nodes_CPPFLAGS) $(nosv_CPPFLAGS) $(BOOST_CPPFLAGS) $(ovni_CPPFLAGS) $(coro_CPPFLAGS)
libnodes_la_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) $(nodes_CXXFLAGS) $(nosv_CPPFLAGS) $(ovni_CXXFLAGS) $(coro_CPPFLAGS) $(dependency_flags)
libnodes_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(nodes_CFLAGS)
libnodes_la_LDFLAGS = $(AM_LDFLAGS)
libnodes_la_SOURCES = $(common_sources)
#
# Taskification of the "main" function
#
noinst_LTLIBRARIES = libnodes-main-wrapper.la
lib_OBJECTS = nodes-main-wrapper.o
libnodes_main_wrapper_la_SOURCES = \
src/bootstrap/intercept-main-common.c \
src/bootstrap/intercept-main-common.h \
src/bootstrap/main-wrapper.c \
src/bootstrap/main-wrapper.h
# Check which main interception signature we will use (see main_intercept.m4)
if LINUX_POWERPC_GLIBC
libnodes_main_wrapper_la_SOURCES += src/bootstrap/intercept-main-glibc-powerpc.c
endif
if LINUX_GLIBC
libnodes_main_wrapper_la_SOURCES += src/bootstrap/intercept-main-glibc.c
endif
libnodes_main_wrapper_la_CPPFLAGS = $(MCMODEL_FLAGS)
libnodes_main_wrapper_la_LDFLAGS = -static
nodes-main-wrapper.o: libnodes-main-wrapper.la
$(AM_V_LD)$(LD) -r --whole-archive $(top_builddir)/.libs/libnodes-main-wrapper.a -o nodes-main-wrapper.o
#
# Multidimensional API
#
nodes_generated_headers = \
nodes/multidimensional-dependencies.h \
nodes/multidimensional-release.h
multidimensional_adaptor_sources = MultidimensionalAPIToLinear.cpp
nodist_common_sources = $(nodes_generated_headers) $(multidimensional_adaptor_sources)
nodist_libnodes_la_SOURCES = $(nodist_common_sources)
BUILT_SOURCES = $(nodes_generated_headers) $(multidimensional_adaptor_sources)
CLEANFILES = $(nodist_libnodes_la_SOURCES) $(multidimensional_adaptor_sources)
#
# Automatically generated API headers
#
MAX_REGION_DIMENSIONS = 8
MULTIDIMENSIONAL_REGION_API_TYPES = read write readwrite weak_read weak_write weak_readwrite concurrent commutative weak_commutative reduction weak_reduction
SUPPORTED_MULTIDIMENSIONAL_REGION_API_TYPES = read write readwrite weak_read weak_write weak_readwrite concurrent commutative weak_commutative reduction weak_reduction
EXTRA_DIST = \
scripts/common.sh \
scripts/generate_multidim_functions_for_linear_regions.sh \
scripts/generate_regions_prototypes.sh \
scripts/generate_release_prototypes.sh \
tests/tap-driver.sh
nodes/multidimensional-dependencies.h: $(top_srcdir)/scripts/common.sh $(top_srcdir)/scripts/generate_regions_prototypes.sh Makefile
$(AM_V_GEN)mkdir -p nodes ; \
$(top_srcdir)/scripts/generate_regions_prototypes.sh $(MAX_REGION_DIMENSIONS) $(MULTIDIMENSIONAL_REGION_API_TYPES) > $@
nodes/multidimensional-release.h: $(top_srcdir)/scripts/common.sh $(top_srcdir)/scripts/generate_release_prototypes.sh Makefile
$(AM_V_GEN)mkdir -p nodes ; \
$(top_srcdir)/scripts/generate_release_prototypes.sh $(MAX_REGION_DIMENSIONS) $(MULTIDIMENSIONAL_REGION_API_TYPES) > $@
MultidimensionalAPIToLinear.cpp: $(top_srcdir)/scripts/common.sh $(top_srcdir)/scripts/generate_multidim_functions_for_linear_regions.sh Makefile
$(AM_V_GEN)$(top_srcdir)/scripts/generate_multidim_functions_for_linear_regions.sh $(MAX_REGION_DIMENSIONS) $(SUPPORTED_MULTIDIMENSIONAL_REGION_API_TYPES) > $@
all-local: $(lib_OBJECTS)
install-exec-local: $(lib_OBJECTS)
@$(NORMAL_INSTALL)
@list='$(lib_OBJECTS)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(INSTALL) $$list2 '$(DESTDIR)$(libdir)'"; \
$(INSTALL) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-hook:
for l in $(lib_OBJECTS) ; do \
if test -f "$(DESTDIR)$(libdir)/$$l" ; then \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$l" ; \
fi ; \
done
# All potential files in this list will be distributed
# regardless of the Makefile conditionals
noinst_HEADERS += \
$(common_sources)
build-tests-local: $(check_PROGRAMS)