Skip to content

Commit 4ff90d0

Browse files
authored
Merge branch 'master' into disk-backed-ring
2 parents 772acd2 + 1681fde commit 4ff90d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1066
-376
lines changed

.lgtm.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
extraction:
2+
cpp:
3+
prepare:
4+
packages:
5+
- exuberant-ctags
6+
before_index:
7+
- export NOCUDA=1
8+
index:
9+
build_command:
10+
- make -e libbifrost

.travis.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
sudo: required
1+
dist: bionic
2+
3+
dist: bionic
24

35
language: python
46

@@ -14,8 +16,10 @@ services:
1416

1517
addons:
1618
apt:
19+
update: true
1720
packages:
1821
- build-essential
22+
- ca-certificates
1923
- curl
2024
- git
2125
- pkg-config
@@ -32,6 +36,9 @@ jobs:
3236
- make docker-cpu
3337
- make docker
3438
- bash ./.travis_deploy_docs.sh
39+
allow_failures:
40+
- python: 2.7
41+
- python: pypy2.7-6.0
3542

3643
script:
3744
- sudo pip --no-cache-dir install \

CHANGELOG

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
0.9.1
2+
* Fixed a problem with like_bmon.py crashing when there are a large number of pipelines
3+
* Added a CHANGELOG file
4+
* Added a lightweight telemetry client for the Python API
5+
6+
0.9.0
7+
* Added support for Python3
8+
* Migrate from getopt to argparse for the scripts in tools
9+
* Improve the test suite coverage
10+
* Fixed a problem with proclog cleanup on multi-user systems
11+
* Added a new bifrost.romein module for gridding data
12+
13+
0.8.0
14+
* Switched from PyCLibrary to ctypesgen for Python bindings
15+
* Added tutorials for bifrost.map and bifrost.views to the documentation
16+
* Switched to pretty print for bifrost.blocks.print_header
17+
* Added new benchmarking tests
18+
19+
0.7.0
20+
* Initial release

README.md

+55-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Bifrost
22

3-
| **`CPU build`** | **`Coverage`** |
4-
|----------------------|----------------------|
5-
|[![Travis](https://travis-ci.org/ledatelescope/bifrost.svg?branch=master)](https://travis-ci.org/ledatelescope/bifrost) | [![Coverage Status](https://coveralls.io/repos/github/ledatelescope/bifrost/badge.svg)](https://coveralls.io/github/ledatelescope/bifrost) |
3+
| **`CPU Build`** | **`GPU Build`** | **`Coverage`** |
4+
|-----------------|-----------------|----------------|
5+
|[![Travis](https://travis-ci.com/ledatelescope/bifrost.svg?branch=master)](https://travis-ci.com/ledatelescope/bifrost) | [![Build Status](https://fornax.phys.unm.edu/jenkins/buildStatus/icon?job=Bifrost)](https://fornax.phys.unm.edu/jenkins/job/Bifrost/) | [![Coverage Status](https://coveralls.io/repos/github/ledatelescope/bifrost/badge.svg)](https://coveralls.io/github/ledatelescope/bifrost) |
66

77
A stream processing framework for high-throughput applications.
88

@@ -11,7 +11,7 @@ A stream processing framework for high-throughput applications.
1111
### [Bifrost Documentation](http://ledatelescope.github.io/bifrost/)
1212
### [Bifrost Roadmap](ROADMAP.md)
1313

14-
## A simple pipeline
14+
## A Simple Pipeline
1515

1616
Here's a snippet that reads Sigproc filterbank files, applies a
1717
Fast Dispersion Measure Transform (FDMT) on the GPU, and writes
@@ -36,7 +36,7 @@ bf.get_default_pipeline().run()
3636
print "All done"
3737
```
3838

39-
## A more complex pipeline
39+
## A More Complex Pipeline
4040

4141
Below is a longer snippet that demonstrates some additional features
4242
of Bifrost pipelines, including the BlockChainer tool, block scopes,
@@ -73,7 +73,7 @@ pipeline.run()
7373
print "All done"
7474
```
7575

76-
## Feature overview
76+
## Feature Overview
7777

7878
- Designed for sustained high-throughput stream processing
7979
- Python API wraps fast C++/CUDA backend
@@ -87,11 +87,11 @@ print "All done"
8787

8888
## Installation
8989

90-
### C dependencies
90+
### C Dependencies
9191

9292
$ sudo apt-get install exuberant-ctags
9393

94-
### Python dependencies
94+
### Python Dependencies
9595

9696
* numpy
9797
* contextlib2
@@ -102,7 +102,7 @@ print "All done"
102102
$ sudo pip install numpy contextlib2 pint git+https://github.com/olsonse/ctypesgen.git@9bd2d249aa4011c6383a10890ec6f203d7b7990f
103103
```
104104

105-
### Bifrost installation
105+
### Bifrost Installation
106106

107107
Edit **user.mk** to suit your system, then run:
108108

@@ -116,7 +116,7 @@ You can call the following for a local Python installation:
116116

117117
$ sudo make install PYINSTALLFLAGS="--prefix=$HOME/usr/local"
118118

119-
### Docker container
119+
### Docker Container
120120

121121
Install dependencies:
122122

@@ -136,7 +136,7 @@ For CPU-only builds:
136136
$ make docker-cpu
137137
$ docker run --rm -it ledatelescope/bifrost
138138

139-
### Running tests
139+
### Running Tests
140140

141141
To run all CPU and GPU tests:
142142

@@ -146,7 +146,7 @@ To run all CPU and GPU tests:
146146

147147
### [Online Bifrost Documentation](http://ledatelescope.github.io/bifrost/)
148148

149-
### Building the docs with Docker
149+
### Building the Docs with Docker
150150

151151
To quickly build the docs using Docker, ensure that you have
152152
built a Bifrost container as `ledatelescope/bifrost`.
@@ -156,7 +156,7 @@ run it, and have it complete the docs-building process for you,
156156
outputting the entire html documentation inside `docs/html` on
157157
your machine.
158158

159-
### Building the docs from scratch
159+
### Building the Docs from Scratch
160160

161161
Install sphinx and breathe using pip, and also install Doxygen.
162162

@@ -171,6 +171,48 @@ by running
171171

172172
inside the /docs directory.
173173

174+
## Telemetry
175+
176+
By default Bifrost installs with basic Python telemetry enabled in
177+
order to help inform how the software is used and to help inform future
178+
development. The data collected as part of this consist seven things:
179+
* a timestamp for when the report is generated,
180+
* a unique installation identifier,
181+
* the Bifrost version being used,
182+
* the execution time of the Python process that imports Bifrost,
183+
* which Bifrost modules are imported,
184+
* which Bifrost functions are used and their average execution times, and
185+
* which Bifrost scripts are used.
186+
These data are sent to the Bifrost developers using a HTTP POST request where
187+
they are aggregated.
188+
189+
Users can opt out of telemetry collection using:
190+
191+
```python
192+
from bifrost import telemetry
193+
telemetry.disable()
194+
```
195+
196+
or by using the included `bifrost_telemetry.py` script:
197+
198+
```
199+
python bifrost_telemetry.py --disable
200+
```
201+
202+
This command will set a disk-based flag that disables the reporting process.
203+
204+
## Acknowledgement
205+
206+
If you make use of Bifrost as part of your data collection or analysis please
207+
include the following acknowledgement in your publications:
208+
209+
> This research has made use of Bifrost (Cranmer et al. 2017). Continued
210+
> development of Bifrost is supported by NSF award OAC/2103707.
211+
212+
and cite:
213+
214+
> \bibitem[Cranmer et al.(2017)]{2017JAI.....650007C} Cranmer, M.~D., Barsdell, B.~R., Price, D.~C., et al.\ 2017, Journal of Astronomical Instrumentation, 6, 1750007. doi:10.1142/S2251171717500076
215+
174216
## Contributors
175217

176218
* Ben Barsdell

python/bifrost/DataType.py

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
from bifrost.libbifrost import _bf
5050
import numpy as np
5151

52+
from bifrost import telemetry
53+
telemetry.track_module()
54+
5255
# Custom dtypes to represent additional complex types
5356
# Note: These can be constructed using tuples
5457
# E.g., np.ndarray([(0x10,), (0x32,)], dtype=ci4) # Special case

python/bifrost/GPUArray.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
2+
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
33
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
44
#
55
# Redistribution and use in source and binary forms, with or without
@@ -26,12 +26,13 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
import ctypes
3029
import numpy as np
3130
from bifrost.memory import raw_malloc, raw_free, memset, memcpy, memcpy2D
32-
from bifrost.libbifrost import _bf, _check, _string2space
3331
from bifrost.array import _array2bifrost # This doesn't exist!
3432

33+
from bifrost import telemetry
34+
telemetry.track_module()
35+
3536
class GPUArray(object):
3637
def __init__(self, shape, dtype, buffer=None, offset=0, strides=None):
3738
itemsize = dtype().itemsize

python/bifrost/Space.py

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
from bifrost.libbifrost import _bf
2929

30+
from bifrost import telemetry
31+
telemetry.track_module()
32+
3033
SPACEMAP_TO_STR = {_bf.BF_SPACE_AUTO: 'auto',
3134
_bf.BF_SPACE_SYSTEM: 'system',
3235
_bf.BF_SPACE_MAPPED: 'mapped',

python/bifrost/addon/leda/bandfiles.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
sys.path.append('..')
3232
import make_header
3333

34+
from bifrost import telemetry
35+
telemetry.track_module()
36+
3437
disk_names = [ "ledastorage", "longterm", "offsite", "data" ]
3538
ledaovro_names = [ "ledaovro1", "ledaovro2", "ledaovro3", "ledaovro4", "ledaovro5", "ledaovro6", "ledaovro7", "ledaovro8", "ledaovro9", "ledaovro10", "ledaovro11","ledaovro12" ]
3639
data_names = [ "data1", "data2" ]
@@ -197,4 +200,3 @@ def has_freq(self, frequencies):
197200
for f in self.files:
198201
if f.freq in frequencies: has.append(f.freq)
199202
return has
200-

python/bifrost/addon/leda/blocks.py

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
import numpy as np
4343
from bifrost import block
4444

45+
from bifrost import telemetry
46+
telemetry.track_module()
4547

4648
# Read a collection of DADA files and form an array of time series data over
4749
# many frequencies.

0 commit comments

Comments
 (0)