Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,31 @@ general:
slurm args:
mail-type: fail
mail-user: herbold.9@osu.edu
defaults file: Iron_FS.yaml
defaults file: /pscratch/sd/m/mherbold/tests/bookkeeper/full_shape/loa_fs_v2_no_lyB.yaml
data:
bookkeeper dir: /pscratch/sd/m/mherbold/tests/bookkeeper/full_shape/iron_baseline_test
healpix data: /global/cfs/cdirs/desi/spectro/redux/iron/healpix/
catalog: /global/cfs/cdirs/desicollab/science/lya/y1-kp6/iron-baseline/catalogs/QSO_cat_iron_main_dark_healpix_zlya-altbal_zwarn_cut_20230918.fits
bookkeeper dir: /global/cfs/cdirs/desi/science/lya/y3-fs/validation-tests/v1-0-0-0/baseline
healpix data: /global/cfs/cdirs/desi/spectro/redux/loa/healpix/
catalog: /global/cfs/cdirs/desi/survey/catalogs/DA2/QSO/loa/QSO_cat_loa_main_dark_healpix_v2.fits
delta extraction:
calib: 1
calib region: ciii
use existing: /pscratch/sd/m/mherbold/tests/bookkeeper/full_shape/iron_baseline_test
use existing: /global/cfs/cdirs/desi/science/lya/y3-fs/validation-tests/v1-0-0-0/baseline
correlations:
computed distortions:
general: /pscratch/sd/m/mherbold/tests/bookkeeper/full_shape/iron_baseline_test/correlations/results
general: /global/cfs/cdirs/desi/science/lya/y3-fs/validation-tests/v1-0-0-0/baseline/correlations/results
fits:
sampler environment: /global/homes/m/mherbold/.conda/envs/full_shape_bookkeeper
# need to specify, same as general: conda environment:
# default is currently: /global/common/software/desi/users/acuceu/stable_vega/activate_vega.sh
extra args:
vega_main:
general:
control:
run_sampler: True
sampler: Polychord # or PocoMC
Polychord:
num_live: 512
num_repeats: 20
path:
do_clustering: True
resume: True
boost_posterior: 3
Expand All @@ -37,17 +42,3 @@ fits:
time: "08:00:00"
nodes: 6
ntasks-per-node: 64
sampler environment: /global/homes/m/mherbold/.conda/envs/full_shape_bookkeeper
# need to specify, same as general: conda environment:
# default is currently: /global/common/software/desi/users/acuceu/stable_vega/activate_vega.sh

# Note: to calculate polychord and slurm args:
# num_live = 25 * num_params (rounded down to nearest multiple of 64)
# nodes = num_live / tasks_per_node
# num_repeats = num_params

# e.g. for 16 parameters:
# num_repeats=16
# num_live=384
# tasks_per_node=64
# nodes=6
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ cd vega
pip install -e .
```

If using the Vega sampler, install MPI:
For running the Vega sampler, install MPI:
```bash
MPICC="cc -shared" pip install --force-reinstall --no-cache-dir --no-binary=mpi4py mpi4py
```

Then install Polychord or PocoMC (Vega instructions here: https://github.com/andreicuceu/vega).

To get the most up-to-date version of the bookkeper, clone the repo:
```bash
git clone https://github.com/cramirezpe/picca_bookkeeper.git picca_bookkeeper
Expand Down Expand Up @@ -115,7 +117,38 @@ To run the sampler, ensure that MPI is properly installed with NERSC specific se
```bash
MPICC="cc -shared" pip install --force-reinstall --no-cache-dir --no-binary=mpi4py mpi4py
```
Note: for the bookkeeper config file, you will need to specify your conda environment again. (Otherwise the bookkeeper will default to sourcing a separate Vega installation.)

### You will also need to install Polychord or PocoMC (Polychord instructions here are taken from: https://github.com/andreicuceu/vega):

1) Clone the Polychord repo (does not require conda environment yet):
```bash
git clone https://github.com/PolyChord/PolyChordLite.git
cd PolyChordLite
```
2) In the PolyChordLite folder, locate a file called ``Makefile_gnu``, and change 3 lines:
```bash
FC = mpifort
CC = mpicc
CXX = mpicxx
```
to
```bash
FC = ftn
CC = CC
CXX = CC
```
3) Then, inside your conda environment, install Polychord:
```bash
make veryclean
make COMPILER_TYPE=gnu
pip install -e .
```
4) You can test by running the following on an interractive node:
```bash
srun -n 2 python run_pypolychord.py
```

Note: for the bookkeeper.yaml config file, you will need to specify your conda environment again. (Otherwise the bookkeeper will default to sourcing a separate Vega installation.)
```bash
general:
conda environment: /path/to/conda_environment
Expand All @@ -125,6 +158,18 @@ general:
fits:
sampler environment: /path/to/conda_environment
```

You will also need to specify which sampler (Polychord / PocoMC) you will be using.
```bash
fits:
extra args:
vega_main:
general:
control:
run_sampler: True
sampler: Polychord # or PocoMC
```

Then to run from the terminal (including arguments like ``--skip-sent`` if skipping deltas, etc.):
```bash
picca_bookkeeper_run_sampler /path_to_config.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# the goal is to modify this for full shape analysis
delta extraction:
extra args:
picca_delta_extraction:
Expand Down Expand Up @@ -389,16 +390,16 @@ fits:
# smooth-scaling: False

## FS peak/smooth AP: fit phi-alpha, smooth-scaling True
cosmo fit func: phi_alpha
full-shape: False
full-shape-alpha: False
smooth-scaling: True

## FS AP: fit phi_alpha, smooth-scaling True, FS True
# cosmo fit func: phi_alpha
# full-shape: True
# full-shape: False
# full-shape-alpha: False
# smooth-scaling: True

## FS AP: fit phi_alpha, smooth-scaling True, FS True
cosmo fit func: phi_alpha
full-shape: True
full-shape-alpha: False
smooth-scaling: True

## FS galaxy: fit phi-alpha, all True
# cosmo fit func: phi_alpha
Expand Down Expand Up @@ -439,16 +440,16 @@ fits:
dnl_arinyo_kp: 5 22 19.47 0.1

# Peak/smooth AP config
phi: True
alpha: True
phi_smooth: True
alpha_smooth: True

# Full-shape AP config
# phi: True
# alpha: True
# phi_full: True
# phi_smooth: True
# alpha_smooth: True

# Full-shape AP config
alpha: True
phi_full: True
alpha_smooth: True

# Galaxy full-shape config
# phi_full: True
# alpha_full: True
Expand Down Expand Up @@ -503,16 +504,16 @@ fits:
desi_inst_sys_amp: 1e-4

# Peak/smooth AP config
phi: 1.0
alpha: 1.0
phi_smooth: 1.0
alpha_smooth: 1.0

# Full-shape AP config
# phi: 1.0
# alpha: 1.0
# phi_full: 1.0
# phi_smooth: 1.0
# alpha_smooth: 1.0

# Full-shape AP config
alpha: 1.0
phi_full: 1.0
alpha_smooth: 1.0

# Galaxy full-shape config
# phi_full: 1.0
# alpha_full: 1.0
Expand Down