-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Along with adding coverage to CI, add more tests to increase coverage. Remove dependence on dashmap in favour of using parking_lot directly. Dashmap could in rare cases cause a deadlock. Improve the CUDA de-duplication code. Use Rust 2021 edition. Update dependency versions and adjust the code accordingly. Rename the GitHub workflow file extensions. Add a changelog.
- Loading branch information
Showing
21 changed files
with
1,147 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | ||
|
||
on: [push, pull_request] | ||
|
||
name: Generate Coverage report | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
container: mwatelescope/birli:latest | ||
environment: CI | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install nightly toolchain | ||
run: | | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal | ||
export PATH="${HOME}/.cargo/bin:${PATH}" | ||
rustup toolchain install nightly --component llvm-tools-preview | ||
rustup default nightly | ||
- name: Install system and Cargo Packages | ||
run: | | ||
export PATH="${HOME}/.cargo/bin:${PATH}" | ||
apt-get update | ||
apt-get install -y lcov clang curl zip unzip libssl-dev jq libhdf5-dev liberfa-dev | ||
cargo update | ||
cargo install --force cargo-make cargo-binutils grcov | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
- name: Get the HDF5 file | ||
run: curl http://ws.mwatelescope.org/static/mwa_full_embedded_element_pattern.h5 -o mwa_full_embedded_element_pattern.h5 | ||
|
||
- name: Generate test lcov coverage into coverage/ dir | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib/ | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" | ||
RUSTDOCFLAGS: "-Cpanic=abort" | ||
LLVM_PROFILE_FILE: json5format-%m.profraw | ||
MWA_BEAM_FILE: mwa_full_embedded_element_pattern.h5 | ||
run: | | ||
mkdir -p coverage | ||
export PATH="${HOME}/.cargo/bin:${PATH}" | ||
cargo build | ||
cargo test | ||
zip -0 ccov.zip `find . \( -name "mwa_hyperbeam*.gc*" \) -print` | ||
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" --ignore src/jones_test.rs --excl-br-line "^.*((debug_)?assert(_eq|_ne|_abs_diff_(eq|ne))?!|#\[derive\()" -o coverage/coverage.lcov | ||
- name: Upload reports to codecov.io | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic | ||
Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.4.0] - 2021-10-14 | ||
### Added | ||
- FEE beam code for CUDA | ||
- The original code is courtesy of Cristian Di Pietrantonio and Maciej | ||
Cytowski on behalf of the Pawsey Supercomputing Centre. | ||
- CHJ modified it to be easily called from Rust. | ||
- It is is possible to run the code in single- or double-precision (Cargo | ||
features "cuda-single" and "cuda", respectively). This is important because | ||
most NVIDIA desktop GPUs have significantly less double-precision compute | ||
capability. | ||
- There are examples of using the CUDA functionality from Rust, C and Python. | ||
- Parallactic angle correction | ||
- Jack Line did a thorough investigation of what our beam responses should be; | ||
the write up is | ||
[here](https://github.com/JLBLine/polarisation_tests_for_FEE). | ||
- New Rust functions are provided (`*_eng*` for "engineering") to get the | ||
old-style beam responses. The existing functions do the corrections by | ||
default. | ||
- A binary `verify-beam-file` | ||
- (In theory) verifies that an HDF5 FEE beam file has sensible contents. | ||
- The only way that standard beam calculations can fail is if the spherical | ||
harmonic coefficients are nonsensical, so this binary is an attempt to | ||
ensure that the files used are sensible. | ||
|
||
### Changed | ||
- Rust API | ||
- `calc_jones*_array` functions now return a `Vec`, not an `Array1`. | ||
- Rust internals | ||
- Small optimisations. | ||
- Small documentation clean ups. | ||
- C API | ||
- The caller must now specify if they want the parallactic angle correction. | ||
- All functions that can fail return an error code. If this is non-zero, the | ||
function failed. | ||
- The caller can also provide error strings to these fallible functions; in | ||
the event of failure, an error message is written to the string. | ||
- The example C files have been modified to conform with these changes. | ||
- Python API | ||
- The caller must now specify if they want the parallactic angle correction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.