Skip to content

Commit e3fbaf2

Browse files
committed
Merge branch 'master' into multitrait
2 parents e13904c + f11de0d commit e3fbaf2

16 files changed

Lines changed: 107 additions & 95 deletions

EidosScribe/EidosScribe-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>4.1</string>
20+
<string>4.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

EidosScribe/EidosScribe_multi-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>4.1</string>
20+
<string>4.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

QtSLiM/QtSLiM.pro

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ QMAKE_INFO_PLIST = QtSLiM_Info.plist
2121
ICON = QtSLiM_AppIcon.icns
2222
QMAKE_TARGET_BUNDLE_PREFIX = "org.messerlab"
2323
QMAKE_BUNDLE = "SLiMgui" # This governs the location of our prefs, which we keep under org.messerlab.SLiMgui
24-
VERSION = 5.1
24+
VERSION = 5.2
2525

2626
docIconFiles.files = $$PWD/QtSLiM_DocIcon.icns
2727
docIconFiles.path = Contents/Resources
@@ -46,20 +46,16 @@ QMAKE_BUNDLE_DATA += docIconFiles
4646
# that building in Qt Creator is not the primary supported build method for SLiM, and is probably mostly
4747
# used only by me; I just want this on for development. See https://github.com/MesserLab/SLiM/issues/598.
4848
# Note that these settings are set in eidos.pro, core.pro, and QtSLiM.pro.
49-
isEmpty(QMAKE_TARGET.arch):QMAKE_TARGET.arch = $$QMAKE_HOST.arch
5049
message("Target architecture is: $${QMAKE_TARGET.arch}")
5150

52-
contains(QMAKE_TARGET.arch, x86_64) {
53-
message("Building for x86_64; enabling AVX2 and FMA")
54-
QMAKE_CFLAGS += -mavx2 -mfma
55-
QMAKE_CXXFLAGS += -mavx2 -mfma
56-
DEFINES += EIDOS_HAS_AVX2=1 EIDOS_HAS_FMA=1
57-
}
58-
contains(QMAKE_TARGET.arch, arm64) {
59-
# ARM64 NEON is always available on ARM64, no compiler flag needed
60-
message("Building for ARM64; enabling NEON")
61-
DEFINES += EIDOS_HAS_NEON=1
62-
}
51+
QMAKE_CFLAGS += -Xarch_x86_64 -mavx2 -Xarch_x86_64 -mfma
52+
QMAKE_CXXFLAGS += -Xarch_x86_64 -mavx2 -Xarch_x86_64 -mfma
53+
54+
QMAKE_CFLAGS += -Xarch_x86_64 -DEIDOS_HAS_AVX2=1 -Xarch_x86_64 -DEIDOS_HAS_FMA=1
55+
QMAKE_CXXFLAGS += -Xarch_x86_64 -DEIDOS_HAS_AVX2=1 -Xarch_x86_64 -DEIDOS_HAS_FMA=1
56+
57+
QMAKE_CFLAGS += -Xarch_arm64 -DEIDOS_HAS_NEON=1
58+
QMAKE_CXXFLAGS += -Xarch_arm64 -DEIDOS_HAS_NEON=1
6359

6460

6561
# Get the current Git SHA-1 and put it into a define; see https://stackoverflow.com/questions/27041573/print-git-hash-in-qt-as-macro-created-at-compile-time

SLiM.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
%endif
2626

2727
Name: SLiM
28-
Version: 5.1
28+
Version: 5.2
2929
Release: 1%{?dist}
3030
Summary: an evolutionary simulation framework
3131

@@ -119,6 +119,10 @@ cmake --install %_vpath_builddir --prefix %{buildroot}/usr
119119
%{_datadir}/mime/packages/org.messerlab.slimgui-mime.xml
120120

121121
%changelog
122+
* Fri Apr 11 2026 Ben Haller <bhaller@mac.com> - 5.2-1
123+
- No changes to the package have been made since the last release.
124+
- Final candidate 1 for 5.2 release
125+
122126
* Fri Sep 12 2025 Ben Haller <bhaller@mac.com> - 5.1-1
123127
- No changes to the package have been made since the last release.
124128
- Final candidate 1 for 5.1 release

SLiMgui/SLiMguiLegacy-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<key>CFBundlePackageType</key>
8989
<string>APPL</string>
9090
<key>CFBundleShortVersionString</key>
91-
<string>5.1</string>
91+
<string>5.2</string>
9292
<key>CFBundleSignature</key>
9393
<string>????</string>
9494
<key>CFBundleVersion</key>

SLiMgui/SLiMguiLegacy_multi-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<key>CFBundlePackageType</key>
8989
<string>APPL</string>
9090
<key>CFBundleShortVersionString</key>
91-
<string>5.1</string>
91+
<string>5.2</string>
9292
<key>CFBundleSignature</key>
9393
<string>????</string>
9494
<key>CFBundleVersion</key>

VERSIONS

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,6 @@ Note that not every commit will be logged here; that is what the Github commit h
66

77

88
development head (in the master branch):
9-
add cppcheck support in our cmake config, for development testing purposes
10-
speed up the SpatialMap smooth() method in 2D without periodicity, since this is important for the Chevy et al. competition algorithm
11-
add Plot method setBorderless() for making plots without border annotations -- no axes, ticks, labels
12-
fix display of images in Plot; it was antialiasing in some cases (such as PDF generation), which is not desirable
13-
add segments() call to Plot, for plotting a set of unconnected line segments
14-
add rects() call to Plot, for plotting a set of rectangles
15-
extend text() to support drawing text at an angle, with new [float angle = 0.0] parameter
16-
add mtext() call to Plot, for drawing text in the margins outside the plot area
17-
add rowSums() and colSums() functions to Eidos, for use with matrices as a faster alternative to apply()
18-
add the PCG random number generator, switch to pcg32_fast and pcg64_fast, remove all use of the old taus2 and MT19937-64 generators; note this completely breaks backward reproducibility
19-
fix various bugs involving conflicts between defined constants and other symbols, including #573 and #574; this sets new definition rules that could break some existing scripts (but is unlikely to)
20-
fix #575, QtSLiM terminates early when single-stepping with a rescheduled script block
21-
fix #579, crash in models with (a) tree-seq recording, (b) multiple chromosomes, AND (c) rejection of proposed offspring in modifyChild()
22-
add readLine() function for obtaining stdin input to running models, thanks to Chris Talbot
23-
fix #580, add isClose() and allClose() Eidos functions for comparison within a given tolerance
24-
shift to macOS 14 as the oldest supported macOS version in GitHub Actions; we no longer test on macOS 13, or with Qt 5.x on macOS (but Qt 5.x still gets tested on other platforms, for now)
25-
SIMD and SLEEF optimizations thanks to Andy Kern:
26-
add SIMD optimization for sqrt(), abs(), floor(), ceil(), trunc(), round(), sum(), product(), https://github.com/MesserLab/SLiM/pull/578
27-
further SIMD optimizations for exp(), log(), log10(), log2() based on the SLEEF framework (https://github.com/shibatch/sleef), https://github.com/MesserLab/SLiM/pull/587
28-
SIMD optimization for dnorm() using the previous SLEEF work, https://github.com/MesserLab/SLiM/pull/588
29-
SIMD optimizations for spatial interaction strength calculations, https://github.com/MesserLab/SLiM/pull/590
30-
add comprehensive tests for spatial interaction kernel calculations; includes SIMD vs scalar consistency tests, C++ level tests, and script-level tests, https://github.com/MesserLab/SLiM/pull/592
31-
add SIMD acceleration for trig functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), power functions (^ opperator, pow, SpatialMap.pow()), https://github.com/MesserLab/SLiM/pull/595
32-
add SIMD acceleration to SpatialMap.smooth() for 2-6x speedup, https://github.com/MesserLab/SLiM/pull/599
33-
fix #593, Student's T distribution had a sign error in the SpatialKernel method tdist(), thanks to Andy Kern, https://github.com/MesserLab/SLiM/issues/591
34-
update citations listed by citation()
35-
CI workflow for calculating code coverage with Codecov, thanks to Andy Kern, https://github.com/MesserLab/SLiM/pull/601
36-
fix #594, the pedigreeID and haplosomePedigreeID properties should be accessible (without other predigree-tracking features) in tree-seq models, even without pedigree tracking being enabled
37-
fix #584, a way to generate a random 64-bit integer is needed; added new rdunif64(integer$ n) function for this purpose
38-
shift over to Release 1 of the Total-Random fork of the PCG random number generator (better maintained), found at https://github.com/Total-Random/pcg-cpp/releases/tag/v1.0
39-
fix #602, (float)rdirichlet(integer$ n, numeric alpha) function to Eidos for Dirichlet distribution draws
40-
fix #610, distribution draws behave inconsistently with out-of-range parameters
41-
rlnorm() accepted SD < 0 and returned a value; it should error, as rnorm() does (R returns NAN in the SD < 0 case, but erroring is more consistent with Eidos policies)
42-
rexp() returned values for rate < 0; this should also error, consistent with Eidos policies
43-
add zygosityOfMutations([No<Mutation> mutations = NULL], [integer$ hemizygousValue = 1], [integer$ haploidValue = 1]) for assessing zygosity (see also mutationsFromHaplosomes())
44-
policy change: the nucleotide and nucleotideValue properties of Substitution are now read-only (I think it was a bug that they were ever read-write...?)
45-
change rects drawn by the Plot method rects() to have mitered corners, not bevelled
46-
fix #564, initializeMutationRateFromFile() needs a `sex` parameter
47-
fix #570, setMigrationRates() should make it easier to stop all migration (done in multitrait to avoid the annoying doc conflicts)
48-
specifically, this entails two changes:
49-
allow a singleton migration rate value, applied for all subpops given
50-
allow the destination subpop to be given as a source, iff all rates supplied are 0.0, to stop all migration: allSubpops.setMigrationRates(allSubpops, 0.0)
51-
fix #567, plot windows can have their aspect ratio distorted due to screen size and other constraints
52-
extend the Eidos identical() function to allow comparison of more than two parameters; e.g., (logical$)identical(* x, * y, ...)
53-
policy change: mean(integer(0)) or mean(float(0)) now returns NAN rather than NULL, to match R; I just noticed this, and NAN does seem better
54-
fix #612, Haplosome needs a mutationCount property
55-
fix #621, add a Laplace distribution function, rlaplace()
56-
fix a bug (a regression, introduced in SLiM 3.7!) in printing of large float values; ".0" is sometimes shown erroneously
57-
fix #598: in Xcode and Qt Creator, force AVX2 and FMA on for x86_64 builds (true since 2013), and NEON on for ARM64 builds (true since forever); this is pretty safe, and makes SIMD/SLEEF work even without the CMake magic for them
589

5910

6011
multitrait branch:
@@ -220,6 +171,57 @@ multitrait branch:
220171
improve code completion intelligence in SLiMgui
221172

222173

174+
version 5.2 (Eidos version 4.2):
175+
add cppcheck support in our cmake config, for development testing purposes
176+
speed up the SpatialMap smooth() method in 2D without periodicity, since this is important for the Chevy et al. competition algorithm
177+
add Plot method setBorderless() for making plots without border annotations -- no axes, ticks, labels
178+
fix display of images in Plot; it was antialiasing in some cases (such as PDF generation), which is not desirable
179+
add segments() call to Plot, for plotting a set of unconnected line segments
180+
add rects() call to Plot, for plotting a set of rectangles
181+
extend text() to support drawing text at an angle, with new [float angle = 0.0] parameter
182+
add mtext() call to Plot, for drawing text in the margins outside the plot area
183+
add rowSums() and colSums() functions to Eidos, for use with matrices as a faster alternative to apply()
184+
add the PCG random number generator, switch to pcg32_fast and pcg64_fast, remove all use of the old taus2 and MT19937-64 generators; note this completely breaks backward reproducibility
185+
fix various bugs involving conflicts between defined constants and other symbols, including #573 and #574; this sets new definition rules that could break some existing scripts (but is unlikely to)
186+
fix #575, QtSLiM terminates early when single-stepping with a rescheduled script block
187+
fix #579, crash in models with (a) tree-seq recording, (b) multiple chromosomes, AND (c) rejection of proposed offspring in modifyChild()
188+
add readLine() function for obtaining stdin input to running models, thanks to Chris Talbot
189+
fix #580, add isClose() and allClose() Eidos functions for comparison within a given tolerance
190+
shift to macOS 14 as the oldest supported macOS version in GitHub Actions; we no longer test on macOS 13, or with Qt 5.x on macOS (but Qt 5.x still gets tested on other platforms, for now)
191+
SIMD and SLEEF optimizations thanks to Andy Kern:
192+
add SIMD optimization for sqrt(), abs(), floor(), ceil(), trunc(), round(), sum(), product(), https://github.com/MesserLab/SLiM/pull/578
193+
further SIMD optimizations for exp(), log(), log10(), log2() based on the SLEEF framework (https://github.com/shibatch/sleef), https://github.com/MesserLab/SLiM/pull/587
194+
SIMD optimization for dnorm() using the previous SLEEF work, https://github.com/MesserLab/SLiM/pull/588
195+
SIMD optimizations for spatial interaction strength calculations, https://github.com/MesserLab/SLiM/pull/590
196+
add comprehensive tests for spatial interaction kernel calculations; includes SIMD vs scalar consistency tests, C++ level tests, and script-level tests, https://github.com/MesserLab/SLiM/pull/592
197+
add SIMD acceleration for trig functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), power functions (^ opperator, pow, SpatialMap.pow()), https://github.com/MesserLab/SLiM/pull/595
198+
add SIMD acceleration to SpatialMap.smooth() for 2-6x speedup, https://github.com/MesserLab/SLiM/pull/599
199+
fix #593, Student's T distribution had a sign error in the SpatialKernel method tdist(), thanks to Andy Kern, https://github.com/MesserLab/SLiM/issues/591
200+
update citations listed by citation()
201+
CI workflow for calculating code coverage with Codecov, thanks to Andy Kern, https://github.com/MesserLab/SLiM/pull/601
202+
fix #594, the pedigreeID and haplosomePedigreeID properties should be accessible (without other predigree-tracking features) in tree-seq models, even without pedigree tracking being enabled
203+
fix #584, a way to generate a random 64-bit integer is needed; added new rdunif64(integer$ n) function for this purpose
204+
shift over to Release 1 of the Total-Random fork of the PCG random number generator (better maintained), found at https://github.com/Total-Random/pcg-cpp/releases/tag/v1.0
205+
fix #602, (float)rdirichlet(integer$ n, numeric alpha) function to Eidos for Dirichlet distribution draws
206+
fix #610, distribution draws behave inconsistently with out-of-range parameters
207+
rlnorm() accepted SD < 0 and returned a value; it should error, as rnorm() does (R returns NAN in the SD < 0 case, but erroring is more consistent with Eidos policies)
208+
rexp() returned values for rate < 0; this should also error, consistent with Eidos policies
209+
add zygosityOfMutations([No<Mutation> mutations = NULL], [integer$ hemizygousValue = 1], [integer$ haploidValue = 1]) for assessing zygosity (see also mutationsFromHaplosomes())
210+
policy change: the nucleotide and nucleotideValue properties of Substitution are now read-only (I think it was a bug that they were ever read-write...?)
211+
change rects drawn by the Plot method rects() to have mitered corners, not bevelled
212+
fix #564, initializeMutationRateFromFile() needs a `sex` parameter
213+
fix #570, setMigrationRates() should make it easier to stop all migration (done in multitrait to avoid the annoying doc conflicts)
214+
specifically, this entails two changes:
215+
allow a singleton migration rate value, applied for all subpops given
216+
allow the destination subpop to be given as a source, iff all rates supplied are 0.0, to stop all migration: allSubpops.setMigrationRates(allSubpops, 0.0)
217+
fix #567, plot windows can have their aspect ratio distorted due to screen size and other constraints
218+
extend the Eidos identical() function to allow comparison of more than two parameters; e.g., (logical$)identical(* x, * y, ...)
219+
policy change: mean(integer(0)) or mean(float(0)) now returns NAN rather than NULL, to match R; I just noticed this, and NAN does seem better
220+
fix #612, Haplosome needs a mutationCount property
221+
fix #621, add a Laplace distribution function, rlaplace()
222+
fix a bug (a regression, introduced in SLiM 3.7!) in printing of large float values; ".0" is sometimes shown erroneously
223+
fix #598: in Xcode and Qt Creator, force AVX2 and FMA on for x86_64 builds (true since 2013), and NEON on for ARM64 builds (true since forever); this is pretty safe, and makes SIMD/SLEEF work even without the CMake magic for them
224+
223225
version 5.1 (Eidos version 4.1):
224226
add recipe 16.11, life-long monogamous mating
225227
add the ability to suppress the header line of a LogFile, with a new [logical$ header = T] parameter to createLogFile() (#516), and adding [Nl$ header = NULL] for setFilePath() (#516)

core/community.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include <unordered_map>
5151
#include <float.h>
5252
#include <ctime>
53+
#include <limits>
5354

5455
#include "eidos_globals.h"
5556
#if EIDOS_ROBIN_HOOD_HASHING()

core/community_eidos.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <ctime>
4040
#include <unordered_map>
4141
#include <unordered_set>
42+
#include <limits>
4243

4344

4445
static std::string PrintBytes(size_t p_bytes)

core/core.pro

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ CONFIG += staticlib
2929
# that building in Qt Creator is not the primary supported build method for SLiM, and is probably mostly
3030
# used only by me; I just want this on for development. See https://github.com/MesserLab/SLiM/issues/598.
3131
# Note that these settings are set in eidos.pro, core.pro, and QtSLiM.pro.
32-
isEmpty(QMAKE_TARGET.arch):QMAKE_TARGET.arch = $$QMAKE_HOST.arch
3332
message("Target architecture is: $${QMAKE_TARGET.arch}")
3433

35-
contains(QMAKE_TARGET.arch, x86_64) {
36-
message("Building for x86_64; enabling AVX2 and FMA")
37-
QMAKE_CFLAGS += -mavx2 -mfma
38-
QMAKE_CXXFLAGS += -mavx2 -mfma
39-
DEFINES += EIDOS_HAS_AVX2=1 EIDOS_HAS_FMA=1
40-
}
41-
contains(QMAKE_TARGET.arch, arm64) {
42-
# ARM64 NEON is always available on ARM64, no compiler flag needed
43-
message("Building for ARM64; enabling NEON")
44-
DEFINES += EIDOS_HAS_NEON=1
45-
}
34+
QMAKE_CFLAGS += -Xarch_x86_64 -mavx2 -Xarch_x86_64 -mfma
35+
QMAKE_CXXFLAGS += -Xarch_x86_64 -mavx2 -Xarch_x86_64 -mfma
36+
37+
QMAKE_CFLAGS += -Xarch_x86_64 -DEIDOS_HAS_AVX2=1 -Xarch_x86_64 -DEIDOS_HAS_FMA=1
38+
QMAKE_CXXFLAGS += -Xarch_x86_64 -DEIDOS_HAS_AVX2=1 -Xarch_x86_64 -DEIDOS_HAS_FMA=1
39+
40+
QMAKE_CFLAGS += -Xarch_arm64 -DEIDOS_HAS_NEON=1
41+
QMAKE_CXXFLAGS += -Xarch_arm64 -DEIDOS_HAS_NEON=1
4642

4743

4844
# Set up to build QtSLiM; note that these settings are set in eidos.pro, core.pro, and QtSLiM.pro

0 commit comments

Comments
 (0)