Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into SSC
Browse files Browse the repository at this point in the history
  • Loading branch information
RyoTerasawa committed Mar 10, 2024
2 parents 2ee5ba5 + b5f7666 commit 9b7450d
Show file tree
Hide file tree
Showing 65 changed files with 5,068 additions and 797 deletions.
1 change: 1 addition & 0 deletions .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- pip
- cmake
- gsl
- fftw
- swig
- pyyaml
- numpy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: "macOS: set env variables"
if: matrix.label == 'osx-64'
run: |
mamba install llvm-openmp
#mamba install llvm-openmp
echo "DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib" >> $GITHUB_ENV
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
echo "SDKROOT: ${SDKROOT}"
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
pip install --no-build-isolation classy==2.9.4
- name: Install CCL
run: pip install -e .
run: pip install -v -e .

- name: Unit tests
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- name: Setup python
uses: actions/setup-python@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Build wheel and source tarball
run: |
python setup.py sdist
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Unreleased

# v3.0.1 Changes
- Fixed GSL integration segfault (#1155).
- Added `to_dict` utility in cosmology class (#1160).

## Python library
- Documentation fixes (#1122).
- Background calculations (#1149).
- Bacco lbias (#1139).
- Integration of N5K winners into CCL (#1092).
- Non-Gaussian covariances (#869).
- CI fixes (#1121, #1154).

## C library
- Fix GSL integration abort (#1155)

# v3.0.0 Changes

## Python library
Expand Down
25 changes: 5 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ set(TEST_SRC
benchmarks/ccl_test_utils.c
benchmarks/ccl_test_f2d.c
benchmarks/ccl_test_f3d.c

# Move to python when we bring ANGPOW back
#benchmarks/ccl_test_angpow.c
)


Expand All @@ -51,12 +48,6 @@ set(EXTRA_DIST_DIRS)
include(BuildFFTW)
include(BuildGSL)

# Uncomment below when we bring ANGPOW back
# Builds Angpow
# TODO: the same mechanism as for CLASS could be used here to provide the
# option to use a pre-installed version of angpow
#include(BuildAngpow)

if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(Apple)+Clang$") AND (CMAKE_C_COMPILER_VERSION LESS 13) AND NOT FORCE_OPENMP)
# Apple Clang 12 (and maybe below) have issues with OpenMP and cmake, so we don't try to find it
# Anything else supports OpenMP
Expand All @@ -67,8 +58,8 @@ else()
endif()

# Compilation flags
set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer -fno-common -fPIC -std=gnu99 -DHAVE_ANGPOW")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fomit-frame-pointer -fno-common -fPIC -std=gnu99 -DHAVE_ANGPOW")
set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer -fno-common -fPIC -std=gnu99")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fomit-frame-pointer -fno-common -fPIC -std=gnu99")

if(OpenMP_C_FOUND)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OpenMP_C_FLAGS}")
Expand All @@ -86,8 +77,8 @@ if(DEFINED ENV{CONDA_PREFIX})
endif()

# Define include and library directories for external dependencies
include_directories(${GSL_INCLUDE_DIRS} ${FFTW_INCLUDES} ${ANGPOW_INCLUDE_DIRS})
link_directories(${GSL_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${ANGPOW_LIBRARY_DIRS})
include_directories(${GSL_INCLUDE_DIRS} ${FFTW_INCLUDES})
link_directories(${GSL_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS})
# Adds path to CCL include folder
include_directories(include)

Expand All @@ -98,24 +89,18 @@ include_directories(include)
# Compiles all the source files
add_library(objlib OBJECT ${CCL_SRC})
# Make sure the external projects are correclty built
# Uncomment below when we bring ANGPOW back
#add_dependencies(objlib ANGPOW)
if(NOT GSL_FOUND)
add_dependencies(objlib GSL)
# Uncomment below when we bring ANGPOW back
# add_dependencies(ANGPOW GSL)
endif()
if(NOT FFTW_FOUND)
add_dependencies(objlib FFTW)
# Uncomment below when we bring ANGPOW back
# add_dependencies(ANGPOW FFTW)
endif()

# The reason for building ccl as a shared library is that we can link it to
# class directly, and it's not a dependency anymore
add_library(ccl SHARED $<TARGET_OBJECTS:objlib>)
# The generator expression $<$<BOOL:${OpenMP_C_FOUND}>:OpenMP::OpenMP_C> adds the OpenMP library if OpenMP is available
target_link_libraries(ccl ${GSL_LIBRARIES} ${FFTW_LIBRARIES} ${CLASS_LIBRARIES} ${ANGPOW_LIBRARIES} m $<$<BOOL:${OpenMP_C_FOUND}>:OpenMP::OpenMP_C>)
target_link_libraries(ccl ${GSL_LIBRARIES} ${FFTW_LIBRARIES} ${CLASS_LIBRARIES} m $<$<BOOL:${OpenMP_C_FOUND}>:OpenMP::OpenMP_C>)

# Builds the test suite
add_executable(check_ccl ${TEST_SRC})
Expand Down
131 changes: 0 additions & 131 deletions benchmarks/ccl_test_angpow.c

This file was deleted.

Binary file added benchmarks/data/nonlimber/background.npz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added benchmarks/data/nonlimber/dNdzs_fullwidth.npz
Binary file not shown.
Binary file added benchmarks/data/nonlimber/kernels_fullwidth.npz
Binary file not shown.
Binary file added benchmarks/data/nonlimber/pk.npz
Binary file not shown.
70 changes: 70 additions & 0 deletions benchmarks/data/pt_bm_bacco_lbias_z0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
1.000000000000000048e-04 6.855035589030412957e+06 1.731322507686917903e+06
1.125017868369810811e-04 6.305171508418726735e+06 1.582594949291167548e+06
1.265665204151353231e-04 5.785967353791039437e+06 1.442792104142579250e+06
1.423895970044196770e-04 5.296550671375462785e+06 1.311645761624566978e+06
1.601908408999486275e-04 4.836049007399951108e+06 1.188887711121035740e+06
1.802175583616277257e-04 4.403589908092526719e+06 1.074249742015381111e+06
2.027479733508104082e-04 3.998300919680489227e+06 9.674636436908420874e+05
2.280950927954279619e-04 3.619309588390721940e+06 8.682612055304173846e+05
2.566110550823265716e-04 3.265743460452281870e+06 7.763742169183804654e+05
2.886920221888471748e-04 2.936730082092395518e+06 6.915344672377756797e+05
3.247836834182669485e-04 2.631396999538830481e+06 6.134737458721853327e+05
3.653874472005138197e-04 2.348871759019009769e+06 5.419238422048285138e+05
4.110674069786092737e-04 2.088281906761171995e+06 4.766165456194913713e+05
4.624581779553800964e-04 1.848754988992715254e+06 4.172836454994115629e+05
5.202737135735483647e-04 1.629418551941404119e+06 3.636569312280857121e+05
5.853172242133589456e-04 1.429400141835035989e+06 3.154681921889922814e+05
6.584923359046477350e-04 1.247827304901328404e+06 2.724492177655681735e+05
7.408156440773042140e-04 1.083827587368055945e+06 2.343317973413098371e+05
8.334308367548572648e-04 9.365285354628558271e+05 2.008477202996404667e+05
9.376245833996174270e-04 8.050576954135099659e+05 1.717287760240163479e+05
1.054844410147369503e-03 6.885426134477542946e+05 1.467067538979064557e+05
1.186718809765804124e-03 5.861108357931714272e+05 1.255134433046632039e+05
1.335079865717084041e-03 4.968899086777408957e+05 1.078806336279096286e+05
1.501988704632487232e-03 4.200073783289733692e+05 9.354011425096351013e+04
1.689764130801174212e-03 3.545907909746699152e+05 8.222367455732729286e+04
1.901014840481703464e-03 2.997676928425814258e+05 7.366310393046194804e+04
2.138675663578101793e-03 2.546656301604587352e+05 6.759019175383858965e+04
2.406048336173026957e-03 2.184121491559549759e+05 6.373672741086473252e+04
2.706847370356106099e-03 1.901347960568578856e+05 6.183450028503002977e+04
3.045251658600457711e-03 1.689611170908559870e+05 6.161529975976930291e+04
3.425962529608314513e-03 1.540186584857124253e+05 6.281091521855384053e+04
3.854269062174795271e-03 1.444349664691298094e+05 6.515313604482416122e+04
4.336121564451593177e-03 1.393375872688434902e+05 6.837375162203848595e+04
4.878214239431705873e-03 1.378540671125804947e+05 7.220455133365021902e+04
5.488078185096710929e-03 1.391119522280704114e+05 7.637732456311455462e+04
6.174186021244368154e-03 1.422387888430423627e+05 8.062386069388614851e+04
6.946069596539016129e-03 1.463621231852223282e+05 8.467594910941817216e+04
7.814452411046684047e-03 1.506095014823389938e+05 8.826537919316513580e+04
8.791398593953060961e-03 1.541084699621199979e+05 9.112394032858090941e+04
9.890480506158424306e-03 1.562512351973984623e+05 9.303400141059812449e+04
1.112696729619151899e-02 1.570776950108758174e+05 9.388496726643192233e+04
1.251803702898198097e-02 1.560964727966866922e+05 9.339143319992923352e+04
1.408301533451966799e-02 1.530083412248911336e+05 9.138866302858100971e+04
1.584364389186067659e-02 1.478099369707513251e+05 8.778123262820804666e+04
1.782438247843147125e-02 1.406713264526355197e+05 8.271700102806974610e+04
2.005274878089318216e-02 1.318069295894066454e+05 7.639847539796734054e+04
2.255970068843577217e-02 1.218050505921091826e+05 6.925515076792147011e+04
2.538006637956496600e-02 1.115507349460478581e+05 6.193308795112917142e+04
2.855302817742248062e-02 1.018606175297661539e+05 5.513927801614269265e+04
3.212266689566698613e-02 9.343733965296312817e+04 4.933937925436145451e+04
3.613857423731676316e-02 8.667749094105955737e+04 4.492700872193000396e+04
4.065654175439026990e-02 8.118331846965101431e+04 4.146428609593502188e+04
4.573933593981235196e-02 7.589140657157383976e+04 3.826747317999914230e+04
5.145757021965836897e-02 6.968134210939257173e+04 3.432066468152480229e+04
5.789068596000986056e-02 6.218479290794593544e+04 2.943168996150249950e+04
6.512805611719643673e-02 5.468021221455463092e+04 2.454961468407437860e+04
7.327022686403775187e-02 4.844426069067248318e+04 2.091755571477606281e+04
8.243031444155220211e-02 4.383208375223904295e+04 1.867093857859003037e+04
9.273557664208829932e-02 3.990856214840315806e+04 1.664717399621781078e+04
1.043291807559273976e-01 3.563047891117057588e+04 1.425023996776120293e+04
1.173721925428021368e-01 3.185891197906968591e+04 1.226188214779403825e+04
1.320458138603942677e-01 2.915394661601902044e+04 1.099675414611043561e+04
1.485539000363775841e-01 2.643317288311504672e+04 9.710702582257510585e+03
1.671257919569474892e-01 2.400396424968933570e+04 8.614309544499872572e+03
1.880195022170215446e-01 2.193334960257961939e+04 7.742739802899634014e+03
2.115252995961465210e-01 2.007347703997483040e+04 6.967392010316811138e+03
2.379697416579423519e-01 1.846920023339546606e+04 6.327384991037761210e+03
2.677202114965329116e-01 1.708514059014760278e+04 5.777041934382074032e+03
3.011900216573443756e-01 1.589338777559453592e+04 5.309448138988474966e+03
3.388441561392025458e-01 1.486986077699188718e+04 4.904235139092390455e+03
Loading

0 comments on commit 9b7450d

Please sign in to comment.