summaryrefslogtreecommitdiffstats
path: root/legion/legion.spec
blob: 0608b7f86d6acbf0f53b2ce4e33952ec0ecb4ada (plain)
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
Name:           legion
Version:        17.02.0
Release:        3%{?dist}
Summary:        A data-centric parallel programming system
License:        ASL 2.0
Url:            http://legion.stanford.edu/
Source0:        https://github.com/StanfordLegion/legion/archive/%{name}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM - 229.patch -  add make test to cmake build system
Patch0:         https://patch-diff.githubusercontent.com/raw/StanfordLegion/legion/pull/229.patch
# PATCH-FIX-UPSTREAM - 232.patch - fix segfault on single thread systems 
Patch1:         https://patch-diff.githubusercontent.com/raw/StanfordLegion/legion/pull/232.patch

BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  hwloc-devel
BuildRequires:  gasnet-devel
BuildRequires:  cmake

%description
Legion is a data-centric parallel programming system for writing portable
high performance programs targeted at distributed heterogeneous architectures.
Legion presents abstractions which allow programmers to describe properties of
program data (e.g. independence, locality). By making the Legion programming
system aware of the structure of program data, it can automate many of the
tedious tasks programmers currently face, including correctly extracting task-
and data-level parallelism and moving data around complex memory hierarchies.
A novel mapping interface provides explicit programmer controlled placement of
data in the memory hierarchy and assignment of tasks to processors in a way that
is orthogonal to correctness, thereby enabling easy porting and tuning of Legion
applications to new architectures.

%package openmpi
Summary:        Legion Open MPI binaries and libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}
BuildRequires:  openmpi-devel

%description openmpi
Legion is a data-centric parallel programming system for writing portable
high performance programs targeted at distributed heterogeneous architectures.
Legion presents abstractions which allow programmers to describe properties of
program data (e.g. independence, locality). By making the Legion programming
system aware of the structure of program data, it can automate many of the
tedious tasks programmers currently face, including correctly extracting task-
and data-level parallelism and moving data around complex memory hierarchies.
A novel mapping interface provides explicit programmer controlled placement of
data in the memory hierarchy and assignment of tasks to processors in a way that
is orthogonal to correctness, thereby enabling easy porting and tuning of Legion
applications to new architectures.

Legion compiled with Open MPI, package incl. binaries and libraries

%package mpich
Summary:        Legion MPICH binaries and libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}
BuildRequires:  mpich-devel

%description mpich
Legion is a data-centric parallel programming system for writing portable
high performance programs targeted at distributed heterogeneous architectures.
Legion presents abstractions which allow programmers to describe properties of
program data (e.g. independence, locality). By making the Legion programming
system aware of the structure of program data, it can automate many of the
tedious tasks programmers currently face, including correctly extracting task-
and data-level parallelism and moving data around complex memory hierarchies.
A novel mapping interface provides explicit programmer controlled placement of
data in the memory hierarchy and assignment of tasks to processors in a way that
is orthogonal to correctness, thereby enabling easy porting and tuning of Legion
applications to new architectures.

Legion compiled with MPICH, package incl. binaries and libraries

%package devel
Summary:        Development headers and libraries for %{name} library
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       %{name}-openmpi%{?_isa} = %{version}
Requires:       %{name}-mpich%{?_isa} = %{version}
Requires:       mpich-devel
Requires:       openmpi-devel

%description devel
Legion is a data-centric parallel programming system for writing portable
high performance programs targeted at distributed heterogeneous architectures.
Legion presents abstractions which allow programmers to describe properties of
program data (e.g. independence, locality). By making the Legion programming
system aware of the structure of program data, it can automate many of the
tedious tasks programmers currently face, including correctly extracting task-
and data-level parallelism and moving data around complex memory hierarchies.
A novel mapping interface provides explicit programmer controlled placement of
data in the memory hierarchy and assignment of tasks to processors in a way that
is orthogonal to correctness, thereby enabling easy porting and tuning of Legion
applications to new architectures.

This package contains development headers and libraries for the legion library

%prep
%setup -q -n %{name}-%{name}-%{version}
%patch0 -p1
%patch1 -p1

%build
mkdir serial openmpi mpich

pushd serial
export LDFLAGS="%{__global_ldflags} -Wl,--as-needed"
%{cmake} .. -DLegion_USE_HWLOC=ON -DLegion_USE_GASNet=OFF -DLegion_BUILD_EXAMPLES=ON -DLegion_BUILD_TESTS=ON -DLegion_BUILD_TUTORIAL=ON \
  -DLegion_BUILD_TESTS=ON -DLegion_BUILD_TUTORIAL=ON -DLegion_ENABLE_TESTING=ON
%make_build
popd

pushd openmpi
%{_openmpi_load}
export LDFLAGS="%{__global_ldflags} -Wl,--as-needed"
%{cmake} .. -DLegion_USE_HWLOC=ON -DLegion_USE_GASNet=ON -DLegion_BUILD_EXAMPLES=ON -DCMAKE_INSTALL_LIBDIR=${MPI_LIB} -DGASNet_CONDUIT=mpi \
  -DGASNet_mpi-par_LIBRARY=${MPI_LIB}/libgasnet-mpi-par.so -DGASNet_gasnet_tools-par_LIBRARY=$MPI_LIB/libgasnet_tools-par.so -DGASNet_INCLUDE_DIR=$MPI_INCLUDE \
  -DLegion_BUILD_TESTS=ON -DLegion_BUILD_TUTORIAL=ON -DLegion_ENABLE_TESTING=ON
%make_build
%{_openmpi_unload}
popd

pushd mpich
%{_mpich_load}
export LDFLAGS="%{__global_ldflags} -Wl,--as-needed"
%{cmake} .. -DLegion_USE_HWLOC=ON -DLegion_USE_GASNet=ON -DLegion_BUILD_EXAMPLES=ON -DCMAKE_INSTALL_LIBDIR=${MPI_LIB} -DGASNet_CONDUIT=mpi \
  -DGASNet_mpi-par_LIBRARY=${MPI_LIB}/libgasnet-mpi-par.so -DGASNet_gasnet_tools-par_LIBRARY=$MPI_LIB/libgasnet_tools-par.so -DGASNet_INCLUDE_DIR=$MPI_INCLUDE \
  -DLegion_BUILD_TESTS=ON -DLegion_BUILD_TUTORIAL=ON -DLegion_ENABLE_TESTING=ON
%make_build
%{_mpich_unload}
popd

%install
%make_install -C serial
%{_openmpi_load}
%make_install -C openmpi
%{_openmpi_unload}
%{_mpich_load}
%make_install -C mpich
%{_mpich_unload}

%check
#some tests are broken on ppc64
#https://github.com/StanfordLegion/legion/issues/233
%ifarch ppc64
%define testargs ARGS='-V -E \\(ghost\\|ghost_pull\\|custom_mapper\\)'
%else
%define testargs ARGS='-V'
%endif

make -C serial test %{testargs}
%{_openmpi_load}
make -C openmpi test %{testargs}
%{_openmpi_unload}
%{_mpich_load}
make -C mpich test %{testargs}
%{_mpich_unload}

#move cmake files in a place where cmake can find them
mkdir -p %{buildroot}%{_libdir}/cmake
mv %{buildroot}{%{_datadir}/Legion,%{_libdir}/cmake/%{name}}

# MPI subpackages don't need the ldconfig magic.  They are hidden by
# default, in MPI back-end-specific directory, and only show to the
# user after the relevant environment module has been loaded.
# rpmlint will report that as errors, but it is fine.
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%doc README.md CHANGES.txt
%license LICENSE.txt
%{_libdir}/lib*.so.1

%files devel
%{_includedir}/*.h
%{_includedir}/*.inl
%{_includedir}/%{name}
%{_includedir}/mappers
%{_includedir}/realm
%{_libdir}/lib*.so
%{_libdir}/openmpi*/lib/lib*.so
%{_libdir}/mpich*/lib/lib*.so
%{_libdir}/cmake/%{name}

%files openmpi
%{_libdir}/openmpi*/lib/lib*.so.1

%files mpich
%{_libdir}/mpich*/lib/lib*.so.1

%changelog
* Mon Mar 13 2017 Christoph Junghans <junghans@votca.org> - 17.02.0-3
- Added 232.patch to fix segfault for test on 1 thread systems
- Disable some broken tests on ppc64

* Mon Mar 13 2017 Christoph Junghans <junghans@votca.org> - 17.02.0-2
- Added 229.patch to support "make check" in cmake
- Minor changes from review (bug #1382755)

* Fri Feb 24 2017 Christoph Junghans <junghans@votca.org> - 17.02.0-1
- initial import