Skip to content

Commit da431d4

Browse files
committed
build CPU benchmark during installation
1 parent 5b584bf commit da431d4

File tree

5 files changed

+72
-33
lines changed

5 files changed

+72
-33
lines changed

MANIFEST.in

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ graft wfcommons/wfchef/recipes/blast/microstructures
3939
graft wfcommons/wfchef/recipes/blast
4040
graft wfcommons/wfchef/recipes/bwa/microstructures/**
4141
graft wfcommons/wfchef/recipes/bwa/microstructures
42-
graft wfcommons/wfchef/recipes/bwa
42+
graft wfcommons/wfchef/recipes/bwa
43+
include Makefile
44+
include bin/cpu-benchmark.cpp

Makefile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Makefile
2+
3+
objects = bin/cpu-benchmark.o
4+
CXX= g++
5+
CPPFLAGS= -std=c++11
6+
execname = bin/cpu-benchmark
7+
8+
# compile
9+
$(execname): $(objects)
10+
$(CXX) $(CPPFLAGS) -o $(execname) $(objects)
11+
12+
#clean Makefile
13+
clean:
14+
rm -rf $(objects) $(execname)
15+
16+
17+
# #define variables
18+
# objects= gpu-benchmark.o kernels.o
19+
# NVCC= nvcc #cuda c compiler
20+
# CPPFLAGS= -std=c++11
21+
# opt= -O2 #optimization flag
22+
# LIBS=
23+
# execname= gpu-benchmark
24+
25+
# .PHONY: clean
26+
27+
# #compile
28+
# $(execname): $(objects)
29+
# $(NVCC) $(CPPFLAGS) $(opt) -o $(execname) $(objects) $(LIBS)
30+
31+
# kernels.o: kernels.cu
32+
# $(NVCC) $(CPPFLAGS) $(opt) -c kernels.cu
33+
# gpu-benchmark.o: gpu-benchmark.cu
34+
# $(NVCC) $(CPPFLAGS) $(opt) -c gpu-benchmark.cu
35+
36+
37+
# #clean Makefile
38+
# clean:
39+
# rm $(objects)
40+
# #end of Makefile

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
This Python package provides a collection of tools for:
1212

1313
- Analyzing instances of actual workflow executions;
14-
- Producing recipes structures for creating workflow recipes for workflow generation; and
15-
- Generating synthetic realistic workflow instances.
14+
- Producing recipes structures for creating workflow recipes for workflow generation;
15+
- Generating synthetic realistic workflow instances; and
16+
- Generating realistic workflow benchmark specifications.
1617

1718
[![Open In Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/wfcommons/wfcommons/tree/feature/wfperf)
1819

1920
## Installation
2021

2122
WfCommons is available on [PyPI](https://pypi.org/project/wfcommons).
22-
WfCommons requires Python3.6+ and has been tested on Linux and macOS.
23+
WfCommons requires Python3.7+ and has been tested on Linux and macOS.
2324

2425
### Installation using pip
2526

bin/Makefile

-25
This file was deleted.

setup.py

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2020-2021 The WfCommons Team.
4+
# Copyright (c) 2020-2023 The WfCommons Team.
55
#
66
# This program is free software: you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
88
# the Free Software Foundation, either version 3 of the License, or
99
# (at your option) any later version.
1010

11+
import sys
12+
import subprocess
13+
1114
from setuptools import setup, find_packages
15+
from setuptools.command.build_ext import build_ext
16+
17+
18+
class Build(build_ext):
19+
"""Customized setuptools build command - builds protos on build."""
20+
21+
def run(self):
22+
protoc_command = ["make"]
23+
if subprocess.call(protoc_command) != 0:
24+
sys.exit(-1)
25+
super().run()
26+
1227

1328
with open('README.md', 'r') as fh:
1429
long_description = fh.read()
@@ -28,6 +43,10 @@
2843
url='https://github.com/wfcommons/wfcommons',
2944
packages=find_packages(),
3045
include_package_data=True,
46+
has_ext_modules=lambda: True,
47+
cmdclass={
48+
'build_ext': Build,
49+
},
3150
install_requires=[
3251
'jsonschema',
3352
'matplotlib',
@@ -48,19 +67,21 @@
4867
'Programming Language :: Python :: 3.7',
4968
'Programming Language :: Python :: 3.8',
5069
'Programming Language :: Python :: 3.9',
51-
'Programming Language :: Python :: 3.10',
70+
'Programming Language :: Python :: 3.10',
5271
'Intended Audience :: Developers',
5372
'Intended Audience :: Education',
5473
'Intended Audience :: Science/Research',
5574
'Natural Language :: English',
5675
'Topic :: Documentation :: Sphinx',
5776
'Topic :: System :: Distributed Computing'
5877
],
59-
python_requires='>=3.6',
78+
python_requires='>=3.7',
79+
data_files=[
80+
('bin', ['bin/cpu-benchmark'])
81+
],
6082
entry_points={
6183
'console_scripts': [
6284
'wfchef=wfcommons.wfchef.chef:main'
63-
6485
],
6586
'workflow_recipes': [
6687
'epigenomics_recipe = wfcommons.wfchef.recipes:EpigenomicsRecipe',

0 commit comments

Comments
 (0)