Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
5d55c04
Updating gpu port attempt
May 4, 2026
9dd7188
Updating more gpu module
May 4, 2026
9cb2105
more gpu
May 4, 2026
4b7ea9f
typos
oshaughn May 4, 2026
43e88a6
debugging with cld
May 4, 2026
bb790cd
integrators, precision, CI: portable RiftFloat + py3.12/numpy2.x lane
May 4, 2026
0035798
Add distance-grid likelihood export demo
oshaughn May 26, 2026
a703d5c
lalsimutils: revert change (breaks; note this is the point where swig…
oshaughn May 26, 2026
f40951e
clean up incomplete work by codex - sigh
oshaughn May 26, 2026
d752b98
more backfill of dumb codex
oshaughn May 26, 2026
2908b1e
Add pixi SWIG compatibility environments
oshaughn May 26, 2026
676b091
Merge branch 'rift_O4d_pixi_safe_swig' into rift_O4d_junior_distance
oshaughn May 26, 2026
eb7c37d
pixi.toml: work around issue with np version
oshaughnessy-junior May 26, 2026
106749f
distance-grid: export pure likelihood, fix GMM sampler path, pin LAL env
oshaughn May 28, 2026
83467c6
distance-slice (Plan B): per-intrinsic K-fixed-d marginal exports
oshaughn May 28, 2026
224b543
distance-slice: hybrid core (reweight) + wings (fresh) per intrinsic
oshaughn May 29, 2026
53bb1a1
distance-slice: breadcrumb next-session work into PLAN_B_DESIGN
oshaughn May 29, 2026
7b20ba0
distance-slice: absolute-lnL skip cut + parabolic wing placement
oshaughn May 29, 2026
6146592
distance-export: thread Plan-A grid + Plan-B slices through the pipel…
oshaughn May 29, 2026
69b61f2
distance-slice: mark workflow-integration step 1 (pipeline threading)…
oshaughn May 29, 2026
5c95452
distance-export: disable distance marginalization only at the extrins…
oshaughn May 29, 2026
618640a
distance-slice: clarify in PLAN_B_DESIGN that distance marginalizatio…
oshaughn May 29, 2026
bc2358d
distance-export: .dgrid/.dslice consolidation + end-to-end posterior …
oshaughn May 29, 2026
6f216a0
distance-slice: mark workflow-integration step 2 (consolidation) done…
oshaughn May 29, 2026
1beda42
subdags pipeline: fix AlternateIteration cip_args_list parsing + add …
oshaughn May 29, 2026
f44c7a8
integrators: make GPU (cupy) path actually run on old + current cupy
oshaughn May 29, 2026
d83de88
Merge remote-tracking branch 'junior/rift_O4d_junior_distance' into r…
oshaughn May 29, 2026
4a75221
Merge branch 'rift_O4d_junior_distance' into rift_O4d_gmm_gpu
oshaughn May 29, 2026
ca34b54
containers: add container-family deployment + multi-target build + CI…
oshaughn May 29, 2026
f04cc2e
containers: record real-pool validation results in README
oshaughn May 29, 2026
a832f63
docs: add container family + multi-arch deployment guide
oshaughn May 29, 2026
e94462a
containers: stage requirements file via %files (fix build path error)
oshaughn May 29, 2026
6a62b38
containers: work around proot seccomp failure on unprivileged apptain…
oshaughn May 29, 2026
58c8ae6
containers: add --fakeroot/--sandbox build modes (real fix for proot/…
oshaughn May 29, 2026
4579235
containers: document the consistent-SINGULARITY_BASE_EXE_DIR family r…
oshaughn May 29, 2026
8ae026f
calmarg: in-loop calibration marginalization (Option B) in ILE GPU li…
oshaughn May 29, 2026
36a9fea
calmarg: add backtest harness (methods registry + Option C stub + phy…
oshaughn May 29, 2026
da93a03
calmarg: Option C fused CUDA kernel for in-loop cal marginalization (…
oshaughn May 29, 2026
cb14960
calmarg: extend backtest harness to multiple detectors
oshaughn May 29, 2026
3f75698
calmarg: Option C stage 2 -- fused distmarg kernel (separate kernel +…
oshaughn May 29, 2026
407abdc
calmarg: wire ILE driver to fused kernel behind --calibration-fused-k…
oshaughn May 29, 2026
ed9a211
calmarg: fix scalar invDist in fused path; backtest against real dist…
oshaughn May 29, 2026
7896c52
calmarg: document end-to-end driver test + invDist fix in design doc
oshaughn May 29, 2026
8a35b3e
calmarg: pipe sugar + demo/rift/calmarg (3-IFO in-loop calibration ma…
oshaughn May 29, 2026
c93ad76
calmarg: guard fused kernels vs out-of-range offsets; demo defaults t…
oshaughn May 29, 2026
54636dd
calmarg: guard shared Q_inner_product kernel vs out-of-range time off…
oshaughn May 29, 2026
7290a97
calmarg: confine the window to its realization block (fix block-bleed…
oshaughn May 30, 2026
5537551
calmarg: per-realization importance weights (Phase 0 for adaptive cal…
oshaughn May 30, 2026
e266fc0
calmarg demo: fix compare_lnL column (lnL is [-4], not neff [-1]); ad…
oshaughn May 30, 2026
f780c40
calmarg demo: analyze the injection as the template (signal present)
oshaughn May 30, 2026
166744f
calmarg demo: document extrinsic-sampler convergence caveat for singl…
oshaughn May 30, 2026
5aabdea
calmarg: CPU/numpy backend for the fused path (no CUDA needed)
oshaughn May 30, 2026
9b35911
calmarg: non-distmarg + CPU coverage for the fused path (review matrix)
oshaughn May 30, 2026
1bedebd
calmarg: FIX time alignment -- calmarg rholms had the wrong epoch (si…
oshaughn May 30, 2026
e34f261
calmarg: regression test for precompute time alignment (catches the e…
oshaughn May 30, 2026
a2d20eb
calmarg: export cal-marginalized lnL(t) timeseries for time resampling
oshaughn May 30, 2026
999faba
calmarg: phase marginalization for the fused kernels (+ driver wiring…
oshaughn May 30, 2026
e13f09f
calmarg: adaptive cal sampling Phase 1 (tempered Gaussian proposal in…
oshaughn May 30, 2026
7a1ae11
calmarg: timing-scan tool + adaptive-driver plan
oshaughn May 30, 2026
121b625
calmarg: fix importance-weight normalization (unbiased log(n_cal)) + …
oshaughn May 30, 2026
4f8f24c
calmarg pilot/seed substrate: ILE flags + node-space realizations + f…
oshaughn May 30, 2026
74ed87d
calmarg adaptive driver: DAG wiring for the parallel cal pilot (Optio…
oshaughn May 30, 2026
0b74e00
calmarg DAG: fix write_calpilot_sub module + add local-condor DAG tes…
oshaughn May 31, 2026
b390011
Fix stdout pollution corrupting composites (precession warning -> std…
oshaughn May 31, 2026
a5d8939
calmarg pilot: relax first CIP stage sigma-cut for the prior-cal cold…
oshaughn May 31, 2026
5ece22d
demo/calmarg: parameterize DAG target (PILOT/FUSED) + vanilla fused-c…
oshaughn May 31, 2026
ec2226d
calmarg pilot backstop: shrink fitted proposal toward prior (fixes st…
oshaughn May 31, 2026
785e545
calmarg: frame zero-cal burn-in of the extrinsic sampler (design)
oshaughn May 31, 2026
4296c55
demo/calmarg: fix wide-ILE settings that crippled n_eff (single-event…
oshaughn May 31, 2026
e333ff9
demo/calmarg: correct misleading tuning comments (record accurate facts)
oshaughn May 31, 2026
cf16b03
calmarg: zero-cal burn-in of the extrinsic sampler (--calibration-bur…
oshaughn May 31, 2026
b75ae0c
calmarg burn-in: breadcrumb AV reset limitation + future seedable/fle…
oshaughn May 31, 2026
d0497a8
demo/calmarg: tune-condor target (single condor job, unbuffered) for …
oshaughn May 31, 2026
702569f
Use portable RIFT float dtype in likelihood tools
oshaughnessy-junior May 31, 2026
f4272a8
calmarg: note n_eff is conservative vs true ESS (softens pilot-starva…
oshaughn May 31, 2026
d595fa4
Merge rift_O4d_junior_distance_RiftFloat: portable RiftFloat dtype (M…
oshaughn May 31, 2026
8fa9a8d
demo/calmarg: pp-build/pp-validate -- top-level pseudo_pipe thread-th…
oshaughn Jun 1, 2026
26f8d83
demo/calmarg: pp-run -- RUNNABLE top-level calmarg pipeline on CI dat…
oshaughn Jun 1, 2026
e4b04b2
demo/calmarg: auto-layer OSG/container flags on pp-run when SINGULARI…
oshaughn Jun 1, 2026
7906cbe
demo/calmarg: OSG cache-check fix + CIT accounting-env warning
oshaughn Jun 1, 2026
3c2a85c
demo/calmarg: +4GB disk request in container/OSG mode (.sif transfer …
oshaughn Jun 1, 2026
9666546
demo/calmarg: fix ILE disk stuck at 4M -- ini was overriding the CLI …
oshaughn Jun 1, 2026
385223f
calmarg OSG: fix PSD + cal-envelope file transfer (global paths -> ba…
oshaughn Jun 1, 2026
475bb10
demo/calmarg OSG: frames_dir must be a full copy, not a symlink
oshaughn Jun 1, 2026
dae8ede
calmarg pilot: strip the 'X' placeholder from args_ile.txt (was passe…
oshaughn Jun 1, 2026
2c2894b
demo/calmarg: pp-run-pilot -- runnable cal-PILOT pipeline via pseudo_…
oshaughn Jun 1, 2026
e2af1b5
calmarg pilot OSG: CALPILOT job runs in-container with file transfer …
oshaughn Jun 1, 2026
b501e82
calmarg pilot OSG: wide-ILE seed transfer + clean CALPILOT transfer l…
oshaughn Jun 1, 2026
190fca5
demo/calmarg: pp-run-pilot uses its own rundir (rundir_pp_pilot), not…
oshaughn Jun 1, 2026
a65a07b
demo/calmarg: pp-run-pilot validation -- find util_CalPilotStage.py i…
oshaughn Jun 1, 2026
d0f104d
extrinsic handoff: breadcrumb extrinsic slot (GMM) + fit/seed module …
oshaughn Jun 2, 2026
93a4302
calmarg/extrinsic: ILE save+seed hooks + design doc (GMM proof-of-con…
oshaughn Jun 2, 2026
0f2385b
calmarg/extrinsic: wire the GMM extrinsic handoff through the pipeline
oshaughn Jun 2, 2026
98bb98c
calmarg/extrinsic: fix two GPU-only seed bugs + add real-GPU smoke ta…
oshaughn Jun 2, 2026
8aaba0c
util_ConstructEOSPosterior: decouple fit basis from MC sampling basis
oshaughnessy-junior Jun 2, 2026
d1995aa
demo/hyperpipe: README tour of the four yaml configs
oshaughnessy-junior Jun 2, 2026
77f5c56
calmarg/extrinsic: document the GMM-convergence blocker found on real…
oshaughn Jun 2, 2026
566ed81
calmarg/extrinsic: freeze seeded groups by default (--extrinsic-propo…
oshaughn Jun 2, 2026
3e49f06
calmarg/extrinsic: fix cross-sampler AV->GMM seed numerics (untempere…
oshaughn Jun 2, 2026
cb63611
lalsimutils: skip schema columns absent from the sim_inspiral table i…
oshaughn Jun 2, 2026
c73d6ad
demo/calmarg: expose distance marginalization as an OPTION (PP_DMARG)…
oshaughn Jun 2, 2026
480260c
calmarg: export recovered cal posterior in final fairdraw (+ fix GMM-…
oshaughn Jun 2, 2026
1a1a29b
calmarg: fix OSG iteration-0 breadcrumb EOFError (empty placeholder) …
oshaughn Jun 2, 2026
868b8cd
calmarg: write a VALID 'prior' breadcrumb placeholder (belt-and-suspe…
oshaughn Jun 2, 2026
36ea75f
demo/calmarg: README -- document the full target ladder + advanced ca…
oshaughn Jun 2, 2026
5643386
plot_posterior_corner: additive coordinate-plugin hook
oshaughnessy-junior Jun 2, 2026
344a3ee
EOSManager: modernize RePrimAnd interface to pyreprimand 1.7 API
oshaughnessy-junior Jun 2, 2026
277c0ba
Merge rift_O4d_junior_eospost_coords: EOSPosterior coord-decoupling +…
oshaughnessy-junior Jun 2, 2026
d4be689
Merge branch 'rift_O4d_junior_calmarg_in_loop' of https://github.com/…
oshaughnessy-junior Jun 2, 2026
5087cf2
Merge remote-tracking branch 'origin/rift_O4d_junior_calmarg_in_loop_…
oshaughnessy-junior Jun 2, 2026
b63c800
EOSManager: call star_acc_simple with keyword args (keyword-only in p…
oshaughnessy-junior Jun 2, 2026
6eea64a
puff: coordinate-plugin hook for util_HyperparameterPuffball + Tracer
oshaughnessy-junior Jun 2, 2026
6778de0
Merge branch 'rift_O4d_junior_calmarg_in_loop' of https://github.com/…
oshaughnessy-junior Jun 2, 2026
337965a
cepp_basic: separate puff barrier from fit chain
oshaughnessy-junior Jun 3, 2026
b6f908b
cepp_basic: thread the cal/extrinsic seed barriers into the puffball …
oshaughn Jun 3, 2026
b8eb95a
cepp_basic: final extrinsic stage uses the efficient AV sampler even …
oshaughn Jun 4, 2026
03387f3
demo/calmarg: explode CIP across parallel workers with a light per-wo…
oshaughn Jun 4, 2026
0e164e7
demo/calmarg: pack 50 intrinsic points per ILE job (jobs are ~1-3 min)
oshaughn Jun 4, 2026
af1ac19
Revert "cepp_basic: final extrinsic stage uses the efficient AV sampl…
oshaughn Jun 4, 2026
da585d1
demo/calmarg: AV for the final extrinsic via post-build sed on ILE_ex…
oshaughn Jun 4, 2026
2ea9125
demo/calmarg: add --condor-local-nonworker when OSG is active (CIT ex…
oshaughn Jun 4, 2026
fb3e792
cepp_basic: CALPILOT job forgot request_disk
Jun 5, 2026
337c6a0
Merge branch 'rift_O4d_junior_calmarg_in_loop' of https://github.com/…
Jun 5, 2026
7304512
dag_utils: fix write_calpilot_sub singularity and oauth handling
oshaughnessy-junior Jun 5, 2026
d2264be
calpilot: fix initialdir to working_directory, not iteration_N_cip
oshaughnessy-junior Jun 5, 2026
3fea0cd
calpilot: fix calpilot_pre.sh transfer path after initialdir change
oshaughnessy-junior Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 118 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: CI

on:
push:
branches: [rift_O4d, rift_O4d_junior]
branches: [rift_O4d, rift_O4d_junior, rift_O4d_gmm_gpu]
pull_request:
branches: [rift_O4d, rift_O4d_junior]
branches: [rift_O4d, rift_O4d_junior, rift_O4d_gmm_gpu]
workflow_dispatch:
schedule:
# Weekly canary so a fresh UPSTREAM release (e.g. swig>=4.4.0 -- see #136)
# is caught even when there is no RIFT commit. Mondays 06:00 UTC.
- cron: '0 6 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,7 +21,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
# Smoke-test that the package resolves and installs across the supported
# Python range, including the legacy py3.9 lane (paired with the pinned
# numpy==1.24.4 used by the integrator gate below).
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -60,11 +67,27 @@ jobs:
import-check:
needs: install
runs-on: ubuntu-latest
# Verify every declared module imports cleanly under both the pinned
# legacy lane (py3.9 + numpy 1.24.4) and the modern lane (py3.12 +
# numpy 2.x). Catches platform-portability regressions like the
# np.float128 import-time crash on numpy 2.x systems without an
# extended-precision long double.
strategy:
fail-fast: false
matrix:
include:
- lane: legacy
python-version: '3.9'
numpy-pin: 'numpy==1.24.4'
- lane: modern
python-version: '3.12'
numpy-pin: 'numpy>=2.0,<3.0'
name: import-check (${{ matrix.lane }} py${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
Expand All @@ -73,8 +96,14 @@ jobs:
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
# Pin numpy AFTER requirements.txt so it overrides the unpinned
# 'numpy' line in requirements.txt without changing the file.
python -m pip install '${{ matrix.numpy-pin }}' --break-system-packages
python -m pip install coverage pytest --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Run import check
run: python .travis/test-all-mod.py

Expand Down Expand Up @@ -108,11 +137,29 @@ jobs:
test-run:
needs: install
runs-on: ubuntu-latest
# Integrator + posterior gate. We run this in two CI lanes:
# - legacy : py3.9 + numpy 1.24.4 -- the historically known-good
# configuration on Linux x86_64 where np.float128 is real.
# - modern : py3.12 + numpy 2.x -- the forward-looking target. Catches
# numpy 2.x removals (np.product, np.cumproduct, np.in1d,
# np.alltrue, np.float_) and scipy >= 1.16 mvnun removal.
# Both lanes must pass test-integrate.sh's GMM/AC/AV consistency check.
strategy:
fail-fast: false
matrix:
include:
- lane: legacy
python-version: '3.9'
numpy-pin: 'numpy==1.24.4'
- lane: modern
python-version: '3.12'
numpy-pin: 'numpy>=2.0,<3.0'
name: test-run (${{ matrix.lane }} py${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Enable symlink
Expand All @@ -121,8 +168,14 @@ jobs:
run: |
python -m pip install --upgrade pip --break-system-packages
python -m pip install -r requirements.txt --break-system-packages
# Pin numpy AFTER requirements.txt so it overrides the unpinned
# 'numpy' line in requirements.txt without changing the file.
python -m pip install '${{ matrix.numpy-pin }}' --break-system-packages
python -m pip install coverage pytest pytest-cov --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Run test scripts
run: |
. .travis/test-coord.sh
Expand All @@ -135,11 +188,70 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs
name: test-logs-${{ matrix.lane }}-py${{ matrix.python-version }}
path: |
**/*.log
**/test-results/*.xml

container-dep-canary:
# Dependency-resolution canary for the container build. The container ships
# an UNPINNED dependency set (containers/requirements-container.txt) and
# clones RIFT at build time, so a fresh upstream release can silently break
# RIFT and only surface when a container rebuild fails (e.g. swig>=4.4.0,
# issue #136). This job installs that same unpinned set + exercises the pixi
# swig-post44 deployment lane and runs the import check, so we get an early
# warning. Runs on push/PR AND weekly (see on.schedule).
#
# Non-blocking: it tracks UPSTREAM changes outside any PR author's control,
# so a red run should alert maintainers, not block unrelated PRs.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10' # matches the container's python3.10
- name: Enable symlink
run: sudo ln -sf $(which python3) /usr/bin/python
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- name: Install UNPINNED container dependency set (latest upstream)
run: |
python -m pip install --upgrade pip --break-system-packages
# Strip the GPU-only cupy line: there is no GPU/driver in CI and the
# canary's goal is dependency RESOLUTION + RIFT import, not cupy exec.
# (cupy is not actually listed in requirements-container.txt, but be
# defensive in case it is added later.)
grep -viE '^\s*cupy' containers/requirements-container.txt > /tmp/req-canary.txt
python -m pip install -r /tmp/req-canary.txt --break-system-packages
python -m pip install --editable . --break-system-packages
- name: Show resolved versions
run: |
python -c "import sys, numpy, scipy; print('python', sys.version); print('numpy', numpy.__version__); print('scipy', scipy.__version__)"
- name: Import check (latest container deps)
run: python .travis/test-all-mod.py

container-swig-canary:
# Companion to container-dep-canary: exercise the pixi swig-post44 lane,
# which is the direct issue-#136 detector (swig>=4.4.0 breaking RIFT's
# generated bindings). Kept as its own job so a swig failure is distinct
# from a general dependency-resolution failure. Also non-blocking.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: swig-post44
- name: swig version (post-4.4 lane)
run: pixi run -e swig-post44 swig-version
- name: Install RIFT (post-4.4 swig lane)
run: pixi run -e swig-post44 install-rift
- name: Import check (post-4.4 swig lane)
run: pixi run -e swig-post44 import-check

docs:
runs-on: ubuntu-latest
permissions:
Expand Down
33 changes: 33 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ stages:
# - docker image
# - deploy

.pixi_template:
stage: system tests
before_script: []
variables:
PIXI_HOME: "$CI_PROJECT_DIR/.pixi"
PIXI_CACHE_DIR: "$CI_PROJECT_DIR/.pixi-cache"
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.pixi-cache/xdg"
PATH: "$CI_PROJECT_DIR/.pixi/bin:$PATH"
cache:
key: pixi-$CI_JOB_NAME
paths:
- .pixi/
- .pixi-cache/
- .pixi/envs/
script:
- apt-get update --assume-yes && apt-get install --assume-yes ca-certificates curl git
- curl -fsSL https://pixi.sh/install.sh | bash
- export PATH="$PIXI_HOME/bin:$PATH"
- pixi --version
- pixi run -e "$PIXI_ENV" swig-version
- pixi run -e "$PIXI_ENV" install-rift
- pixi run -e "$PIXI_ENV" import-check

.install_docker_dependencies:
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Expand Down Expand Up @@ -66,6 +89,16 @@ test_run:
- bash .travis/test-run-alts.sh
- bash .travis/test-build.sh

pixi_swig_pre44:
extends: .pixi_template
variables:
PIXI_ENV: swig-pre44

pixi_swig_post44:
extends: .pixi_template
variables:
PIXI_ENV: swig-post44

# build:test:
# image: docker:latest
# stage: docker image
Expand Down
58 changes: 56 additions & 2 deletions .travis/test-build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,64 @@
#! /bin/bash
# This is just a pipeline build test. The coinc file is from a synthetic event.
# Pipeline build test. The coinc file is from a synthetic event.
#
# Builds (does not submit) RIFT DAGs from a reference ini + coinc using fake
# data, and verifies that the per-distance likelihood export flags (Plan A
# density grid, Plan B fixed-distance slices) thread through
# util_RIFT_pseudo_pipe.py -> create_event_parameter_pipeline_* and land in the
# correct condor submit file (ILE_extr.sub, the extrinsic stage).

set -e

export RIFT_LOWLATENCY=True
export SINGULARITY_RIFT_IMAGE=foo
# SINGULARITY_RIFT_IMAGE=/cvmfs/singularity.opensciencegrid.org/james-clark/research-projects-rit/rift:test
export SINGULARITY_BASE_EXE_DIR=/usr/bin/
alias gw_data_find=/bin/true # don't want to reall do the datafind job
touch foo.cache
util_RIFT_pseudo_pipe.py --use-ini `pwd`/.travis/ref_ini/GW150914.ini --use-coinc `pwd`/.travis/ref_ini/coinc.xml --use-rundir `pwd`/test_build_pipe --fake-data-cache `pwd`/foo.cache

REF_INI=`pwd`/.travis/ref_ini/GW150914.ini
COINC=`pwd`/.travis/ref_ini/coinc.xml

# require a flag to be present in a file
assert_has() { # file pattern
if ! grep -q -- "$2" "$1"; then
echo "FAIL: expected '$2' in $1"; exit 1
fi
}
# require a flag to be absent from a file
assert_absent() { # file pattern
if grep -q -- "$2" "$1"; then
echo "FAIL: did not expect '$2' in $1"; exit 1
fi
}

# --- 1. baseline build (original smoke test) ---
util_RIFT_pseudo_pipe.py --use-ini $REF_INI --use-coinc $COINC --use-rundir `pwd`/test_build_pipe --fake-data-cache `pwd`/foo.cache

# --- 2. Plan-A distance-grid export, threaded onto the extrinsic stage ---
# Distance marginalization must stay ON for the intrinsic ILE jobs (speedup)
# and be disabled ONLY at the extrinsic export stage. The trailing space in
# the pattern matches the standalone --distance-marginalization flag but not
# --distance-marginalization-lookup-table.
util_RIFT_pseudo_pipe.py --use-ini $REF_INI --use-coinc $COINC --use-rundir `pwd`/test_build_grid --fake-data-cache `pwd`/foo.cache --add-extrinsic --export-marginal-distance-grid
assert_has `pwd`/test_build_grid/ILE_extr.sub "--export-marginal-distance-grid"
assert_has `pwd`/test_build_grid/ILE_extr.sub "--internal-use-lnL"
assert_absent `pwd`/test_build_grid/ILE.sub "--export-marginal-distance-grid"
assert_has `pwd`/test_build_grid/args_ile.txt "--distance-marginalization "
assert_has `pwd`/test_build_grid/ILE.sub "--distance-marginalization "
assert_absent `pwd`/test_build_grid/ILE_extr.sub "--distance-marginalization "
echo "OK: Plan-A grid export only on ILE_extr.sub; distance marginalization disabled only at the extrinsic stage"

# --- 3. Plan-B distance-slice export, threaded onto the extrinsic stage ---
util_RIFT_pseudo_pipe.py --use-ini $REF_INI --use-coinc $COINC --use-rundir `pwd`/test_build_slices --fake-data-cache `pwd`/foo.cache --add-extrinsic --export-distance-slices 10 --export-distance-slices-wing-delta-lnL 7.0 --export-distance-slices-skip-threshold 1.0
assert_has `pwd`/test_build_slices/ILE_extr.sub "--export-distance-slices 10"
assert_has `pwd`/test_build_slices/ILE_extr.sub "--distance-slice-wing-delta-lnL 7.0"
assert_has `pwd`/test_build_slices/ILE_extr.sub "--distance-slice-skip-threshold 1.0"
assert_has `pwd`/test_build_slices/ILE_extr.sub "--internal-use-lnL"
assert_absent `pwd`/test_build_slices/ILE.sub "--export-distance-slices"
assert_has `pwd`/test_build_slices/args_ile.txt "--distance-marginalization "
assert_has `pwd`/test_build_slices/ILE.sub "--distance-marginalization "
assert_absent `pwd`/test_build_slices/ILE_extr.sub "--distance-marginalization "
echo "OK: Plan-B slice export only on ILE_extr.sub; distance marginalization disabled only at the extrinsic stage"

echo "test-build.sh: all pipeline-build checks passed"
Loading
Loading