Skip to content

Commit

Permalink
Overhaul source list code.
Browse files Browse the repository at this point in the history
This commit breaks two crates out of hyperdrive: mwa_hyperdrive_core and
mwa_hyperdrive_srclist. Doing this means that core and srclist code can
be used elsewhere without all the dependencies of
hyperdrive (particularly CUDA). A tool "srclist" is also provided by the
srclist crate to handle source list verification and conversion.

Stop using nom to parse source lists. nom is nice, but complicated, and
hard to make good error messages around. The new approach is more error
prone, but is hopefully working well with a large number of tests.

Add support for Gaussian and Shapelet sources. Note that the existing
simulate-vis code won't use these sources correctly, but no one should
be using that code (it will be removed or updated at a later stage).

Add power law and curved power law source component types.

Add and/or update README files.

Provide GitHub workflows to run tests and provide a statically-compiled
srclist binary.

Attempt to make the module-level documentation style consistent across
all files.

With the new core crate, I've moved some code out of mongoose, so
mongoose can depend on core.

Static linking. I've discovered that the current version of
pkg-config-rs is too restrictive when attempting to statically
link (rust-lang/pkg-config-rs#102). Statically
linking elements of hyperdrive should now be more predictable. I've also
made mwalib export its usage of fitsio and fitsio-sys, so that these
don't need to be explicit dependencies of mwalib users, and statically
linking cfitsio is also more predictable.
  • Loading branch information
cjordan committed Nov 1, 2020
1 parent 6b4a463 commit 1187c04
Show file tree
Hide file tree
Showing 95 changed files with 5,331 additions and 1,594 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/run-tests.yaml
@@ -0,0 +1,30 @@
name: Run tests

# Do this on every push
on: [push]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-18.04
container: nvidia/cuda:11.1-base
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
apt update -y
DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
apt install -y pkg-config curl git gcc llvm libclang-dev cuda-nvcc-11-1 libcfitsio-dev liberfa-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. $HOME/.cargo/env
rustup update stable --no-self-update && rustup default stable
rustup target add x86_64-unknown-linux-gnu
- name: Run tests
run: |
. $HOME/.cargo/env
HYPERDRIVE_CUDA_COMPUTE=75 cargo test

0 comments on commit 1187c04

Please sign in to comment.