Skip to content

Commit 0f7da23

Browse files
kecnryMichaelAbdul-Masihaprsahorvatm
authored
2.4.14 release (#888)
* 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>
1 parent 01e109c commit 0f7da23

18 files changed

+1390
-873
lines changed

.github/workflows/on_pr.yml

+2-20
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19-
os: [ubuntu-latest, macos-latest] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
os: [ubuntu-22.04, macos-13, macos-14] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
2020
toolchain:
2121
- {compiler: gcc, version: 13} # https://github.com/fortran-lang/setup-fortran
2222

@@ -52,24 +52,6 @@ jobs:
5252
python -m pip install pipdeptree
5353
pipdeptree
5454
55-
- name: Checkout photodynam
56-
uses: actions/checkout@v4
57-
with:
58-
repository: phoebe-project/photodynam
59-
path: photodynam
60-
61-
- name: Install photodynam
62-
run: |
63-
cd photodynam
64-
make
65-
sudo cp photodynam /usr/local/bin/
66-
python setup.py build && python3 setup.py install --user
67-
cd ..
68-
69-
- name: Test photodynam install
70-
run: |
71-
python -c "import photodynam"
72-
7355
- name: Setup GNU Fortran
7456
id: setup-fortran
7557
uses: fortran-lang/setup-fortran@v1

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ To understand how to use PHOEBE, please consult the [tutorials, scripts and manu
8585
CHANGELOG
8686
----------
8787

88+
### 2.4.14
89+
90+
* Fix MPI off to not broadcast if never enabled
91+
* Fix warning message in dynesty solver
92+
* Fix multi-compute with enabled/disabled datasets
93+
* Fix error message in compute_ld_coeffs
94+
* Fix segfaults in macos-14
95+
* Now requires C++14-compatible compiler
96+
8897
### 2.4.13
8998

9099
* optimization: dynamical RVs avoid unnecessary meshing

phoebe/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
"""
1919

20-
__version__ = '2.4.13'
20+
__version__ = '2.4.14'
2121

2222
import os as _os
2323
import sys as _sys
@@ -162,7 +162,7 @@ def on(self, nprocs=None):
162162
self.nprocs = nprocs
163163

164164
def off(self):
165-
if self.within_mpirun and self.myrank == 0:
165+
if self.within_mpirun and self.enabled and self.myrank == 0:
166166
self.comm.bcast({'worker_command': 'release'}, root=0)
167167

168168
self._enabled = False

phoebe/frontend/bundle.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -4787,7 +4787,7 @@ def run_checks_solver(self, solver=None, compute=None, solution=None, figure=Non
47874787
report.add_item(self,
47884788
"sampling with dataset-scaled can cause unintended issues. Consider using component-coupled and marginalizing over pblum",
47894789
offending_parameters.to_list()+
4790-
[solver_ps.get_parameter(qualifier='priors' if solver in ['dynesty'] else 'init_from', **_skip_filter_checks)]+
4790+
[solver_ps.get_parameter(qualifier='priors' if solver_kind in ['dynesty'] else 'init_from', **_skip_filter_checks)]+
47914791
addl_parameters,
47924792
False, 'run_solver')
47934793

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

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

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

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

1214412146
flux_param.set_value(fluxes, ignore_readonly=True)
1214512147

phoebe/lib/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#CXX=icpc
22
CXX=g++
33
#CXX=clang++
4-
CXXFLAGS=-O3 -Wall -std=c++11
4+
CXXFLAGS=-O3 -Wall -Wextra
55

66
ifdef PYTHON
77
CXXFLAGS+=$(shell $(PYTHON)-config --includes)
88
LDFLAGS+=$(shell $(PYTHON)-config --ldflags)
99
else
10-
CXXFLAGS+=$(shell python-config --includes)
11-
LDFLAGS+=$(shell python-config --ldflags)
10+
CXXFLAGS+=$(shell python3-config --includes)
11+
LDFLAGS+=$(shell python3-config --ldflags)
1212
endif
1313

1414
LIBP=libphoebe

phoebe/lib/bodies.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ struct Tsphere {
130130
ret[3] = potential-value
131131
132132
*/
133-
void grad(T r[3], T ret[4], const bool & precision = false){
133+
void grad(T r[3], T ret[4], [[maybe_unused]] const bool & precision = false){
134134

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

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

140140

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

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

@@ -1020,7 +1020,7 @@ struct Tmisaligned_roche {
10201020
*/
10211021

10221022
Tmisaligned_roche(T *params) {
1023-
1023+
10241024
q = params[0];
10251025
F = params[1];
10261026
delta = params[2];

0 commit comments

Comments
 (0)