Skip to content

Commit 811f6f6

Browse files
ChristosMatzorosChristos Konstantinos Matzorostonibohnlein
authored
Add spack module recipe for OneStopParallel (#18)
* Add spack module recipe for OneStopParallel * Update spack/package.py Co-authored-by: tonibohnlein <[email protected]> * python comment --------- Co-authored-by: Christos Konstantinos Matzoros <[email protected]> Co-authored-by: tonibohnlein <[email protected]>
1 parent 80a9ad6 commit 811f6f6

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

spack/package.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""
2+
Copyright 2024 Huawei Technologies Co., Ltd.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
@author Christos Matzoros, Toni Boehnlein, Pal Andras Papp, Raphael S. Steiner
17+
"""
18+
19+
from spack.package import *
20+
21+
22+
class Onestopparallel(CMakePackage):
23+
"""OneStopParallel (OSP): This project aims to develop scheduling algorithms
24+
for parallel computing systems based on the Bulk Synchronous Parallel (BSP) model.
25+
The algorithms optimize the allocation of tasks to processors, taking into
26+
account factors such as load balancing, memory constraints and communication overhead."""
27+
28+
homepage = "https://github.com/Algebraic-Programming/OneStopParallel"
29+
git = "https://github.com/Algebraic-Programming/OneStopParallel.git"
30+
31+
maintainers = ['cmatzoros']
32+
33+
version('master', branch='master')
34+
35+
# Dependencies
36+
depends_on('[email protected]:', type='build')
37+
depends_on('[email protected]:+graph+test', type=('build', 'link'))
38+
depends_on('[email protected]:', type=('build', 'link'))
39+
40+
41+
variant('openmp', default=True, description='Enable OpenMP support')
42+
43+
def cmake_args(self):
44+
args = []
45+
46+
# build the library version only
47+
args.append('-DCMAKE_BUILD_TYPE=Library')
48+
args.append('-DBUILD_TESTS=OFF')
49+
50+
if '+openmp' in self.spec:
51+
args.append('-DOSP_DEPENDS_ON_OPENMP=ON')
52+
else:
53+
args.append('-DOSP_DEPENDS_ON_OPENMP=OFF')
54+
55+
args.append('-DCMAKE_INSTALL_PREFIX={0}'.format(self.prefix))
56+
return args

0 commit comments

Comments
 (0)