Skip to content

Commit

Permalink
2.4.14 release (#888)
Browse files Browse the repository at this point in the history
* Fix MPI off to not broadcast if never enabled
* Fix warning message in dynesty solver
* Fix multi-compute with enabled/disabled datasets
* Fix error message in compute_ld_coeffs
* Fix segfaults in macos-14
* Now requires C++14-compatible compiler

---------

Co-authored-by: Michael Abdul-Masih <40573575+MichaelAbdul-Masih@users.noreply.github.com>
Co-authored-by: Andrej Prsa <aprsa@villanova.edu>
Co-authored-by: Martin Horvat <horvat77@gmail.com>
  • Loading branch information
4 people authored Jun 9, 2024
1 parent 01e109c commit 0f7da23
Show file tree
Hide file tree
Showing 18 changed files with 1,390 additions and 873 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-22.04, macos-13, macos-14] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
toolchain:
- {compiler: gcc, version: 13} # https://github.com/fortran-lang/setup-fortran

Expand Down Expand Up @@ -52,24 +52,6 @@ jobs:
python -m pip install pipdeptree
pipdeptree
- name: Checkout photodynam
uses: actions/checkout@v4
with:
repository: phoebe-project/photodynam
path: photodynam

- name: Install photodynam
run: |
cd photodynam
make
sudo cp photodynam /usr/local/bin/
python setup.py build && python3 setup.py install --user
cd ..
- name: Test photodynam install
run: |
python -c "import photodynam"
- name: Setup GNU Fortran
id: setup-fortran
uses: fortran-lang/setup-fortran@v1
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ To understand how to use PHOEBE, please consult the [tutorials, scripts and manu
CHANGELOG
----------

### 2.4.14

* Fix MPI off to not broadcast if never enabled
* Fix warning message in dynesty solver
* Fix multi-compute with enabled/disabled datasets
* Fix error message in compute_ld_coeffs
* Fix segfaults in macos-14
* Now requires C++14-compatible compiler

### 2.4.13

* optimization: dynamical RVs avoid unnecessary meshing
Expand Down
4 changes: 2 additions & 2 deletions phoebe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""

__version__ = '2.4.13'
__version__ = '2.4.14'

import os as _os
import sys as _sys
Expand Down Expand Up @@ -162,7 +162,7 @@ def on(self, nprocs=None):
self.nprocs = nprocs

def off(self):
if self.within_mpirun and self.myrank == 0:
if self.within_mpirun and self.enabled and self.myrank == 0:
self.comm.bcast({'worker_command': 'release'}, root=0)

self._enabled = False
Expand Down
6 changes: 4 additions & 2 deletions phoebe/frontend/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -4787,7 +4787,7 @@ def run_checks_solver(self, solver=None, compute=None, solution=None, figure=Non
report.add_item(self,
"sampling with dataset-scaled can cause unintended issues. Consider using component-coupled and marginalizing over pblum",
offending_parameters.to_list()+
[solver_ps.get_parameter(qualifier='priors' if solver in ['dynesty'] else 'init_from', **_skip_filter_checks)]+
[solver_ps.get_parameter(qualifier='priors' if solver_kind in ['dynesty'] else 'init_from', **_skip_filter_checks)]+
addl_parameters,
False, 'run_solver')

Expand Down Expand Up @@ -10257,6 +10257,8 @@ def compute_ld_coeffs(self, compute=None, set_value=False, **kwargs):
raise TypeError("compute must be a single value (string)")

datasets = kwargs.pop('dataset') if 'dataset' in kwargs else self._datasets_where(compute=compute, mesh_needed=True)
if isinstance(datasets, str):
datasets = [datasets]

# we'll add 'bol' to the list of default datasets... but only if bolometric is needed for irradiation
compute_ps = self.get_compute(compute, **_skip_filter_checks)
Expand Down Expand Up @@ -12139,7 +12141,7 @@ def _scale_fluxes_cfit(fluxes, scale_factor):
continue

fluxes = flux_param.get_value(unit=u.W/u.m**2)
fluxes = fluxes/distance**2 + l3s.get(dataset)
fluxes = fluxes/distance**2 + l3s.get(dataset, 0.0)

flux_param.set_value(fluxes, ignore_readonly=True)

Expand Down
6 changes: 3 additions & 3 deletions phoebe/lib/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#CXX=icpc
CXX=g++
#CXX=clang++
CXXFLAGS=-O3 -Wall -std=c++11
CXXFLAGS=-O3 -Wall -Wextra

ifdef PYTHON
CXXFLAGS+=$(shell $(PYTHON)-config --includes)
LDFLAGS+=$(shell $(PYTHON)-config --ldflags)
else
CXXFLAGS+=$(shell python-config --includes)
LDFLAGS+=$(shell python-config --ldflags)
CXXFLAGS+=$(shell python3-config --includes)
LDFLAGS+=$(shell python3-config --ldflags)
endif

LIBP=libphoebe
Expand Down
6 changes: 3 additions & 3 deletions phoebe/lib/bodies.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ struct Tsphere {
ret[3] = potential-value
*/
void grad(T r[3], T ret[4], const bool & precision = false){
void grad(T r[3], T ret[4], [[maybe_unused]] const bool & precision = false){

for (int i = 0; i < 3; ++i) ret[i] = 2*r[i];

ret[3] = r[0]*r[0] + r[1]*r[1] + r[2]*r[2] - R2;
}


void grad_only(T r[3], T ret[3], const bool & precision = false){
void grad_only(T r[3], T ret[3], [[maybe_unused]] const bool & precision = false){

for (int i = 0; i < 3; ++i) ret[i] = 2*r[i];

Expand Down Expand Up @@ -1020,7 +1020,7 @@ struct Tmisaligned_roche {
*/

Tmisaligned_roche(T *params) {

q = params[0];
F = params[1];
delta = params[2];
Expand Down
Loading

0 comments on commit 0f7da23

Please sign in to comment.