forked from geopm/geopm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeopm-ohpc.spec.in
176 lines (153 loc) · 7.14 KB
/
geopm-ohpc.spec.in
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
# Copyright (c) 2015, 2016, 2017, 2018, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#----------------------------------------------------------------------------bh-
# This RPM .spec file is part of the OpenHPC project.
#
# It may have been modified from the default version supplied by the underlying
# release package (if available) in order to apply patches, perform customized
# build/install configurations, and supply additional files to support
# desired integration conventions.
#
#----------------------------------------------------------------------------eh-
#
# geopm - Global Extensible Open Power Manager
#
# Build that is is dependent on compiler toolchain and MPI
%define ohpc_compiler_dependent 1
%define ohpc_mpi_dependent 1
%include %{_sourcedir}/OHPC_macros
# Base package name
%define pname geopm
%define PNAME GEOPM
# Install paths
%define docdir %{OHPC_PUB}/doc/contrib/%{pname}-%{compiler_family}-%{mpi_family}-%{version}
%define install_path %{OHPC_LIBS}/%{compiler_family}/%{mpi_family}/%{pname}/%version
Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
Summary: Global Extensible Open Power Manager
Version: @VERSION@
Release: 1
License: BSD-3-Clause
Group: %{PROJ_NAME}/parallel-libs
Vendor: Intel Corporation
URL: http://geopm.github.io
Source0: geopm-%{version}.tar.gz
Source1: OHPC_macros
BuildRoot: %{_tmppath}/%{pname}-%{version}-%{release}-root
DocDir: %{OHPC_PUB}/doc/contrib
Prefix: %{_prefix}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: hwloc-devel
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: ohpc-buildroot
BuildRequires: python
BuildRequires: python-devel
BuildRequires: unzip
%if 0%{?suse_version} >= 1320
BuildRequires: openssh
%endif
%description
Global Extensible Open Power Manager (GEOPM) is an extensible power
management framework targeting high performance computing. The library can be
extended to support new control algorithms and new hardware power management
features. The GEOPM package provides built in features ranging from static
management of power policy for each individual compute node, to dynamic
coordination of power policy and performance across all of the compute nodes
hosting one MPI job on a portion of a distributed computing system. The
dynamic coordination is implemented as a hierarchical control system for
scalable communication and decentralized control. The hierarchical control
system can optimize for various objective functions including maximizing
global application performance within a power bound. The root of the control
hierarchy tree can communicate through shared memory with the system resource
management daemon to extend the hierarchy above the individual MPI job level
and enable management of system power resources for multiple MPI jobs and
multiple users by the system resource manager. The GEOPM package provides the
libgeopm library, the libgeopmpolicy library, the geopmctl application and the
geopmpolicy application. The libgeopm library can be called within MPI
applications to enable application feedback for informing the control
decisions. If modification of the target application is not desired then the
geopmctl application can be run concurrently with the target application. In
this case, target application feedback is inferred by querying the hardware
through Model Specific Registers (MSRs). With either method (libgeopm or
geopmctl), the control hierarchy tree writes processor power policy through
MSRs to enact policy decisions. The libgeopmpolicy library is used by a
resource manager to set energy policy control parameters for MPI jobs. Some
features of libgeopmpolicy are available through the geopmpolicy application
including support for static control.
%prep
%setup -q -n %{pname}-%{version}
%build
%ohpc_setup_compiler
test -f configure || ./autogen.sh
./configure --prefix=%{install_path} \
--disable-fortran --disable-doc \
|| ( cat config.log && false )
%{__make}
%install
%ohpc_setup_compiler
%{__make} DESTDIR=%{buildroot} install
rm -f $(find %{buildroot}/%{install_path} -name '*.a'; \
find %{buildroot}/%{install_path} -name '*.la'; \
find %{buildroot}/%{install_path} -name 'geopm_launcher.1*')
# Module file
# OpenHPC module file
%{__mkdir_p} %{buildroot}%{OHPC_MODULEDEPS}/%{compiler_family}-%{mpi_family}/%{pname}
%{__cat} << EOF > %{buildroot}/%{OHPC_MODULEDEPS}/%{compiler_family}-%{mpi_family}/%{pname}/%{version}
#%Module1.0#####################################################################
proc ModulesHelp { } {
puts stderr " "
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler"
puts stderr "toolchain and the %{mpi_family} MPI stack."
puts stderr "\nVersion %{version}\n"
}
module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family} MPI"
module-whatis "Version: %{version}"
module-whatis "Category: runtime"
module-whatis "Description: %{summary}"
module-whatis "URL %{url}"
set version %{version}
prepend-path PATH %{install_path}/bin
prepend-path PYTHONPATH %{install_path}/lib/python2.7/site-packages
prepend-path INCLUDE %{install_path}/include
prepend-path LD_LIBRARY_PATH %{install_path}/lib
prepend-path MANPATH %{install_path}/share/man
setenv %{PNAME}_DIR %{install_path}
setenv %{PNAME}_BIN %{install_path}/bin
setenv %{PNAME}_LIB %{install_path}/lib
setenv %{PNAME}_INC %{install_path}/include
EOF
%files
%defattr(-,root,root,-)
%{OHPC_PUB}
%doc README COPYING VERSION
%changelog
@CHANGELOG@