Skip to content

Commit b988c4b

Browse files
Merge branch 'main' into wCorrFix
2 parents 16ad4e2 + 693c6bd commit b988c4b

17 files changed

Lines changed: 290 additions & 64 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Bug report
2+
description: Create a report describing unexpected or incorrect behavior in EXP.
3+
labels: Bug
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: >-
8+
Thanks for taking the time to fill out this bug report! Please provide a clear and concise description of the bug you've encountered.
9+
- type: dropdown
10+
id: interface
11+
attributes:
12+
label: Interface
13+
description: Which interface of EXP are you using?
14+
options:
15+
- pyEXP
16+
- EXP N-body
17+
default: 0
18+
validations:
19+
required: true
20+
- type: dropdown
21+
id: version
22+
attributes:
23+
label: Version
24+
description: How are you accessing EXP?
25+
options:
26+
- Docker
27+
- Local compile
28+
default: 0
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: exactversion
33+
attributes:
34+
label: Exact Version
35+
description: Please provide the exact version of EXP you are using. If using pyEXP, please provide the output of `python -c "import pyEXP; pyEXP.util.getVersionInfo()"`; If using N-body, please provide the output of `exp -v`.
36+
render: shell
37+
- type: textarea
38+
attributes:
39+
label: Description
40+
description: >-
41+
A clear and concise description of what the bug is.
42+
- type: textarea
43+
attributes:
44+
label: Expected behavior
45+
description: >-
46+
A clear and concise description of what you expected to happen.
47+
- type: textarea
48+
id: logs
49+
attributes:
50+
label: Relevant log output
51+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
52+
render: shell

CITATIONS.bib

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ARTICLE{2022MNRAS.510.6201P,
2+
author = {{Petersen}, Michael S. and {Weinberg}, Martin D. and {Katz}, Neal},
3+
title = "{EXP: N-body integration using basis function expansions}",
4+
journal = {\mnras},
5+
keywords = {methods: numerical, Galaxy: halo, galaxies: haloes, galaxies: kinematics and dynamics, galaxies: structure, Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics},
6+
year = 2022,
7+
month = mar,
8+
volume = {510},
9+
number = {4},
10+
pages = {6201-6217},
11+
doi = {10.1093/mnras/stab3639},
12+
archivePrefix = {arXiv},
13+
eprint = {2104.14577},
14+
primaryClass = {astro-ph.GA},
15+
adsurl = {https://ui.adsabs.harvard.edu/abs/2022MNRAS.510.6201P},
16+
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
17+
}
18+
19+
@ARTICLE{1999AJ....117..629W,
20+
author = {{Weinberg}, Martin D.},
21+
title = "{An Adaptive Algorithm for N-Body Field Expansions}",
22+
journal = {\aj},
23+
keywords = {CELESTIAL MECHANICS, STELLAR DYNAMICS, GALAXIES: STRUCTURE, GALAXY: STRUCTURE, METHODS: NUMERICAL, Astrophysics},
24+
year = 1999,
25+
month = jan,
26+
volume = {117},
27+
number = {1},
28+
pages = {629-637},
29+
doi = {10.1086/300669},
30+
archivePrefix = {arXiv},
31+
eprint = {astro-ph/9805357},
32+
primaryClass = {astro-ph},
33+
adsurl = {https://ui.adsabs.harvard.edu/abs/1999AJ....117..629W},
34+
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
35+
}
36+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ find_package(OpenMP)
7474
find_package(FFTW REQUIRED)
7575
find_package(HDF5 COMPONENTS C CXX HL REQUIRED)
7676
find_package(TIRPC) # Check for alternative Sun rpc support
77-
find_package(Eigen3 REQUIRED)
77+
find_package(Eigen3 3.4...<3.5 REQUIRED)
7878
find_package(PNG)
7979
find_package(Git)
8080

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
There are many ways to contribute to EXP. Here are some of them:
44

5-
- Blog about EXP. Cite the EXP published papers. Tell the world how
5+
- Blog about EXP. Cite the EXP published papers (using
6+
the papers in [`CITATIONS.bib`](https://github.com/EXP-code/EXP/blob/main/CITATIONS.bib)). Tell the world how
67
you're using EXP. This will help newcomers with more examples and
78
will help the EXP project to increase its visibility.
89
- Report bugs and request features in the [issue

INSTALL.md

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
# Configuring and building EXP
22

3-
We are now using git submodules to provide a number of packages that
4-
are not common in the HPC environments. These include
3+
EXP uses CMake for building a configuration.
54

6-
- `HighFive`, a C++ wrapper
7-
class to HDF5
8-
- `yaml-cpp`, a C++ class for reading and emitting YAML code
9-
- `pybind11` which is used for Python bindings to the C++ classes
10-
- `rapidxml`, used to write VTK files for rendering outside of EXP
11-
- `png++`, C++ wrappers to the png library [Note: png support is optional]
5+
We recommend building "out of source" to allow for multiple
6+
configurations. This allows one to have build various versions
7+
available from the same source, such as `Release` and `Debug` (see below).
8+
9+
## Required Libraries for installation
10+
11+
Most required libraries will be available on HPC systems, but a local
12+
user may need to install some libraries (e.g. using `apt-get` on linux,
13+
and `homebrew` or `macports` on OSX).
14+
15+
| Library | Version |
16+
|---------|-----------|
17+
| Eigen | >= 3.4 |
18+
| FFTW | >= 2.0 |
19+
| HDF5 | >=1.12 |
20+
| OpenMPI | >=4.0 |
21+
22+
Other libraries are automatically installed along with EXP using `git submodule` (see next step).
1223

13-
CMake will automatically download and configure these packages on the
14-
first call. However, if you would to do this manually, from the
15-
top-level directory, execute the following command:
24+
### Obtaining Additional libraries
25+
26+
We are now using git submodules to provide `yaml-cpp`, which is not
27+
common in the HPC environments. So, from the top-level directory, do
28+
the following:
1629

1730
```
1831
git submodule update --init --recursive
@@ -21,18 +34,32 @@ top-level directory, execute the following command:
2134
This will install the source packages in the `extern` directory.
2235

2336

24-
## EXP uses CMake for building a configuration
25-
26-
I recommend building "out of source" to allow for multiple
27-
configurations. This allows one to have build various versions
28-
available from the same source, such as `Release` and `Debug`. To
29-
begin, make a build directory and change to that:
37+
## Building using CMake
3038

39+
To begin the CMake configuration, make a build directory and change to that:
3140
```
3241
mkdir -p build
3342
cd build
3443
```
3544

45+
The next step is to create the CMake configuration,
46+
```
47+
cmake ..
48+
```
49+
build,
50+
```
51+
make -j 4
52+
```
53+
and finally install.
54+
```
55+
make install
56+
```
57+
The `-j 4` flag allows up to 4 processes to compile simulateously. Change 4 to the number of cores you can allot to compiling.
58+
59+
More details are available below, and troubleshooting can be found in the GitHub discussions.
60+
61+
## In more detail...
62+
3663
CMake is designed to detect commonly used utilities and libraries
3764
automatically, but sometimes needs help and hints. For example, if
3865
CMake does not find a library, you can add the location of the library
@@ -57,7 +84,7 @@ Generally, the install location will need to be changed in the example
5784
below. E.g. I would use `-DCMAKE_INSTALL_PREFIX=/home/mdw_umass_edu`
5885
on the UMass Unity cluster to install in my home directory.
5986

60-
## EXP options
87+
### EXP options
6188

6289
There are a number of EXP-specific options that control the build.
6390
The most important of these are:
@@ -123,7 +150,7 @@ Putting these together so far, your CMake call would be:
123150
```
124151
export CUDAARCHS="75;80;86"
125152
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=YES -DENABLE_USER=YES -DEigen3_DIR=$EIGEN_BASE/share/eigen3/cmake -DCMAKE_INSTALL_PREFIX=/home/user -Wno-dev ..
126-
````
153+
```
127154

128155
## Configuring without CUDA
129156

Paper/paper/paper.bib

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,46 @@ @book{Binney:2008
77
Year = 2008
88
}
99

10+
@ARTICLE{Gadget4,
11+
author = {{Springel}, Volker and {Pakmor}, R{\"u}diger and {Zier}, Oliver and {Reinecke}, Martin},
12+
title = "{Simulating cosmic structure formation with the GADGET-4 code}",
13+
journal = {Monthly Notices of the RAS},
14+
keywords = {methods: numerical, galaxies: interactions, dark matter, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics},
15+
year = 2021,
16+
month = sep,
17+
volume = {506},
18+
number = {2},
19+
pages = {2871-2949},
20+
doi = {10.1093/mnras/stab1855},
21+
archivePrefix = {arXiv},
22+
eprint = {2010.03567},
23+
primaryClass = {astro-ph.IM},
24+
adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.506.2871S},
25+
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
26+
}
27+
28+
29+
30+
@ARTICLE{Wang:15,
31+
author = {{Wang}, Long and {Spurzem}, Rainer and {Aarseth}, Sverre and {Nitadori}, Keigo and {Berczik}, Peter and {Kouwenhoven}, M.~B.~N. and {Naab}, Thorsten},
32+
title = "{NBODY6++GPU: ready for the gravitational million-body problem}",
33+
journal = {Monthly Notices of the RAS},
34+
keywords = {methods: numerical, globular clusters: general, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Solar and Stellar Astrophysics},
35+
year = 2015,
36+
month = jul,
37+
volume = {450},
38+
number = {4},
39+
pages = {4070-4080},
40+
doi = {10.1093/mnras/stv817},
41+
archivePrefix = {arXiv},
42+
eprint = {1504.03687},
43+
primaryClass = {astro-ph.IM},
44+
adsurl = {https://ui.adsabs.harvard.edu/abs/2015MNRAS.450.4070W},
45+
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
46+
}
47+
48+
49+
1050
@article{gaia,
1151
author = {{Gaia Collaboration}},
1252
title = "{The Gaia mission}",
@@ -28,7 +68,7 @@ @article{gaia_DR2_disk
2868
Doi = {10.1051/0004-6361/201832865},
2969
Eid = {A11},
3070
Eprint = {1804.09380},
31-
Journal = {A\&Ap},
71+
Journal = {Astronomy and Astrophysics},
3272
Month = {Aug},
3373
Pages = {A11},
3474
Primaryclass = {astro-ph.GA},
@@ -82,7 +122,7 @@ @misc{pybind11
82122
@ARTICLE{Weinberg:23,
83123
author = {{Weinberg}, Martin D.},
84124
title = "{New dipole instabilities in spherical stellar systems}",
85-
journal = {MNRAS},
125+
journal = {Monthly Notices of the RAS},
86126
year = 2023,
87127
month = nov,
88128
volume = {525},
@@ -97,7 +137,7 @@ @ARTICLE{Weinberg:23
97137
@ARTICLE{Weinberg:21,
98138
author = {{Weinberg}, Martin D. and {Petersen}, Michael S.},
99139
title = "{Using multichannel singular spectrum analysis to study galaxy dynamics}",
100-
journal = {MNRAS},
140+
journal = {Monthly Notices of the RAS},
101141
year = 2021,
102142
month = mar,
103143
volume = {501},
@@ -112,7 +152,7 @@ @ARTICLE{Weinberg:21
112152
@ARTICLE{Petersen:22,
113153
author = {{Petersen}, Michael S. and {Weinberg}, Martin D. and {Katz}, Neal},
114154
title = "{EXP: N-body integration using basis function expansions}",
115-
journal = {\mnras},
155+
journal = {Monthly Notices of the RAS},
116156
keywords = {methods: numerical, Galaxy: halo, galaxies: haloes, galaxies: kinematics and dynamics, galaxies: structure, Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics},
117157
year = 2022,
118158
month = mar,
@@ -128,7 +168,7 @@ @ARTICLE{Petersen:22
128168
@ARTICLE{Johnson:23,
129169
author = {{Johnson}, Alexander C. and {Petersen}, Michael S. and {Johnston}, Kathryn V. and {Weinberg}, Martin D.},
130170
title = "{Dynamical data mining captures disc-halo couplings that structure galaxies}",
131-
journal = {MNRAS},
171+
journal = {Monthly Notices of the RAS},
132172
keywords = {galaxies: disc, galaxies: haloes, galaxies: structure, Astrophysics - Astrophysics of Galaxies, Astrophysics - Instrumentation and Methods for Astrophysics},
133173
year = 2023,
134174
month = may,
@@ -188,7 +228,7 @@ @Article{matplotlib
188228
@ARTICLE{Weinberg:99,
189229
author = {{Weinberg}, Martin D.},
190230
title = "{An Adaptive Algorithm for N-Body Field Expansions}",
191-
journal = {\aj},
231+
journal = {Astronomical Journal},
192232
keywords = {CELESTIAL MECHANICS, STELLAR DYNAMICS, GALAXIES: STRUCTURE, GALAXY: STRUCTURE, METHODS: NUMERICAL, Astrophysics},
193233
year = 1999,
194234
month = jan,
@@ -256,7 +296,7 @@ @manual{mpi41
256296
@ARTICLE{GaravitoCamargo:21,
257297
author = {{Garavito-Camargo}, Nicol{\'a}s and {Besla}, Gurtina and {Laporte}, Chervin F.~P. and {Price-Whelan}, Adrian M. and {Cunningham}, Emily C. and {Johnston}, Kathryn V. and {Weinberg}, Martin and {G{\'o}mez}, Facundo A.},
258298
title = "{Quantifying the Impact of the Large Magellanic Cloud on the Structure of the Milky Way's Dark Matter Halo Using Basis Function Expansions}",
259-
journal = {\apj},
299+
journal = {Astrophysical Journal},
260300
keywords = {Milky Way dynamics, Large Magellanic Cloud, Milky Way dark matter halo, 1051, 903, 1049, Astrophysics - Astrophysics of Galaxies},
261301
year = 2021,
262302
month = oct,
@@ -275,7 +315,7 @@ @ARTICLE{GaravitoCamargo:21
275315
@ARTICLE{Hernquist:90,
276316
author = {{Hernquist}, Lars},
277317
title = "{An Analytical Model for Spherical Galaxies and Bulges}",
278-
journal = {\apj},
318+
journal = {Astrophysical Journal},
279319
keywords = {Computational Astrophysics, Elliptical Galaxies, Galactic Bulge, Galactic Structure, Astronomical Models, Astronomical Photometry, Brightness Distribution, Distribution Functions, Astrophysics, GALAXIES: PHOTOMETRY, GALAXIES: STRUCTURE},
280320
year = 1990,
281321
month = jun,
@@ -291,7 +331,7 @@ @ARTICLE{Hernquist:90
291331
@ARTICLE{Hernquist:92,
292332
author = {{Hernquist}, Lars and {Ostriker}, Jeremiah P.},
293333
title = "{A Self-consistent Field Method for Galactic Dynamics}",
294-
journal = {\apj},
334+
journal = {Astrophysical Journal},
295335
keywords = {Celestial Mechanics, Computational Astrophysics, Galaxies, Stellar Motions, Algorithms, Astronomical Models, Dynamical Systems, Numerical Analysis, Astrophysics, CELESTIAL MECHANICS, STELLAR DYNAMICS, METHODS: NUMERICAL},
296336
year = 1992,
297337
month = feb,
@@ -305,7 +345,7 @@ @ARTICLE{Hernquist:92
305345
@ARTICLE{NFW,
306346
author = {{Navarro}, Julio F. and {Frenk}, Carlos S. and {White}, Simon D.~M.},
307347
title = "{A Universal Density Profile from Hierarchical Clustering}",
308-
journal = {\apj},
348+
journal = {Astrophysical Journal},
309349
keywords = {Cosmology: Theory, Cosmology: Dark Matter, Galaxies: Halos, Methods: Numerical, Astrophysics},
310350
year = 1997,
311351
month = dec,

Paper/paper/paper.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ the variation of _any_ field in space. In the context of galactic
7878
dynamics, these fields may be density, potential, force, velocity
7979
fields or any intrinsic field produced by simulations such as
8080
chemistry data. By combining the coefficient information through time
81-
using multichannel singular spectral analysis (mSSA; @SSA), a
81+
using multichannel singular spectral analysis [mSSA, @SSA], a
8282
non-parametric spectral technique, `EXP` can deepen our understanding
8383
by discovering the dynamics of galaxy evolution directly from
8484
simulated, and by analogy, observed data.
@@ -139,11 +139,21 @@ computed bases and resulting coefficient data are stored in HDF5
139139

140140
## N-body simulation
141141

142+
Computing the gravitational potential and forces from a collection of
143+
N particles is typically an expensive endeavour. EXP reduces the cost
144+
by using BFE to compute the potential and forces such that computational
145+
effort scales with the number of particles. Other modern N-body codes
146+
use direct summation [@Wang:15] or tree-based solutions [@Gadget4],
147+
which have computational effort that scales as N$^2$ and N log N,
148+
respectively. The trade off for BFE solutions comes in the form of
149+
restricted degrees of freedom; for many problems in near-equilibrium
150+
galactic dynamics this is not a problem, but rather a feature.
151+
142152
Our design includes a wide choice of run-time summary diagnostics,
143153
phase-space output formats, dynamically loadable user libraries, and
144154
easy extensibility. Stand-alone routines include the EOF and mSSA
145155
methods described above, and the modular software architecture of
146-
EXP enables users to easily build and maintain extensions. The `EXP`
156+
`EXP` enables users to easily build and maintain extensions. The `EXP`
147157
code base is described in published papers [@Petersen:22; @Weinberg:23]
148158
and has been used, enhanced, and rigorously tested for nearly two
149159
decades.
@@ -174,12 +184,15 @@ table above as well as coefficients for an input data set. Each of
174184
these tools are Python classes that accept `numpy` [@numpy] arrays for
175185
immediate interoperability with `matplotlib` [@matplotlib] and
176186
Astropy. We include a verified set of stand-alone routines that read
177-
phase-space files from many major cosmological tree codes and produce
187+
phase-space files from many major cosmological tree codes [for example,
188+
@Gadget4] and produce
178189
BFE-based analyses. The code suite includes adapters for reading and
179190
writing phase space for many of the widely used cosmology codes, with
180191
a base class for developing new ones. There are multiple ways to use
181192
the versatile and modular tools in `pyEXP`, and we anticipate
182-
pipelines that we have not yet imagined.
193+
pipelines that we have not yet imagined. The flexibility of the basis
194+
sets available in `EXP` greatly enhances the number of available basis
195+
sets implemented in Python [see, e.g. @gala].
183196

184197

185198
## Using pyEXP to analyze time series

Paper/paper/paper.pdf

5.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)