8000 v2023.10 by lukeshingles · Pull Request #40 · artis-mcrt/artis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v2023.10 #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 975 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
975 commits
Select commit Hold shift + click to select a range
68cfc14
Use more get_ionestimindex
lukeshingles Oct 9, 2023
05eb6eb
Revert "Update radfield.cc"
lukeshingles Oct 9, 2023
778470a
Use std::vector<int> for mg_associated_cells, nonemptymgi_of_mgi, mgi…
lukeshingles Oct 9, 2023
e263095
Use std::vector for traceemissionabsorption
lukeshingles Oct 9, 2023
536785c
Fixup
lukeshingles Oct 9, 2023
e92a440
Update radfield.cc
lukeshingles Oct 9, 2023
a3fd2b9
Refactor calculate_ion_balance_nne()
lukeshingles Oct 9, 2023
45ded3f
Remove optional NLTE_POPS_ALL_IONS_SIMULTANEOUS and always use multi-…
lukeshingles Oct 9, 2023
873c15e
Update ltepop.cc
lukeshingles Oct 9, 2023
0726a84
Detect NLTE levels
lukeshingles Oct 9, 2023
5697a89
Revert "Detect NLTE levels"
lukeshingles Oct 9, 2023
ca30d4e
add globals::elements.has_nlte_levels
lukeshingles Oct 9, 2023
cfe533c
Update input.cc
lukeshingles Oct 9, 2023
7b3fa64
Refactor
lukeshingles Oct 9, 2023
1d978d9
Update atomic.cc
lukeshingles Oct 9, 2023
edb432d
Rename has_nlte_levels to elem_has_nlte_levels
lukeshingles Oct 9, 2023
98ee0ca
Revert breaking changes
lukeshingles Oct 9, 2023
8017818
Update input.cc
lukeshingles Oct 9, 2023
b6d6dd0
Update atomic.cc
lukeshingles Oct 9, 2023
11a56ae
Update ltepop.cc
lukeshingles Oct 9, 2023
e7f6737
Update update_grid.cc
lukeshingles Oct 10, 2023
a3242d1
Update update_grid.cc
lukeshingles Oct 10, 2023
06f4788
Update update_grid.cc
lukeshingles Oct 10, 2023
60e8f74
Revert "Update update_grid.cc"
lukeshingles Oct 10, 2023
5d372c7
Update update_grid.cc
lukeshingles Oct 10, 2023
aaa3511
Update update_grid.cc
lukeshingles Oct 10, 2023
daf6fc3
Update sn3d.cc
lukeshingles Oct 10, 2023
c2fe84f
Save nne and nnetot
lukeshingles Oct 10, 2023
7e59bfa
Update grid.cc
lukeshingles Oct 10, 2023
161b535
Fixup read gridsave
lukeshingles Oct 10, 2023
1581715
Refactor setting of nnetot
lukeshingles Oct 10, 2023
dbcedbb
Move nnetot calculation to update_abundances
lukeshingles Oct 10, 2023
a68a40b
Use gridsave ion populations instead of re-calculating
lukeshingles Oct 10, 2023
7c43e7d
Re-enable calculate_ion_balance_nne for initial timestep
lukeshingles Oct 10, 2023
0029b38
Update update_grid.cc
lukeshingles Oct 10, 2023
fd03922
Update update_grid.cc
lukeshingles Oct 10, 2023
ef5ede6
Remove allow_nlte parameter to calculate_ion_balance_nne
lukeshingles Oct 10, 2023
5af1d61
Update update_grid.cc
lukeshingles Oct 10, 2023
1e3e828
Remove uppermost_ion parameter to get_ionfractions
lukeshingles Oct 10, 2023
222e0c9
Update ltepop.cc
lukeshingles Oct 10, 2023
94ed28c
Update update_grid.cc
lukeshingles Oct 10, 2023
b9749e9
Minor change
lukeshingles Oct 10, 2023
aa304a6
Move calculate_ion_balance_nne to ltepop
lukeshingles Oct 10, 2023
245038b
Hide nne_solution_f, get_ionfractions, and phi
lukeshingles Oct 10, 2023
9d880bc
Update ltepop.cc
lukeshingles Oct 10, 2023
933a85c
Update sn3d.cc
lukeshingles Oct 10, 2023
7b4b208
Update input.cc
lukeshingles Oct 10, 2023
7f8835e
Move calculate_cellpartfuncts to ltepop
lukeshingles Oct 10, 2023
eeb2bc6
Update nltepop.cc
lukeshingles Oct 10, 2023
8443003
Calculate partition functions for a particular element only
lukeshingles Oct 10, 2023
ad0fd1e
Fixup
lukeshingles Oct 10, 2023
80d4f62
Update ltepop.cc
lukeshingles Oct 10, 2023
6455c73
Update ltepop.cc
lukeshingles Oct 10, 2023
93907ce
Revert "Update ltepop.cc"
lukeshingles Oct 10, 2023
0d204e3
Remove neutral special case
lukeshingles Oct 10, 2023
f0bee78
8000 Update ltepop.cc
lukeshingles Oct 10, 2023
e904afd
Update ltepop.cc
lukeshingles Oct 10, 2023
cc393be
Revert "Remove neutral special case"
lukeshingles Oct 10, 2023
f179cc0
Update update_grid.cc
lukeshingles Oct 10, 2023
6e7c6bd
Add iongamma_is_zero fast function
lukeshingles Oct 10, 2023
58db5e9
Update ltepop.cc
lukeshingles Oct 10, 2023
43a5935
Update ltepop.cc
lukeshingles Oct 10, 2023
887c80d
Update ratecoeff.cc
lukeshingles Oct 10, 2023
ea6ed46
Update input.cc
lukeshingles Oct 10, 2023
e1460be
Update ltepop.cc
lukeshingles Oct 10, 2023
c2a60e5
Move struct nne_solution_paras
lukeshingles Oct 10, 2023
22d1dff
Update ltepop.cc
lukeshingles Oct 10, 2023
30805d4
Update ltepop.cc
lukeshingles Oct 10, 2023
9d0bb61
Update atomic.cc
lukeshingles Oct 10, 2023
e9a6272
Update atomic.cc
lukeshingles Oct 10, 2023
61bbda0
Update atomic.cc
lukeshingles Oct 10, 2023
df4e29a
Update update_grid.cc
lukeshingles Oct 10, 2023
d0e1602
Update ltepop.cc
lukeshingles Oct 10, 2023
a9b176c
Update ltepop.cc
lukeshingles Oct 10, 2023
f95629a
Remove bool NLTE_POPS_ON (auto enabled when at least one LEVEL_IS_NLT…
lukeshingles Oct 10, 2023
8f48636
Update ltepop.cc
lukeshingles Oct 10, 2023
b4b7505
Revert "Update atomic.cc"
lukeshingles Oct 10, 2023
5cb7965
Store globals::elements[element].has_nlte_levels
lukeshingles Oct 10, 2023
cac3461
Update nonthermal.cc
lukeshingles Oct 10, 2023
e106132
nntot = nne + nntot -> nntot + nne (roundoff-level change)
lukeshingles Oct 11, 2023
340f632
Recover nnion with roundoff error
lukeshingles Oct 11, 2023
f6bc180
Fixup
lukeshingles Oct 11, 2023
480882e
Fixup2
lukeshingles Oct 11, 2023
034eed3
Use similar calculation for nne in all cases (for future de-dupe)
lukeshingles Oct 11, 2023
0465386
Update ltepop.cc
lukeshingles Oct 11, 2023
3893657
Update ltepop.cc
lukeshingles Oct 11, 2023
9afdc0f
Update ltepop.cc
lukeshingles Oct 11, 2023
cd4646d
Refactor nne calculation
lukeshingles Oct 11, 2023
b7cb16f
Update ltepop.cc
lukeshingles Oct 11, 2023
10ce5c5
Update ltepop.cc
lukeshingles Oct 11, 2023
d5bd3af
Update ltepop.cc
lukeshingles Oct 11, 2023
4617ac3
Update ltepop.cc
lukeshingles Oct 11, 2023
8efaade
Update checksums for new nne solver (roundoff error)
lukeshingles Oct 11, 2023
d52bef4
Update ltepop.cc
lukeshingles Oct 11, 2023
83b4d4b
Update ltepop.cc
lukeshingles Oct 11, 2023
cbdf113
Update ltepop.cc
lukeshingles Oct 11, 2023
1a29dd3
Update artisoptions_kilonova_lte.h
lukeshingles Oct 11, 2023
36c481b
Update ltepop.cc
lukeshingles Oct 11, 2023
e23238c 10000
Refactor get_element_nlte_dimension_and_slpartfunc() into get_element…
lukeshingles Oct 11, 2023
ac43a2e
Update ltepop.cc
lukeshingles Oct 11, 2023
5b1302a
Add phi_lte()
lukeshingles Oct 11, 2023
6cf18ac
Update ltepop.cc
lukeshingles Oct 11, 2023
3bc0729
Update ltepop.cc
lukeshingles Oct 11, 2023
c6643d0
Update ltepop.cc
lukeshingles Oct 11, 2023
7454f2b
Fix set_element_pops_lte() in case of NLTE failture
lukeshingles Oct 11, 2023
8317534
Update ltepop.cc
lukeshingles Oct 11, 2023
c402c69
Revert "Update ltepop.cc"
lukeshingles Oct 11, 2023
30e927d
Update nltepop.cc
lukeshingles Oct 11, 2023
7041bf9
Update sn3d.cc
lukeshingles Oct 11, 2023
f187a3e
Remove obsolete comments
lukeshingles Oct 11, 2023
6784364
Update nonthermal.cc
lukeshingles Oct 11, 2023
cedde0e
Make eventstats atomic
lukeshingles Oct 11, 2023
13564ad
Update nltepop.cc
lukeshingles Oct 11, 2023
dba403b
Make nesc std::atomic
lukeshingles Oct 11, 2023
8ee9891
Update sn3d.h
lukeshingles Oct 11, 2023
7130e65
Make pellet_decays std::atomic<int>
lukeshingles Oct 11, 2023
e3dcf84
#include <atomic>
lukeshingles Oct 11, 2023
c234708
Update exspec.cc
lukeshingles Oct 11, 2023
129ec0e
Update exspec.cc
lukeshingles Oct 11, 2023
9d48c57
Update exspec.cc
lukeshingles Oct 11, 2023
7b915e3
Move setting of nprocs_exspec to sn3d
lukeshingles Oct 11, 2023
5510405
Fixup
lukeshingles Oct 11, 2023
4592028
Update exspec.cc
lukeshingles Oct 11, 2023
9f68b9a
Update exspec.cc
lukeshingles Oct 11, 2023
34c411d
Update exspec.cc
lukeshingles Oct 11, 2023
6a94f35
Make exspec and sn3d consistent
lukeshingles Oct 11, 2023
55a5916
Deduplicate with new function globals::setup_mpi_vars()
lukeshingles Oct 11, 2023
aa6c841
Refactor exspec
lukeshingles Oct 11, 2023
ef700c6
std::unique_ptr<struct time[]> timesteps
lukeshingles Oct 11, 2023
47a1b26
Make chlevels.processrates std::array
lukeshingles Oct 11, 2023
57c783f
Guard MPI_Init
lukeshingles Oct 11, 2023
73f8485
Update nltepop.cc
lukeshingles Oct 11, 2023
9173552
Update thermalbalance.cc
lukeshingles Oct 11, 2023
acc5572
Update thermalbalance.cc
lukeshingles Oct 11, 2023
afb32a2
Place "const" before type name
lukeshingles Oct 11, 2023
d1eed7e
Update thermalbalance.cc
lukeshingles Oct 12, 2023
8668aa0
Update .clang-tidy
lukeshingles Oct 12, 2023
d9d4c91
Rename allow_nlte to nlte_solver_pops_available
lukeshingles Oct 12, 2023
85d33f4
Fixup
lukeshingles Oct 12, 2023
7b28091
Update ltepop.cc
lukeshingles Oct 12, 2023
3108149
Update ltepop.cc
lukeshingles Oct 12, 2023
21923cf
Update ltepop.cc
lukeshingles Oct 12, 2023
f8d73cc
Rename !nlte_solver_pops_available to force_lte
lukeshingles Oct 12, 2023
0a56cde
Update ltepop.cc
lukeshingles Oct 12, 2023
4b76033
Update ltepop.cc
lukeshingles Oct 12, 2023
50a2c99
Move get_element_nne_contrib up
lukeshingles Oct 12, 2023
f032564
set_groundlevelpops -> set_groundlevelpops_if_needed
lukeshingles Oct 12, 2023
2aaff9d
Fix brackets
lukeshingles Oct 12, 2023
1050266
Set groundlevelpops and use get_element_nne_contrib() in nne_solution_f
lukeshingles Oct 12, 2023
72d3fb6
Update ltepop.cc
lukeshingles Oct 12, 2023
f4a7c3a
Revert "Set groundlevelpops and use get_element_nne_contrib() in nne_…
lukeshingles Oct 12, 2023
ba4b579
Rename ionstagepop to get_nnion
lukeshingles Oct 12, 2023
5be87f2
Update ltepop.cc
lukeshingles Oct 12, 2023
1711c4d
Update ltepop.cc
lukeshingles Oct 12, 2023
93ff8c8
Update ltepop.cc
lukeshingles Oct 12, 2023
1e6e553
Update ltepop.cc
lukeshingles Oct 12, 2023
699ce83
Update ltepop.cc
lukeshingles Oct 12, 2023
1e4dd8f
Update ltepop.cc
lukeshingles Oct 12, 2023
9c6842f
Update ltepop.cc
lukeshingles Oct 12, 2023
c93dc3b
Update ltepop.cc
lukeshingles Oct 12, 2023
c85f8a0
Update ltepop.cc
lukeshingles Oct 12, 2023
c569f9e
Update input.cc
lukeshingles Oct 12, 2023
9b8a878
Update input.cc
lukeshingles Oct 12, 2023
363007e
Update input.cc
lukeshingles Oct 12, 2023
f48fdb0
Reuse transitiontable vector to reduce number of allocations
lukeshingles Oct 12, 2023
e43aa49
Avoid safeincrement on std::atomic
lukeshingles Oct 12, 2023
91194f1
Update Makefile
lukeshingles Oct 12, 2023
a0c357d
Add openmp compilation checks
lukeshingles Oct 12, 2023
58667ec
Update ci-checks.yml
lukeshingles Oct 12, 2023
4d9cc03
Update ci-checks.yml
lukeshingles Oct 12, 2023
0091f98
Update ci-checks.yml
lukeshingles Oct 12, 2023
c32b35a
Update ci-checks.yml
lukeshingles Oct 12, 2023
8c1956a
Update ci-checks.yml
lukeshingles Oct 12, 2023
e2af6e5
Update ci-checks.yml
lukeshingles Oct 12, 2023
ca92e4d
Update ci-checks.yml
lukeshingles Oct 12, 2023
076f1ce
Update ci-checks.yml
lukeshingles Oct 12, 2023
deb8c44
Update ci-checks.yml
lukeshingles Oct 12, 2023
8b2de09
Update ci-checks.yml
lukeshingles Oct 12, 2023
828533e
Fix comments
lukeshingles Oct 12, 2023
d455d4b
Avoid passing pointer to whole packet to doppler_packet_nucmf_on_nurf
lukeshingles Oct 12, 2023
12398b8
Use more std::array
lukeshingles Oct 12, 2023
bf87c78
Update rpkt.cc
lukeshingles Oct 12, 2023
d1b37ef
Update rpkt.cc
lukeshingles Oct 12, 2023
1ccc049
Update rpkt.cc
lukeshingles Oct 12, 2023
ad96c91
Update rpkt.cc
lukeshingles Oct 12, 2023
c36d696
constexpr (DETAILED_LINE_ESTIMATORS_ON)
lukeshingles Oct 12, 2023
e8df71c
Update .pre-commit-config.yaml
lukeshingles Oct 12, 2023
ccf37e0
Fix some include warnings
lukeshingles Oct 12, 2023
06201a8
Update nltepop.cc
lukeshingles Oct 13, 2023
5a56e00
Move check for NLTE pops outside set_groundlevelpops()
lukeshingles Oct 13, 2023
13c90ef
Update nltepop.cc
lukeshingles Oct 13, 2023
c093ea6
Remove debug comments
lukeshingles Oct 13, 2023
d84d181
Replace macro with inline function
lukeshingles Oct 15, 2023
b6dddd5
Update sn3d.h
lukeshingles Oct 15, 2023
b7d3e58
Revert "Replace macro with inline function"
lukeshingles Oct 15, 2023
a3c5df3
Revert "Update sn3d.h"
lukeshingles Oct 15, 2023
9b491f6
Update ltepop.cc
lukeshingles Oct 15, 2023
31c63d4
Update update_grid.cc
lukeshingles Oct 18, 2023
838d919
Revert "Update update_grid.cc"
lukeshingles Oct 18, 2023
dbecb93
Revert "Revert "Update update_grid.cc""
lukeshingles Oct 18, 2023
051b492
Update checksums for minor grey depth roundoff change
lukeshingles Oct 18, 2023
4d5a669
Update grid.cc
lukeshingles Oct 18, 2023
7c1c5ac
Add FORCE_SPHERICAL_ESCAPE_SURFACE option
lukeshingles Oct 18, 2023
070561b
Update grid.cc
lukeshingles Oct 18, 2023
c5059f3
Switch on FORCE_SPHERICAL_ESCAPE_SURFACE
lukeshingles Oct 18, 2023
55f9a76
Fixup
lukeshingles Oct 18, 2023
5771617
Fixup 2
lukeshingles Oct 18, 2023
47d59e6
Update grid.cc
lukeshingles Oct 18, 2023
20920aa
Disable FORCE_SPHERICAL_ESCAPE_SURFACE
lukeshingles Oct 18, 2023
c25196b
Update grid.cc
lukeshingles Oct 18, 2023
b2e43ce
Update grid.cc
lukeshingles Oct 18, 2023
b418320
Update artisoptions_kilonova_lte.h
lukeshingles Oct 18, 2023
3e709bf
Update grid.cc
lukeshingles Oct 18, 2023
3afdfdc
Update grid.cc
lukeshingles Oct 18, 2023
6a98832
Update grid.cc
lukeshingles Oct 18, 2023
9ef0115
Update grid.cc
lukeshingles Oct 18, 2023
c394741
Update grid.cc
lukeshingles Oct 18, 2023
7367c2f
Disable FORCE_SPHERICAL_ESCAPE_SURFACE
lukeshingles Oct 18, 2023
1f8690c
Add FORCE_SAHA_ION_BALANCE option
lukeshingles Oct 19, 2023
42ba1f4
Update scripts
lukeshingles Oct 19, 2023
0afa127
Merge branch 'main' into develop
lukeshingles Oct 19, 2023
07dee3e
Update sn3d.cc
lukeshingles Oct 19, 2023
e34001c
Update grid.cc
lukeshingles Oct 19, 2023
c965437
Update grid.cc
lukeshingles Oct 19, 2023
32c8e6e
Use tuple unpacking
lukeshingles Oct 19, 2023
c6f172b
Update grid.cc
lukeshingles Oct 19, 2023
4260ce3
Update grid.cc
lukeshingles Oct 19, 2023
ca60147
Use set_rho() outside of grid.cc
lukeshingles Oct 19, 2023
10ab041
Use std::string.starts_with()
lukeshingles Oct 19, 2023
7e19b7d
Update exspec-gzip-juwels.sh
lukeshingles Oct 20, 2023
7d88634
Add error message on fstream_required failure
lukeshingles Oct 20, 2023
23d36dd
refactor model input
lukeshingles Oct 20, 2023
7f775f8
Update grid.cc
lukeshingles Oct 20, 2023
6a232f7
Update grid.cc
lukeshingles Oct 20, 2023
0c3b1c3
Update grid.cc
lukeshingles Oct 20, 2023
cf297f3
Update grid.cc
lukeshingles Oct 20, 2023
be79b42
Update grid.cc
lukeshingles Oct 20, 2023
362f2ff
Update update_grid.cc
lukeshingles Oct 20, 2023
67e2197
Update grid.cc
lukeshingles Oct 20, 2023
4c91542
Update grid.cc
lukeshingles Oct 20, 2023
96196af
Fixup
lukeshingles Oct 20, 2023
10bc812
Update grid.cc
lukeshingles Oct 20, 2023
2b14d11
Update grid.cc
lukeshingles Oct 20, 2023
ca1336f
Update grid.cc
lukeshingles Oct 20, 2023
a9a21fb
Use std::ranges::for_each
lukeshingles Oct 20, 2023
a49b8ba
Revert "Use std::ranges::for_each"
lukeshingles Oct 20, 2023
49dbbd3
Update rpkt.cc
lukeshingles Oct 20, 2023
8df996b
Update grid.cc
lukeshingles Oct 21, 2023
5c1923e
Update grid.cc
lukeshingles Oct 21, 2023
876e095
Update grid.cc
lukeshingles Oct 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ Checks: >
-llvmlibc-*,
-cert-err33-c,
-cert-err34-c,
-cert-err58-cpp,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-clang-diagnostic-error,
-fuchsia-*,
Expand All @@ -32,6 +34,7 @@ Checks: >
-hicpp-signed-bitwise,
-misc-use-anonymous-namespace,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-readability-identifier-length,
-readability-function-cognitive-complexity,
-readability-magic-numbers,
Expand All @@ -46,7 +49,7 @@ CheckOptions:
- key: cppcoreguidelines-init-variables.MathHeader
value: <cmath>
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
value: size_t;ptrdiff_t;size_type;difference_type;time_t
value: size_t;ptrdiff_t;size_type;difference_type;time_t;MPI_Aint;unsigned long
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'false'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
Expand Down
55 changes: 39 additions & 16 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@ on:

jobs:
cppcheck:
runs-on: ubuntu-22.04
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: install dependencies
run: |
# git status
# sudo apt-get update
# sudo apt-get install libgsl-dev
# sudo apt install -y openmpi-bin libopenmpi-dev
sudo apt-get -y install cppcheck
brew update
brew install gsl openmpi cppcheck
cp artisoptions_nltenebular.h artisoptions.h

- name: run cppcheck
- name: run cppcheck and check for errors
run: |
cp artisoptions_nltenebular.h artisoptions.h
cppcheck --force --language=c++ --std=c++20 .
cppcheck --version
cppcheck --force --error-exitcode=1 --language=c++ --std=c++20 --enable=warning,performance,portability .

- name: show cppcheck style suggestions
run: |
cppcheck --version
cppcheck --force --language=c++ --std=c++20 --enable=style --suppress=knownConditionTrueFalse .

clang-format:
runs-on: ubuntu-22.04
Expand All @@ -45,12 +48,23 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
compiler: [{name: gcc, ver: 11}, {name: gcc, ver: 12}, {name: clang, ver: 14}, {name: clang, ver: 15}]
compiler: [{name: gcc, ver: 11}, {name: gcc, ver: 12}, {name: gcc, ver: 13}, {name: clang, ver: 14}, {name: clang, ver: 15}]
mpi: [ON, OFF]
openmp: [ON, OFF]
artisoptionsfile: [artisoptions_classic.h, artisoptions_nltenebular.h]
exclude:
- compiler: {name: gcc, ver: 11}
openmp: ON
- compiler: {name: gcc, ver: 12}
openmp: ON
- compiler: {name: gcc, ver: 13}
openmp: ON
- compiler: {name: clang, ver: 15}
openmp: ON
fail-fast: false

name: ${{ matrix.compiler.name }}-${{ matrix.compiler.ver }}${{ matrix.mpi == 'ON' && ' MPI' || ''}} ${{ matrix.artisoptionsfile }}
name: ${{ matrix.compiler.name }}-${{ matrix.compiler.ver }}${{ matrix.mpi == 'ON' && ' MPI' || ''}}${{ matrix.openmp == 'ON' && ' OpenMP' || ''}}
${{ matrix.artisoptionsfile }}
steps:
- uses: actions/checkout@v3

Expand All @@ -61,29 +75,38 @@ jobs:
# echo "count=$(python3 -c 'import psutil; print(int(psutil.cpu_count(logical=False)))')" >> $GITHUB_OUTPUT
echo "count=$(python3 -c 'import multiprocessing; print(multiprocessing.cpu_count())')" >> $GITHUB_OUTPUT

- name: apt-get update
- name: apt update
run: |
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
sudo apt-get update

- name: Install gcc-${{ matrix.compiler.ver }}
if: matrix.compiler.name == 'gcc'
run: |
sudo apt-get install -y gcc-${{ matrix.compiler.ver }} g++-${{ matrix.compiler.ver }}
sudo apt install -y gcc-${{ matrix.compiler.ver }} g++-${{ matrix.compiler.ver }}
echo "CXX=g++-${{ matrix.compiler.ver }}" >> $GITHUB_ENV

- name: Install clang-${{ matrix.compiler.ver }}
if: matrix.compiler.name == 'clang'
run: |
sudo apt-get install -y clang-${{ matrix.compiler.ver }} --install-suggests
sudo apt install -y clang-${{ matrix.compiler.ver }} --install-suggests
echo "CXX=clang++-${{ matrix.compiler.ver }}" >> $GITHUB_ENV

10000 - name: install openmpi
if: matrix.mpi == 'ON'
run: |
sudo apt install -y openmpi-bin libopenmpi-dev

- name: install OpenMP
if: matrix.openmp == 'ON'
run: |
sudo apt-get install -y libomp5-14 libomp-dev

- name: install gsl
run: sudo apt-get install libgsl-dev
run: sudo apt install libgsl-dev

# - name: Set compiler environment variables (MPI off)
# if: matrix.mpi == 'OFF'
Expand All @@ -103,4 +126,4 @@ jobs:
- name: Compile
run: |
cp -v -p ${{ matrix.artisoptionsfile }} artisoptions.h
make MPI=${{matrix.mpi}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec
54 changes: 41 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
# os: ['ubuntu-latest', 'self-hosted']
os: [ubuntu-22.04]
testmode: [OFF, ON]
testname: [classicmode, classicmode_3d, kilonova, nebularonezone]
testname: [classicmode_1d_3dgrid, classicmode_3d, kilonova_1d_1dgrid, kilonova_1d_3dgrid, kilonova_2d_2dgrid, kilonova_2d_3dgrid, nebularonezone_1d_3dgrid]
exclude:
- os: self-hosted
testmode: ON
fail-fast: false

runs-on: ${{ matrix.os }}
timeout-minutes: 45
name: ${{ matrix.testname }} ${{ matrix.testmode == 'ON' && ' testmode ON' || ''}}
name: ${{ matrix.testname }}${{ matrix.testmode == 'ON' && ' testmode ON' || ''}}

steps:
- uses: actions/checkout@v3
Expand All @@ -38,11 +38,11 @@ jobs:
if: matrix.os != 'selfhosted'
run: |
git status
sudo apt-get update
sudo apt-get install -y gcc-12 g++-12
sudo apt-get install -y libgsl-dev
sudo apt update
sudo apt install -y gcc-13 g++-13
sudo apt install -y libgsl-dev
sudo apt install -y openmpi-bin libopenmpi-dev
echo "OMPI_CXX=g++-12" >> $GITHUB_ENV
echo "OMPI_CXX=g++-13" >> $GITHUB_ENV

- name: CPU type and core count
id: cpu-count
Expand All @@ -52,8 +52,7 @@ jobs:

# cache this for classic options because the super low integration tolerance makes generation of the file very slow
- name: Cache ratecoeff.dat
if: matrix.testname == 'classicmode' || matrix.testname == 'classicmode_3d'
# if: matrix.testname == 'classicmode' && matrix.testmode != 'ON'
if: matrix.testname == 'classicmode_1d_3dgrid' || matrix.testname == 'classicmode_3d'
uses: actions/cache@v3
with:
path: tests/${{ matrix.testname }}_testrun/ratecoeff.dat
Expand All @@ -62,15 +61,15 @@ jobs:
tests/${{ matrix.testname }}_testrun/ratecoeff.dat-

- name: Cache test atomic data
if: matrix.testname != 'classicmode'
if: ${{ !startsWith(matrix.testname, 'classicmode_1d') }}
uses: actions/cache@v3
id: cache-testatomicdata
with:
path: tests/atomicdata_feconi.tar.xz
key: tests/atomicdata_feconi.tar.xz

- name: Cache test atomic data classic
if: matrix.testname == 'classicmode'
if: ${{ startsWith(matrix.testname, 'classicmode_1d') }}
uses: actions/cache@v3
id: cache-testatomicdata-classic
with:
Expand Down Expand Up @@ -124,8 +123,7 @@ jobs:
if: always() && matrix.os != 'selfhosted' && matrix.testmode == 'OFF'
working-directory: tests/${{ matrix.testname }}_testrun
run: |
md5sum *.out job0/*.out

md5sum *.out job0/*.out | tee ../${{ matrix.testname }}_inputfiles/results_md5_job0.txt
if [ -f results_md5_job0.txt ]; then md5sum -c results_md5_job0.txt; else echo "results_md5_job0.txt not found"; fi

- name: Run test job1 resume
Expand All @@ -152,6 +150,11 @@ jobs:
working-directory: tests/${{ matrix.testname }}_testrun/
run: cat job1/output_0-0.txt

- name: cat job1 deposition.out
if: always()
working-directory: tests/${{ matrix.testname }}_testrun/
run: cat deposition.out

- name: Run exspec
if: always()
working-directory: tests/${{ matrix.testname }}_testrun/
Expand All @@ -174,7 +177,7 @@ jobs:
if: always() && matrix.os != 'selfhosted' && matrix.testmode == 'OFF'
working-directory: tests/${{ matrix.testname }}_testrun
run: |
md5sum *.out job1/*.out
md5sum *.out job1/*.out | tee ../${{ matrix.testname }}_inputfiles/results_md5_final.txt
if [ -f results_md5_final.txt ]; then md5sum -c results_md5_final.txt; else echo "results_md5_final.txt not found"; fi

- name: Prepare for next steps
Expand All @@ -192,6 +195,13 @@ jobs:
name: test-${{ matrix.testname }}-output
path: tests/${{ matrix.testname }}_testrun/output

- name: Upload checksum files
uses: actions/upload-artifact@v3
if: always() && matrix.os != 'selfhosted' && matrix.testmode == 'OFF'
with:
name: ${{ matrix.testname }}_inputfiles
path: tests/${{ matrix.testname }}_inputfiles/results_md5*

- name: Set up Python
if: always() && matrix.os != 'selfhosted' && matrix.testmode == 'OFF'
uses: actions/setup-python@v4
Expand Down Expand Up @@ -252,3 +262,21 @@ jobs:
# cp input-newrun.txt input.txt
# touch output_0-0.txt
# time mpirun -np 2 ./sn3d

combine_checksums:
needs: testmodels
if: always()
runs-on: ubuntu-latest
steps:
- name: Download test output
uses: actions/download-artifact@v3

- name: List all files
if: always()
run: find .

- name: Upload bundled checksum files
uses: actions/upload-artifact@v3
with:
name: checksums
path: '*_inputfiles/results_md5*.txt'
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
args: [--maxkb=800]
Expand Down
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.26)
project(artis)

set(default_build_type "Release")
Expand All @@ -11,16 +11,18 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
include_directories("${PROJECT_SOURCE_DIR}")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)

set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

set(SN3D_SOURCES sn3d.cc atomic.cc boundary.cc emissivities.cc gamma.cc globals.cc grey_emissivities.cc grid.cc input.cc kpkt.cc light_curve.cc ltepop.cc macroatom.cc nltepop.cc nonthermal.cc decay.cc packets.cc photo_electric.cc polarization.cc radfield.cc ratecoeff.cc rpkt.cc stats.cc thermalbalance.cc update_grid.cc update_packets.cc vectors.cc vpkt.cc md5.cc
set(SN3D_SOURCES sn3d.cc atomic.cc boundary.cc gammapkt.cc globals.cc grid.cc input.cc kpkt.cc light_curve.cc ltepop.cc macroatom.cc nltepop.cc nonthermal.cc decay.cc packet.cc radfield.cc ratecoeff.cc rpkt.cc spectrum.cc stats.cc thermalbalance.cc update_grid.cc update_packets.cc vectors.cc vpkt.cc md5.cc)
add_executable(sn3d ${SN3D_SOURCES})

set(EXSPEC_SOURCES exspec.cc grid.cc globals.cc input.cc vectors.cc packets.cc update_grid.cc update_packets.cc gamma.cc boundary.cc macroatom.cc decay.cc rpkt.cc kpkt.cc photo_electric.cc emissivities.cc grey_emissivities.cc ltepop.cc atomic.cc ratecoeff.cc thermalbalance.cc light_curve.cc spectrum.cc polarization.cc nltepop.cc nonthermal.cc radfield.cc stats.cc vpkt.cc md5.cc)
set(EXSPEC_SOURCES exspec.cc grid.cc globals.cc input.cc vectors.cc packet.cc update_grid.cc update_packets.cc gammapkt.cc boundary.cc macroatom.cc decay.cc rpkt.cc kpkt.cc ltepop.cc atomic.cc ratecoeff.cc thermalbalance.cc light_curve.cc spectrum.cc nltepop.cc nonthermal.cc radfield.cc stats.cc vpkt.cc md5.cc)

add_executable(exspec ${EXSPEC_SOURCES})

#if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE)
find_package(MPI)
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
Expand All @@ -32,7 +34,7 @@ add_compile_options("-Wall" "-Wextra")
string(APPEND CMAKE_CXX_FLAGS_DEBUG "-g")
string(APPEND CMAKE_CXX_FLAGS_RELEASE "-O3")

set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -march=native")
#set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -march=native")

add_compile_definitions(HAVE_INLINE)
add_compile_definitions(GSL_RANGE_CHECK_OFF)
Expand Down
34 changes: 18 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# place in architecture folder, e.g. build/arm64
BUILD_DIR = build/$(shell uname -m)

CXXFLAGS += -std=c++20 -fstrict-aliasing -ftree-vectorize -g -flto=auto -Werror -Werror=undef
# CXXFLAGS += -Wpedantic -Wextra -Wall
CXXFLAGS += -std=c++20 -fstrict-aliasing -ftree-vectorize -flto=auto

# CXXFLAGS += -Wunreachable-code

ifeq ($(shell uname -s),Darwin)
Expand All @@ -18,6 +18,7 @@ ifeq ($(shell uname -s),Darwin)
CXXFLAGS += -march=native
endif

CXXFLAGS += -fno-omit-frame-pointer
# CXXFLAGS += -Rpass=loop-vectorize
# CXXFLAGS += -Rpass-missed=loop-vectorize
# CXXFLAGS += -Rpass-analysis=loop-vectorize
Expand Down Expand Up @@ -77,20 +78,24 @@ ifeq ($(TESTMODE),ON)
CXXFLAGS += -DTESTMODE=true -O3 -DLIBCXX_ENABLE_DEBUG_MODE
# makes GitHub actions classic test run forever?
# CXXFLAGS += -D_GLIBCXX_DEBUG
CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer -fno-common
CXXFLAGS += -fsanitize=address,undefined -fno-omit-frame-pointer -fno-common
BUILD_DIR := $(BUILD_DIR)_testmode
else
# skip array range checking for better performance and use optimizations
CXXFLAGS += -DTESTMODE=false -DGSL_RANGE_CHECK_OFF -O3
endif

CXXFLAGS += -Winline -Wall -Wpedantic -Wredundant-decls -Wundef -Wno-unused-parameter -Wno-unused-function -Wstrict-aliasing -Wno-inline
CXXFLAGS += -Werror -Werror=undef -Winline -Wall -Wpedantic -Wredundant-decls -Wundef -Wno-unused-parameter -Wno-unused-function -Wstrict-aliasing -Wno-inline

ifeq ($(MPI),ON)
else ifeq ($(MPI),OFF)
else ifeq ($(MPI),)
ifeq ($(MPI),)
# MPI option not specified. set to true by default
MPI := ON
endif
ifeq ($(MPI),ON)
CXX = mpicxx
CXXFLAGS += -DMPI_ON=true
BUILD_DIR := $(BUILD_DIR)_mpi
else ifeq ($(MPI),OFF)
else
$(error bad value for MPI option. Should be ON or OFF)
endif
Expand All @@ -102,17 +107,14 @@ else
$(error bad value for testmode option. Should be ON or OFF)
endif

ifeq ($(MPI),ON)
CXX = mpicxx
CXXFLAGS += -DMPI_ON=true
BUILD_DIR := $(BUILD_DIR)_mpi
endif

ifeq ($(OPENMP),ON)
CXXFLAGS += -Xpreprocessor
CXXFLAGS += -fopenmp
CXXFLAGS += -Xpreprocessor -fopenmp
LDFLAGS += -lomp
BUILD_DIR := $(BUILD_DIR)_openmp
else ifeq ($(OPENMP),OFF)
else ifeq ($(OPENMP),)
else
$(error bad value for testmode option. Should be ON or OFF)
endif

### use pg when you want to use gprof profiler
Expand All @@ -137,7 +139,7 @@ sn3d: $(sn3d_objects)
-include $(sn3d_dep)

sn3dwhole: version.h
$(CXX) $(CXXFLAGS) $(sn3d_files) $(LDFLAGS) -o sn3d
$(CXX) $(CXXFLAGS) -g $(sn3d_files) $(LDFLAGS) -o sn3d

$(BUILD_DIR)/%.o: %.cc artisoptions.h Makefile
@mkdir -p $(@D)
Expand Down
Loading
0