From df6af8671a8c1c1aeac8f6b6cd54dee40a7592ab Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Thu, 12 Dec 2024 07:44:32 -0800 Subject: [PATCH] Try to make the CI workflow run --- .github/workflows/bank-compress-workflow.yml | 63 +++++++++++++++++++ .../compress.ini | 23 +++++-- .../executables.ini | 17 +++-- examples/tmpltbank/compress_workflow/gen.sh | 11 ++++ .../tmpltbank/compress_workflow_test/gen.sh | 10 --- .../compress_workflow_test/master.sh | 17 ----- tools/install_travis.sh | 3 - 7 files changed, 104 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/bank-compress-workflow.yml rename examples/tmpltbank/{compress_workflow_test => compress_workflow}/compress.ini (52%) rename examples/tmpltbank/{compress_workflow_test => compress_workflow}/executables.ini (69%) create mode 100644 examples/tmpltbank/compress_workflow/gen.sh delete mode 100644 examples/tmpltbank/compress_workflow_test/gen.sh delete mode 100644 examples/tmpltbank/compress_workflow_test/master.sh diff --git a/.github/workflows/bank-compress-workflow.yml b/.github/workflows/bank-compress-workflow.yml new file mode 100644 index 00000000000..95dfbd08b67 --- /dev/null +++ b/.github/workflows/bank-compress-workflow.yml @@ -0,0 +1,63 @@ +name: run small search using pegasus + condor + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-20.04 + timeout-minutes: 90 + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: install condor + run: | + wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add - + echo "deb http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + echo "deb-src http://research.cs.wisc.edu/htcondor/ubuntu/8.9/focal focal contrib" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install minihtcondor + sudo systemctl start condor + sudo systemctl enable condor + - name: install pegasus + run: | + wget -qO - https://download.pegasus.isi.edu/pegasus/gpg.txt | sudo apt-key add - + echo "deb https://download.pegasus.isi.edu/pegasus/ubuntu bionic main" | sudo tee -a /etc/apt/sources.list + sudo apt-get -o Acquire::Retries=3 update + sudo apt-get -o Acquire::Retries=3 install pegasus=5.0.8-1+ubuntu18 + - run: sudo apt-get -o Acquire::Retries=3 install *fftw3* intel-mkl* + - name: Install pycbc + run: | + python -m pip install --upgrade 'pip<22.0' setuptools + pip install GitPython # This shouldn't really be needed! + pip install -r requirements.txt + pip install . + - name: installing sbank + pip install sbank + - name: generating template bank + run: bash -e examples/search/bank.sh + - name: running workflow + run: | + cp examples/tmpltbank/compress_workflow/*.ini ./ + bash -e examples/tmpltbank/compress_workflow/gen.sh + cd output + bash -e ../examples/search/submit.sh + python ../examples/search/check_job.py + find submitdir/work/ -type f -name '*.tar.gz' -delete + - name: store log files + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs + path: output/submitdir/work + - name: store result page + uses: actions/upload-artifact@v4 + with: + name: results + path: html diff --git a/examples/tmpltbank/compress_workflow_test/compress.ini b/examples/tmpltbank/compress_workflow/compress.ini similarity index 52% rename from examples/tmpltbank/compress_workflow_test/compress.ini rename to examples/tmpltbank/compress_workflow/compress.ini index 5c658393d14..50d8bfa0b10 100644 --- a/examples/tmpltbank/compress_workflow_test/compress.ini +++ b/examples/tmpltbank/compress_workflow/compress.ini @@ -1,5 +1,5 @@ [workflow] -file-retention-level = merged_triggers +file-retention-level = all_triggers [workflow-ifos] h1 = @@ -7,13 +7,18 @@ l1 = v1 = [workflow-tmpltbank] +; See http://pycbc.org/pycbc/latest/html/workflow/template_bank.html tmpltbank-method = PREGENERATED_BANK tmpltbank-pregenerated-bank = ${resolve:./bank.hdf} [workflow-splittable] +; http://pycbc.org/pycbc/latest/html/workflow/splittable.html splittable-method = IN_WORKFLOW splittable-exe-tag = splitbank -splittable-num-banks = 200 +; How many banks to split into for generating the compressed waveforms +splittable-num-banks = 20 +; How many banks to recombine into; these will be the ones used as split +; banks in the traditional sense within the offline search workflow recombine-num-banks = 4 [bank2hdf] @@ -22,7 +27,7 @@ recombine-num-banks = 4 mchirp-sort = [compress] -approximant = IMRPhenomD +approximant = "TaylorF2:mtotal<4" "SEOBNRv5_ROM:else" sample-rate = 2048 compression-algorithm = spa precision = single @@ -35,12 +40,18 @@ psd-model = flat_unity copy-subgroups-directly = compressed_waveforms [plot_bank_compression] -histogram-density = -log-compression = n-bins = 100 + +[plot_bank_compression-mchirp] +histogram-density = log-comparison = +comparison-parameter = mchirp +log-compression = +log-histogram = +log-mismatch = -[plot_bank_compression-duration] +[plot_bank_compression-eta] +comparison-parameter = eta [page_versioning] diff --git a/examples/tmpltbank/compress_workflow_test/executables.ini b/examples/tmpltbank/compress_workflow/executables.ini similarity index 69% rename from examples/tmpltbank/compress_workflow_test/executables.ini rename to examples/tmpltbank/compress_workflow/executables.ini index e60bad80acb..038cbf288bd 100644 --- a/examples/tmpltbank/compress_workflow_test/executables.ini +++ b/examples/tmpltbank/compress_workflow/executables.ini @@ -1,15 +1,15 @@ [executables] bank2hdf = ${which:pycbc_coinc_bank2hdf} -combine_banks = ${which:sbank_hdf5_bankcombiner} -compress = ${which:pycbc_compress_bank} splitbank = ${which:pycbc_hdf5_splitbank} +compress = ${which:pycbc_compress_bank} +combine_banks = ${which:sbank_hdf5_bankcombiner} page_versioning = ${which:pycbc_page_versioning} plot_bank_compression = ${which:pycbc_plot_bank_compression} results_page = ${which:pycbc_make_html_page} [pegasus_profile] -condor|request_memory = 20000 -condor|request_disk = 20000 +condor|request_memory = 1000 +condor|request_disk = 1000 condor|accounting_group = ligo.dev.o4.cbc.bbh.pycbcoffline pycbc|primary_site = condorpool_symlink pycbc|submit-directory = ./ @@ -18,5 +18,14 @@ pycbc|submit-directory = ./ pycbc|site-scratch = ./ pycbc|unique-scratch = +[pegasus_profile-coinc] +; use different site options to check that they work +pycbc|site = condorpool_copy + +[pegasus_profile-inspiral] +; use different site options to check that they work +pycbc|site = condorpool_shared + [pegasus_profile-results_page] pycbc|site = condorpool_shared + diff --git a/examples/tmpltbank/compress_workflow/gen.sh b/examples/tmpltbank/compress_workflow/gen.sh new file mode 100644 index 00000000000..087bff760d6 --- /dev/null +++ b/examples/tmpltbank/compress_workflow/gen.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +pycbc_make_bank_compression_workflow \ +--workflow-name compress \ +--output-dir output \ +--config-files \ + compress.ini \ + executables.ini \ +--config-overrides \ + results_page:output-path:$(pwd)/html diff --git a/examples/tmpltbank/compress_workflow_test/gen.sh b/examples/tmpltbank/compress_workflow_test/gen.sh deleted file mode 100644 index 522548f8205..00000000000 --- a/examples/tmpltbank/compress_workflow_test/gen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e - -pycbc_make_bank_compression_workflow \ - --config-files compress.ini executables.ini \ - --workflow-name compress \ - --output-dir output \ - --config-overrides \ - results_page:output-path:$(pwd)/html \ - diff --git a/examples/tmpltbank/compress_workflow_test/master.sh b/examples/tmpltbank/compress_workflow_test/master.sh deleted file mode 100644 index 052630a1ae0..00000000000 --- a/examples/tmpltbank/compress_workflow_test/master.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e - -if [[ ! -f bank.hdf ]] -then - bash -e ../../search/bank.sh -else - echo -e "\\n\\n>> [`date`] Pre-existing template bank found" -fi - -bash -e gen.sh - -cd output - -bash -e ../../../search/submit.sh -python ../../../search/check_job.py - diff --git a/tools/install_travis.sh b/tools/install_travis.sh index 22bf694493f..a2bc95eea08 100755 --- a/tools/install_travis.sh +++ b/tools/install_travis.sh @@ -50,8 +50,5 @@ pip install -r companion.txt echo -e ">> [`date`] installing mpi4py" pip install mpi4py -echo -e ">> [`date`] installing sbank" -pip install git+https://github.com/gwastro/sbank.git - echo -e ">> [`date`] installing pycbc" pip install .