Skip to content

Commit

Permalink
Merge branch 'master' into sample_variance
Browse files Browse the repository at this point in the history
  • Loading branch information
vitenti committed Feb 16, 2024
2 parents 2fb1eb6 + 79ec88a commit 2f2ad01
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 12 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:

build-gcc-ubuntu:
name: NumCosmo (ubuntu, apt)
name: (ubuntu, apt)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
./example_ca
build-gcc-macos:
name: NumCosmo (macos, brew)
name: (macos, brew)
runs-on: macos-latest
env:
CC: gcc-11
Expand Down Expand Up @@ -100,12 +100,13 @@ jobs:
run: meson test -C build || (cat build/meson-logs/testlog.txt && exit 1)

build-miniforge:
name: NumCosmo (${{ matrix.os }}, python-${{ matrix.python-version }}, Miniforge)
name: (${{ matrix.os }}, py${{ matrix.python-version }}, ${{ matrix.mpi }}, Miniforge)
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: ["ubuntu", "macos"]
python-version: ["3.9"]
mpi: ["openmpi", "mpich"]
defaults:
run:
shell: bash -el {0}
Expand All @@ -127,13 +128,15 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key: miniforge-${{ runner.os }}--${{ runner.arch }}--python-${{ matrix.python-version }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('devel_environment.yml') }}-${{ env.CACHE_NUMBER }}
key: miniforge-${{ runner.os }}--${{ runner.arch }}--python-${{ matrix.python-version }}--${{ matrix.mpi }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('devel_environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 0
id: cache
- name: Update environment
run: |
conda env update -q -v -n numcosmo_developer -f devel_environment.yml
mamba env update -q -v -n numcosmo_developer -f devel_environment.yml
mamba remove -q -v -n numcosmo_developer openmpi
mamba install -q -v -n numcosmo_developer ${{ matrix.mpi }}
if: steps.cache.outputs.cache-hit != 'true'
- name: Setting up NumCosmo
run: |
Expand Down Expand Up @@ -167,7 +170,7 @@ jobs:
run: meson test -C build || (cat build/meson-logs/testlog.txt && exit 1)

build-miniforge-coverage:
name: NumCosmo-Coverage (${{ matrix.os }}, python-${{ matrix.python-version }}, Miniforge)
name: Coverage (${{ matrix.os }}, py${{ matrix.python-version }}, openmpi, Miniforge)
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
Expand Down
24 changes: 24 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,31 @@ CHANGELOG

[Current]

[v0.21.2]
* Adding MPICH support. (#144)

* Adding MPICH support.
* Descreasing allowed m2lnL variance for exploration phase (leading to
overflow during matrix inversion for large dimensions).
* Testing MPI support.
* Better names for CI.
* NumCosmo product file (#143)

* Introducing the product-file options.
* Updated Halofit to return linear Pk when all required scales are linear.
* Support for exploration phase in APES.
* Adding calibrate option to numcosmo app.
* Reorganized numcosmo app.
* Removed calibrate_apes tool.
* Testing power-spectra with/without halofit.
* More tests for linear universe.
* Added tests for APES exploration.
* Testing APES MPI.
* Removed unused code and optimizing tests.

[v0.21.1]
* Moving release v0.21.1.

* More options to the conversion tool from-cosmosis. (#141)

* mute-cosmosis makes cosmosis do not print info messages.
Expand Down
12 changes: 11 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'numcosmo',
['c', 'fortran'],
version: '0.21.1',
version: '0.21.2',
license: 'GPL-3.0-or-later',
meson_version: '>= 1.2.0',
default_options: [
Expand Down Expand Up @@ -372,6 +372,16 @@ mpi_fortran_dep = dependency(
required: false,
)

# MPICH is not found by the mpi dependency, so we need to check for it manually
if not mpi_c_dep.found()
mpi_c_dep = dependency('mpich', required: false)
endif

# MPICH is not found by the mpi dependency, so we need to check for it manually
if not mpi_fortran_dep.found()
mpi_fortran_dep = dependency('mpichf90', required: false)
endif

if mpi_c_dep.found()
numcosmo_conf.set('HAVE_MPI', true)
numcosmo_build_cfg.set('have_mpi_support', '#define NUMCOSMO_HAVE_MPI 1')
Expand Down
2 changes: 1 addition & 1 deletion numcosmo/math/ncm_stats_dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ _ncm_stats_dist_prepare_interp (NcmStatsDist *sd, NcmVector *m2lnp)
{
NcmStatsDistClass *sd_class = NCM_STATS_DIST_GET_CLASS (sd);
NcmStatsDistEval eval = {sd, self, sd_class, NULL, m2lnp};
const gdouble dbl_limit = 6.0;
const gdouble dbl_limit = 2.0;
guint i;

/*
Expand Down
6 changes: 3 additions & 3 deletions numcosmo_py/ncm.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7600,12 +7600,12 @@ class Powspec(GObject.Object):
def clear(powspec: Powspec) -> None: ...
def corr3d(self, model: Model, reltol: float, z: float, r: float) -> float: ...
def do_eval(self, model: Model, z: float, k: float) -> float: ...
def do_eval_vec(self, model: Model, z: float, k: Vector) -> Vector: ...
def do_eval_vec(self, model: Model, z: float, k: Vector, Pk: Vector) -> None: ...
def do_get_nknots(self) -> Tuple[int, int]: ...
def do_get_spline_2d(self, model: Model) -> Spline2d: ...
def do_prepare(self, model: Model) -> None: ...
def eval(self, model: Model, z: float, k: float) -> float: ...
def eval_vec(self, model: Model, z: float, k: Vector) -> Vector: ...
def eval_vec(self, model: Model, z: float, k: Vector, Pk: Vector) -> None: ...
def free(self) -> None: ...
def get_kmax(self) -> float: ...
def get_kmin(self) -> float: ...
Expand Down Expand Up @@ -7655,7 +7655,7 @@ class PowspecClass(GObject.GPointer):
parent_class: GObject.ObjectClass = ...
prepare: Callable[[Powspec, Model], None] = ...
eval: Callable[[Powspec, Model, float, float], float] = ...
eval_vec: Callable[[Powspec, Model, float, Vector], Vector] = ...
eval_vec: Callable[[Powspec, Model, float, Vector, Vector], None] = ...
get_nknots: Callable[[Powspec], Tuple[int, int]] = ...
get_spline_2d: Callable[[Powspec, Model], Spline2d] = ...
padding: list[None] = ...
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = 'numcosmo_py'
version = '0.21.1'
version = '0.21.2'
description = 'NumCosmo is a free software C library for cosmology calculations'
readme = 'README.md'
classifiers = [
Expand Down Expand Up @@ -38,6 +38,9 @@ test = [
"pytest-tap",
"rich",
"typer",
"pyccl",
"sacc",
"firecrown",
]
dev = [
"mypy",
Expand Down

0 comments on commit 2f2ad01

Please sign in to comment.