Skip to content

Set up ShapePipe on Nibi and run end-to-end on a first batch of P3 tiles #808

Description

@cailmdaley

Goal

Get ShapePipe running end-to-end on Nibi over a handful of P3 tiles — the first real run on data. This is deliberately small: the point is to stand up the container, wire the pipeline to our pre-staged data, get a valid shape catalogue out the far end, and measure how long a tile actually takes and how it parallelizes — so we can size the full P3 run realistically. Second issue on the First run on data (Nibi) milestone, following #801.

What's already in place (from #801)

P3 data is staged locally in /project/def-mjhudson/unions-wl/ (see its README.md):

  • tiles/ — 1268 P3 coadd images + weights (detection layer)
  • exposures/ — 1180 unique single exposures, image+weight+flag (measurement layer; downloading)

So the run can consume everything off local disk — no CADC calls needed during processing.

Setup tasks

  • Container. apptainer pull the runtime image (build from develop, not the stale v1.0.1 tag), caching off $HOME:
    export APPTAINER_CACHEDIR=/project/def-mjhudson/unions-wl/.apptainer
    apptainer pull /project/def-mjhudson/unions-wl/shapepipe-runtime.sif \
        docker://ghcr.io/cosmostat/shapepipe:develop-runtime
  • Clone shapepipe (develop) for the example/cfis/ configs + auxdir/.
  • Point ShapePipe at local data. In config_tile_Git_vos.ini and config_exp_Gie_vos.ini, set RETRIEVE = symlink and INPUT_PATH/project/def-mjhudson/unions-wl/{tiles,exposures}. Verify INPUT_FILE_PATTERN/INPUT_FILE_EXT match our staged filenames (CFIS.XXX.YYY.r.fits / .r.weight.fits.fz; exposures NNNNNNNp.fits.fz + .weight/.flag).
  • Tile list. Write tile_numbers.txt with the 2–4 chosen tiles.
  • SLURM. Adapt example/pbs/candide_smp.sh for Nibi (partition, --account=def-mjhudson, --cpus-per-task, real --time), with [EXECUTION] MODE = smp and [JOB] SMP_BATCH_SIZE = cpus. Bind the clone at an identical path (--bind "$SPDIR:$SPDIR") so config paths resolve in/out of the container.
  • Run the module chain (PSFEx path) in order — get_imagesfind_exposuresget_images(exp)split_expmerge_headersmasksextractorsetoolspsfex/psfex_interpvignetmakerspread_modelvignetmakerngmixmerge_sepmake_cat — and confirm a final_cat FITS appears.
  • Record wall-time per tile and per stage; note where ngmix (shape measurement) dominates.

Scope decisions for run 1

  • PSFEx, not MCCD — simpler, better-trodden for a first validation. MCCD (the UNIONS-WL production model) is a later run.
  • ~10 tiles — a big enough chunk to see per-tile timing spread, throughput scaling, and a first failure rate, while still finishing comfortably on one node.
  • SMP / joblib on one node — tiles are independent, so ShapePipe fans them across workers within the node. That's all the parallelism this run needs; MPI / multi-node is a throughput lever for the full run, with nothing to add here.

What we're measuring

  • Wall-time per tile, and where it goes across stages (ngmix shape measurement is expected to dominate).
  • Throughput scaling with SMP_BATCH_SIZE (cores) — tiles are independent, so total run time should scale ~linearly with cores; this run calibrates the unit cost.
  • Peak memory per tile.
  • Failure rate across the ~10 tiles — how many complete cleanly vs. error out, and why.
  • A valid final_cat shape catalogue as the "it works end-to-end" artifact.

Open questions

  • Do our staged P3 filenames match the CFIS DR6 INPUT_FILE_PATTERNs, or do the patterns need editing?
  • Audit the full set of input data products a run needs beyond tiles + exposures — star catalogues / star masks for mask, auxdir/ contents, any PSF/validation inputs — and confirm we have them (and whether any reintroduce a CADC dependency). To be nailed down in a follow-up comment.
  • Nibi has no ShapePipe reference config (candide is the documented cluster) — the sbatch header needs porting, not copy-paste.

— Claude (Fable) on behalf of Cail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions