blob: 7227a9dbf2ee8b4c9d7bd610ae99c571277939cd (
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
|
Name: heffte
Version: 2.4.1
%global sover 2
Release: 1%{?dist}
Summary: Highly Efficient FFT for Exascale
License: BSD-3-Clause
URL: https://icl.utk.edu/fft/
Source0: https://github.com/icl-utk-edu/heffte/archive/v%{version}/%{name}-%{version}.tar.gz
# no openmpi on ix86
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
# mpi is broken on s390x see, bug #2322073
ExcludeArch: %{ix86} s390x
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: cmake >= 3.16
BuildRequires: doxygen
BuildRequires: openmpi-devel
BuildRequires: mpich-devel
BuildRequires: fftw-devel
BuildRequires: environment-modules
%global heffte_desc \
The Highly Efficient FFT for Exascale (heFFTe) library is being developed \
as part of the Exascale Computing Project (ECP). HeFFTe delivers algorithms \
for distributed fast-Fourier transforms in on a heterogeneous systems, \
targeting the upcoming exascale machines.
%description
%{heffte_desc}
%package openmpi
Summary: Openmpi libraries for %{name}
%description openmpi
%{heffte_desc}
This package contains %{name} libraries compiled with openmpi.
%package openmpi-devel
Summary: Openmpi development headers and libraries for %{name}
Requires: %{name}-openmpi%{?_isa} = %{version}-%{release}
Requires: openmpi-devel
%description openmpi-devel
%{heffte_desc}
This package contains openmpi development files of %{name}.
%package mpich
Summary: Mpich libraries for %{name}
%description mpich
%{heffte_desc}
This package contains %{name} libraries compiled with mpich.
%package mpich-devel
Summary: Mpich development headers and libraries for %{name}
Requires: %{name}-mpich%{?_isa} = %{version}-%{release}
Requires: mpich-devel
%description mpich-devel
%{heffte_desc}
This package contains mpich development files of %{name}.
%package examples
Summary: Example file for %{name}
Requires: (%{name}-openmpi-devel = %{version} or %{name}-mpich-devel = %{version})
BuildArch: noarch
%description examples
%{heffte_desc}
This package contains example files for %{name}.
%package doc
Summary: Documentation for %{name}
Requires: (%{name}-openmpi-devel = %{version} or %{name}-mpich-devel = %{version})
BuildArch: noarch
%description doc
%{heffte_desc}
This package contains documentation for %{name}.
%prep
%autosetup -p1
%build
source /etc/profile.d/modules.sh
mkdir -p %{_target_platform}-${mpi} && cd %{_target_platform}-${mpi}
export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe
for mpi in mpich openmpi; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
%cmake .. \
-DHeffte_ENABLE_FFTW=ON \
-DHeffte_ENABLE_FORTRAN=ON \
-DHeffte_ENABLE_TESTING=ON \
-DHeffte_ENABLE_DOXYGEN=ON \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DHeffte_SEQUENTIAL_TESTING=ON \
-DCMAKE_INSTALL_LIBDIR=${MPI_LIB:-%{_libdir}} \
-DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE:-%{_includedir}} \
%{nil}
%make_build
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
%install
for mpi in mpich openmpi; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
%make_install -C %{_target_platform}-${mpi}
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
# files for testing install are not useful to package
rm -rf %{buildroot}%{_datadir}/%{name}/testing
%check
# allow openmpi to oversubscribe, i.e. runs test with more
# cores than the builder has
export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe
for mpi in mpich openmpi; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
%ctest %{?testargs} -C %{_target_platform}-${mpi}
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
%files openmpi
%doc README.md
%license LICENSE
%{_libdir}/openmpi*/lib/lib%{name}*.so.%{version}
%files openmpi-devel
%{_includedir}/openmpi*/%{name}*
%dir %{_includedir}/openmpi*/stock_fft
%{_includedir}/openmpi*/stock_fft/*.h
%{_libdir}/openmpi*/lib/cmake/Heffte
%{_libdir}/openmpi*/lib/lib%{name}*.so
%{_libdir}/openmpi*/lib/lib%{name}*.so.%{sover}
%files mpich
%doc README.md
%license LICENSE
%{_libdir}/mpich*/lib/lib%{name}*.so.%{version}
%files mpich-devel
%{_includedir}/mpich*/%{name}*
%dir %{_includedir}/mpich*/stock_fft
%{_includedir}/mpich*/stock_fft/*.h
%{_libdir}/mpich*/lib/cmake/Heffte
%{_libdir}/mpich*/lib/lib%{name}*.so
%{_libdir}/mpich*/lib/lib%{name}*.so.%{sover}
%files examples
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/examples
%{_datadir}/%{name}/HeffteMakefile.in
%files doc
%{_datadir}/%{name}/docs
%changelog
* Tue Dec 12 2024 张天宇 <zhangtianyu@iscas.ac.cn> - 2.4.1-1
- Initial package
|