Skip to content
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

v2024.04 #50

Merged
merged 1,249 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1249 commits
Select commit Hold shift + click to select a range
25fd1a9
Update input.cc
lukeshingles Mar 19, 2024
e6a929e
Update Makefile
lukeshingles Mar 19, 2024
75a6e7f
Update Makefile
lukeshingles Mar 19, 2024
d89c84d
Update Makefile
lukeshingles Mar 19, 2024
9e3f49f
Update Makefile
lukeshingles Mar 19, 2024
7c77f7c
Move change_cell to grid.h
lukeshingles Mar 19, 2024
c60913b
Update grid.cc
lukeshingles Mar 19, 2024
c23c506
move struct ModelCellElement into namespace grid
lukeshingles Mar 19, 2024
a7c5013
Update Makefile
lukeshingles Mar 20, 2024
4838fb9
Update sn3d.cc
lukeshingles Mar 20, 2024
cb5d17e
Update Makefile
lukeshingles Mar 20, 2024
1c3ebc4
Update Makefile
lukeshingles Mar 20, 2024
3ab68c1
Update ci-checks.yml
lukeshingles Mar 20, 2024
12165d0
Update Makefile
lukeshingles Mar 20, 2024
9d2fd7e
Update sn3d.h
lukeshingles Mar 20, 2024
cb48017
Update sn3d.cc
lukeshingles Mar 20, 2024
1120108
Use atomic operations only for multithread mode
lukeshingles Mar 20, 2024
3d7065f
Remove unused counters
lukeshingles Mar 20, 2024
3653253
use vector for timesteps
lukeshingles Mar 20, 2024
e88f756
Fix includes
lukeshingles Mar 20, 2024
ed78478
Update packet.cc
lukeshingles Mar 20, 2024
9f2695b
Update decay.cc
lukeshingles Mar 20, 2024
545a440
Rename safeadd to atomicadd
lukeshingles Mar 20, 2024
c320c48
Refactor omp sections
lukeshingles Mar 20, 2024
dedd196
refactor integrator template
lukeshingles Mar 20, 2024
a2cd187
Update ratecoeff.cc
lukeshingles Mar 20, 2024
fb035e3
Use thread_local gslworkspace
lukeshingles Mar 21, 2024
7819585
Update ratecoeff.h
lukeshingles Mar 21, 2024
e85f77f
Update sn3d.h
lukeshingles Mar 21, 2024
007d1e4
Remove TRACK_ION_MASTATS (on if TRACK_ION_STATS)
lukeshingles Mar 21, 2024
0446770
Update sn3d.cc
lukeshingles Mar 21, 2024
41663dd
Update kpkt.cc
lukeshingles Mar 21, 2024
c5e9e70
Update nonthermal.cc
lukeshingles Mar 21, 2024
ddbf515
Update nonthermal.cc
lukeshingles Mar 21, 2024
43a27a4
Update sn3d.cc
lukeshingles Mar 21, 2024
0113251
Set EULERGAMMA constant
lukeshingles Mar 21, 2024
eacbb6c
Update sn3d.cc
lukeshingles Mar 21, 2024
4710227
macroatom: use EULERGAMMA constant
lukeshingles Mar 21, 2024
7a8f929
Update radfield.cc
lukeshingles Mar 21, 2024
1ef2914
radfield.cc: use integrator template
lukeshingles Mar 21, 2024
fd95245
Update thermalbalance.cc
lukeshingles Mar 21, 2024
b88dedf
thermalbalance.cc: use integrator template
lukeshingles Mar 21, 2024
3361b3e
Add USE_SIMPSON_INTEGRATOR constant
lukeshingles Mar 21, 2024
e7a329d
Update Makefile
lukeshingles Mar 21, 2024
c90c28e
Update sn3d.cc
lukeshingles Mar 21, 2024
7bb93f9
Update radfield.cc
lukeshingles Mar 21, 2024
820822c
Update ratecoeff.cc
lukeshingles Mar 21, 2024
bcba6cd
Update thermalbalance.cc
lukeshingles Mar 21, 2024
49b653f
Update radfield.cc
lukeshingles Mar 21, 2024
941ea30
Update ratecoeff.h
lukeshingles Mar 22, 2024
ef49dce
Update sn3d.h
lukeshingles Mar 22, 2024
8417a3b
Update radfield.cc
lukeshingles Mar 22, 2024
cb5d806
Update Makefile
lukeshingles Mar 22, 2024
833db68
Update .clang-tidy
lukeshingles Mar 22, 2024
0b499f1
Update ci-checks.yml
lukeshingles Mar 22, 2024
67c977a
Update ci-checks.yml
lukeshingles Mar 22, 2024
84462be
Update Makefile
lukeshingles Mar 22, 2024
a854de0
Update ci-checks.yml
lukeshingles Mar 22, 2024
16111e6
Revert "Update Makefile"
lukeshingles Mar 22, 2024
cfbab12
Remove potentially redundant MPI_Bcast J_raw, nuJ_raw, contribcount
lukeshingles Mar 25, 2024
f5b6637
Refactor radfield::zero_estimators()
lukeshingles Mar 25, 2024
5eefe49
Update radfield.cc
lukeshingles Mar 25, 2024
59ac77a
Update radfield.cc
lukeshingles Mar 25, 2024
b54f083
Revert "Update radfield.cc"
lukeshingles Mar 25, 2024
c916de0
Update radfield.cc
lukeshingles Mar 25, 2024
72753a1
Refactor normalise_bf_estimators
lukeshingles Mar 25, 2024
9ce6a71
Update ratecoeff.h
lukeshingles Mar 25, 2024
ec8ec39
Remove unused get_continuumindex_phixstargetindex()
lukeshingles Mar 25, 2024
6c5d5f0
Update vpkt.cc
lukeshingles Mar 25, 2024
de1bbfa
Set USE_SIMPSON_INTEGRATOR samplecount factor from 32 to 4
lukeshingles Mar 25, 2024
f5055ba
Update vpkt.cc
lukeshingles Mar 25, 2024
7b6652e
XCOM gamma-ray photoionization (#52)
gleck97 Mar 25, 2024
3dcc6fc
Add .idea files
lukeshingles Mar 25, 2024
4bf7edc
Add LEVEL_HAS_BFEST option
lukeshingles Mar 25, 2024
7404448
Update artisoptions_christinenonthermal.h
lukeshingles Mar 25, 2024
ace4d7e
Add globals::bfestimcount
lukeshingles Mar 25, 2024
9a4aac0
Count bf estimators at input
lukeshingles Mar 25, 2024
2ddaee4
Update radfield.cc
lukeshingles Mar 25, 2024
7da2046
Update radfield.cc
lukeshingles Mar 25, 2024
6fd4f03
Update radfield.cc
lukeshingles Mar 25, 2024
0579a20
Update radfield.cc
lukeshingles Mar 25, 2024
9e8a88f
Update radfield.cc
lukeshingles Mar 25, 2024
3ebf7c1
Revert "Update radfield.cc"
lukeshingles Mar 25, 2024
f59142c
Test storing bfrate estimators in cellcache
lukeshingles Mar 26, 2024
16eb8af
Update radfield.cc
lukeshingles Mar 26, 2024
1190ddc
Update radfield.cc
lukeshingles Mar 26, 2024
f1cf0bc
Update radfield.cc
lukeshingles Mar 26, 2024
72266c6
Update radfield.cc
lukeshingles Mar 26, 2024
3505c56
Update radfield.cc
lukeshingles Mar 26, 2024
2a06241
Update radfield.cc
lukeshingles Mar 26, 2024
feab955
Update radfield.cc
lukeshingles Mar 26, 2024
0fa12ee
Update radfield.cc
lukeshingles Mar 26, 2024
bef2105
Update radfield.cc
lukeshingles Mar 26, 2024
2cbf81a
Update radfield.cc
lukeshingles Mar 26, 2024
f2002ee
Update exspec-after.sh
lukeshingles Mar 26, 2024
6b246b4
Update radfield.cc
lukeshingles Mar 26, 2024
6b12777
Update input.cc
lukeshingles Mar 26, 2024
0478b0b
Revert "Update input.cc"
lukeshingles Mar 26, 2024
d41eb97
Revert "Update radfield.cc"
lukeshingles Mar 26, 2024
5269392
Update input.cc
lukeshingles Mar 26, 2024
8ec7b5a
Update radfield.cc
lukeshingles Mar 26, 2024
d14b499
Update input.cc
lukeshingles Mar 26, 2024
8750eaf
Update ci.yml
lukeshingles Mar 26, 2024
cd25a08
Update Makefile
lukeshingles Mar 26, 2024
d7e36ae
Update radfield.cc
lukeshingles Mar 26, 2024
750af3a
Update radfield.cc
lukeshingles Mar 26, 2024
77e11a5
static inline to inline
lukeshingles Mar 26, 2024
d1029c9
Spacing and static for vpkt.cc
lukeshingles Mar 26, 2024
720f35b
Revert "Update radfield.cc"
lukeshingles Mar 26, 2024
9f1ed42
Update radfield.cc
lukeshingles Mar 26, 2024
2fb4f18
Avoid loading xcom data unless USE_XCOM_GAMMAPHOTOION
lukeshingles Mar 26, 2024
7cb4fcb
Use sorted allcont indices for bfestimindex
lukeshingles Mar 26, 2024
b356668
Update radfield.cc
lukeshingles Mar 26, 2024
e489182
Shrink gamma_contr to bfestimcount
lukeshingles Mar 26, 2024
9936bf1
Add globals::bfestim_nu_edge
lukeshingles Mar 26, 2024
06a62dd
Update radfield.cc
lukeshingles Mar 26, 2024
7723710
Revert "Update radfield.cc"
lukeshingles Mar 26, 2024
343b8ef
Add bfestimend and bfestimbegin to phixslist
lukeshingles Mar 26, 2024
b85cd8b
Fix write_restart_data for limited bfestimcount
lukeshingles Mar 26, 2024
c0a7af9
Fixup
lukeshingles Mar 26, 2024
5a3e52b
ptrdiff_t nonemptymgi
lukeshingles Mar 26, 2024
2452d2a
Update input.cc
lukeshingles Mar 26, 2024
600292c
Add nebularonezone_1d_3dgrid_limitbfest
lukeshingles Mar 26, 2024
da0d295
Add checksums for limitbfest
lukeshingles Mar 26, 2024
c9357ef
Update Makefile
lukeshingles Mar 26, 2024
e8f0f5f
constexpr implies inline
lukeshingles Mar 27, 2024
ee6dea1
Update Makefile
lukeshingles Mar 27, 2024
c768015
Update Makefile
lukeshingles Mar 27, 2024
b5f21bb
Remove globals.cc and using inlines in globals.h
lukeshingles Mar 27, 2024
0b15f00
Update Makefile
lukeshingles Mar 27, 2024
45e4b12
Use inline
lukeshingles Mar 27, 2024
1e0db80
Enable more clang-tidy checks
lukeshingles Mar 27, 2024
58d6472
Update .clang-tidy
lukeshingles Mar 27, 2024
e8d3c9c
Use anon namespaces instead of static
lukeshingles Mar 27, 2024
d5ae07f
macroatom: use anonymous namespace
lukeshingles Mar 27, 2024
c76bf33
Use anon namespace
lukeshingles Mar 27, 2024
9a9075d
Use more anon namespaces instead of static
lukeshingles Mar 27, 2024
6ef47c1
Sync changes from #53 except for binding_energy related
lukeshingles Mar 27, 2024
12e9163
Update Makefile
lukeshingles Mar 27, 2024
513ab04
make epilson function inline
lukeshingles Mar 27, 2024
b738762
Help vectorizer by avoiding calls in loop conditions
lukeshingles Mar 27, 2024
20f825b
Update rpkt.cc
lukeshingles Mar 27, 2024
8d462f3
try not using __builtin_unreachable
lukeshingles Mar 27, 2024
03871b1
Update classic 1d checksums for not builtin_unreachable for testmode_…
lukeshingles Mar 27, 2024
b5d1912
make atomic header only
lukeshingles Mar 27, 2024
5e9a592
Fixup
lukeshingles Mar 27, 2024
89de720
Update decay.cc
lukeshingles Mar 27, 2024
abe9bd8
Update decay.cc
lukeshingles Mar 27, 2024
d585629
Update decay.cc
lukeshingles Mar 27, 2024
fab3f99
Update atomic.h
lukeshingles Mar 27, 2024
77c4b4f
Update Makefile
lukeshingles Mar 27, 2024
8cc7e69
Update vpkt.cc
lukeshingles Mar 27, 2024
b636706
make rot_angle() constexpr
lukeshingles Mar 27, 2024
9b92b1e
constexpr meridian()
lukeshingles Mar 27, 2024
e8dd667
constexpr frame_transform()
lukeshingles Mar 27, 2024
aaf5e26
Update macroatom.cc
lukeshingles Mar 27, 2024
e99642f
Update macroatom.cc
lukeshingles Mar 27, 2024
0bb5dd5
Update macroatom.cc
lukeshingles Mar 27, 2024
09838d9
Revert "Update macroatom.cc"
lukeshingles Mar 27, 2024
f22c548
Update macroatom.cc
lukeshingles Mar 27, 2024
5d587b2
Update atomic.h
lukeshingles Mar 27, 2024
b4b5e7b
Update macroatom.cc
lukeshingles Mar 27, 2024
0a45041
Update macroatom.cc
lukeshingles Mar 27, 2024
63a75db
Use __builtin_unreachable in some cases for TESTMODE off
lukeshingles Mar 28, 2024
b53143e
Update grid.cc
lukeshingles Mar 28, 2024
9533345
Update grid.cc
lukeshingles Mar 28, 2024
2c27efe
Test tuple return from get_coordboundary_distances_cylindrical2d
lukeshingles Mar 28, 2024
4a97cc0
Update grid.cc
lukeshingles Mar 28, 2024
e0e9097
Update macroatom.cc
lukeshingles Mar 28, 2024
80071f7
Update macroatom.cc
lukeshingles Mar 28, 2024
5ec4ce5
Update vpkt.h
lukeshingles Mar 28, 2024
11e1f6c
Update macroatom.cc
lukeshingles Mar 28, 2024
df5e9df
Update macroatom.cc
lukeshingles Mar 28, 2024
2b0e021
Update vpkt.h
lukeshingles Mar 28, 2024
5cb7392
Update rpkt.cc
lukeshingles Mar 28, 2024
e99a4c6
tuple return from meridian()
lukeshingles Mar 28, 2024
704c362
Fixup
lukeshingles Mar 28, 2024
2158767
Update vpkt.h
lukeshingles Mar 28, 2024
c387649
Update vectors.h
lukeshingles Mar 28, 2024
a335fad
Update macroatom.cc
lukeshingles Mar 28, 2024
4786a5d
Update vpkt.h
lukeshingles Mar 28, 2024
4b99324
Update vpkt.h
lukeshingles Mar 28, 2024
13bf251
vector: more gnu::const
lukeshingles Mar 28, 2024
43c9368
gnu::const to gnu::pure
lukeshingles Mar 28, 2024
0207628
Test replacing std::span with std::array (copy elision keeps it fast?)
lukeshingles Mar 28, 2024
d3a5572
Revert to some std::span
lukeshingles Mar 28, 2024
5c39720
Move rot_angle(), meridian() lorentz() to vectors.h
lukeshingles Mar 28, 2024
5a13a16
Update vectors.h
lukeshingles Mar 28, 2024
1cc27ca
Update vectors.h
lukeshingles Mar 28, 2024
c7b3775
Update vectors.h
lukeshingles Mar 28, 2024
a065897
Update vectors.h
lukeshingles Mar 28, 2024
e8f2687
Update vectors.h
lukeshingles Mar 28, 2024
403dc9d
Create artis-cosma8.sh
lukeshingles Mar 28, 2024
08d2bfe
Update grid.cc
lukeshingles Mar 28, 2024
c5d8a04
Update input.cc
lukeshingles Mar 28, 2024
4084616
Use brace initialisers for pointers
lukeshingles Mar 28, 2024
91fa9da
Update vpkt.cc
lukeshingles Mar 28, 2024
ca187e1
Update vpkt.cc
lukeshingles Mar 28, 2024
a4abbfa
Squashed commit of the following:
lukeshingles Mar 29, 2024
1ab2bc6
Delete artisoptions_nltenebular 2.h
lukeshingles Mar 29, 2024
0733100
update md5 for vpkt changes
lukeshingles Mar 29, 2024
a2325e3
Test moving call to vpkt_call_estimators to fix trueemissiontype
lukeshingles Mar 29, 2024
f842890
Rename get_continuumindex() to get_emtype_continuum()
lukeshingles Mar 29, 2024
d8c1133
merge light_curve.* into spectrum_lightcurve.*
lukeshingles Mar 29, 2024
8746df0
Update macroatom.cc
lukeshingles Mar 29, 2024
3d12401
Update vpkt.cc
lukeshingles Mar 29, 2024
57012cc
Revert "Update vpkt.cc"
lukeshingles Mar 29, 2024
4efd69a
Update rpkt.cc
lukeshingles Apr 10, 2024
5eb9b15
switch openmpi to mpich on macos
lukeshingles Apr 10, 2024
5675f81
Revert "Update rpkt.cc"
lukeshingles Apr 10, 2024
26ba170
Revert "switch openmpi to mpich on macos"
lukeshingles Apr 10, 2024
504f4e6
vpkt contribs: write single row for all directions
lukeshingles Apr 10, 2024
00c26dc
Update vpkt.cc
lukeshingles Apr 10, 2024
e51f8f7
Update vpkt.cc
lukeshingles Apr 10, 2024
e52f134
Update vpkt.cc
lukeshingles Apr 10, 2024
fb0bff2
Update setup_classicmode_1d_3dgrid.sh
lukeshingles Apr 10, 2024
b3ae37e
Add vpackets checksums
lukeshingles Apr 10, 2024
11aae3b
Update artis-virgo-slurmjob.sh
lukeshingles Apr 10, 2024
54f91c0
Update exspec-gzip-virgo-slurmjob.sh
lukeshingles Apr 10, 2024
c5cfb28
use flto=thin to fix llvm on macos
lukeshingles Apr 10, 2024
de1068d
Update Makefile
lukeshingles Apr 12, 2024
e4e6209
Pass t_arrive to rlc_emiss_vpkt() (possible roundoff level change)
lukeshingles Apr 12, 2024
a2b59d3
Update md5 for vpackets roundoff change t_arrive
lukeshingles Apr 12, 2024
a362f3b
Update vpkt.cc
lukeshingles Apr 12, 2024
424d9a9
Update vpkt.cc
lukeshingles Apr 12, 2024
49a746e
Update vpacket checksums
lukeshingles Apr 12, 2024
b214934
Update vpkt.cc
lukeshingles Apr 12, 2024
a531bbc
Update vpkt.cc
lukeshingles Apr 12, 2024
6106794
Revert "Update vpkt.cc"
lukeshingles Apr 12, 2024
d1b81ba
next_trans = -1 instead of 0 for reset
lukeshingles Apr 12, 2024
9d6cb9b
Update vpkt.cc
lukeshingles Apr 12, 2024
79d6711
Update nltepop.cc
lukeshingles Apr 15, 2024
d16ccd7
Update nltepop.cc
lukeshingles Apr 15, 2024
f3aa458
Update grid.cc
lukeshingles Apr 15, 2024
92aa78f
Update grid.cc
lukeshingles Apr 15, 2024
f7a3604
Update nltepop.cc
lukeshingles Apr 15, 2024
cccdf56
Avoid multiple headers in vpackets files
lukeshingles Apr 15, 2024
c5c6633
Update checksums for no repeated vpacket header
lukeshingles Apr 15, 2024
2c241bf
Enable APPTAINER_SHARENS
lukeshingles Apr 19, 2024
93f2c6b
Squashed commit of the following:
lukeshingles Apr 23, 2024
d6bf277
Update exspec-after.sh
lukeshingles Apr 23, 2024
ccae26a
Update exspec-after.sh
lukeshingles Apr 23, 2024
f4ef209
Update exspec-after.sh
lukeshingles Apr 23, 2024
fe2804e
Update exspec-after.sh
lukeshingles Apr 23, 2024
d128720
Update exspec-after.sh
lukeshingles Apr 23, 2024
e62e51d
Update .clang-tidy
lukeshingles Apr 23, 2024
47d6a6c
clean.sh: add vspecpol speclc_angle_res
lukeshingles Apr 25, 2024
f864f3f
Update vpkt.cc
lukeshingles Apr 26, 2024
aef847c
Merge branch 'main' into develop
lukeshingles Apr 26, 2024
e6552e6
Delete clang-tidy.yml
lukeshingles Apr 26, 2024
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
11 changes: 7 additions & 4 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Checks: >
-cert-err34-c,
-cert-err58-cpp,
-clang-analyzer-deadcode.DeadStores,
-clang-diagnostic-unused-macros,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
Expand All @@ -27,7 +26,6 @@ Checks: >
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-fuchsia-*,
-google-objc*,
Expand All @@ -37,7 +35,6 @@ Checks: >
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-signed-bitwise,
-llvm-header-guard,
-misc-use-anonymous-namespace,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
Expand All @@ -54,11 +51,17 @@ CheckOptions:
value: google
- key: cppcoreguidelines-init-variables.MathHeader
value: <cmath>
- key: modernize-use-std-print.PrintfLikeFunctions # replace printout macro with a function when we want to autofix to use std::format gcc >=13
value: printf; absl::PrintF; printout
- key: modernize-use-std-print.FprintfLikeFunctions
value: fprintf; absl::FPrintF
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
value: size_t;ptrdiff_t;size_t;difference_type;time_t;MPI_Aint
value: size_t;ptrdiff_t;size_type;difference_type;time_t;MPI_Aint
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'false'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: 'false'
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: 'true'
- key: readability-identifier-naming.NamespaceCase
value: lower_case
184 changes: 133 additions & 51 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
cppcheck:
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4

Expand All @@ -25,12 +25,12 @@ jobs:
- name: run cppcheck and check for errors
run: |
cppcheck --version
cppcheck --force --error-exitcode=1 --language=c++ --std=c++20 --enable=warning,performance,portability .
cppcheck --force --error-exitcode=1 --language=c++ --std=c++20 --enable=warning,performance,portability --suppress=memleak --check-level=exhaustive .

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

clang-format:
runs-on: ubuntu-22.04
Expand All @@ -44,7 +44,7 @@ jobs:
check-path: .

clang-tidy:
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4

Expand All @@ -61,26 +61,22 @@ jobs:
- name: install llvm
run: |
brew install llvm || true
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH

echo "CXX=clang++" >> $GITHUB_ENV
echo "OMPI_CXX=clang++" >> $GITHUB_ENV

echo "LDFLAGS=-L/usr/local/opt/llvm/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I/usr/local/opt/llvm/include" >> $GITHUB_ENV
echo "LDFLAGS=-L/opt/homebrew/opt/llvm/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I/opt/homebrew/opt/llvm/include" >> $GITHUB_ENV

echo "LDFLAGS=-L/usr/local/opt/libomp/lib" >> $GITHUB_ENV
echo "CXXFLAGS=-I/usr/local/opt/libomp/include" >> $GITHUB_ENV
echo "CXXFLAGS=-I/opt/homebrew/opt/libomp/include" >> $GITHUB_ENV

echo "LIBRARY_PATH=/usr/local/opt/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/opt/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=/opt/homebrew/opt/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/opt/homebrew/opt/lib" >> $GITHUB_ENV

echo "CPATH=/usr/local/opt/include" >> $GITHUB_ENV
echo "CPATH=/opt/homebrew/opt/include" >> $GITHUB_ENV

echo "compiledb" > requirements.txt

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
cache: pip
python-version: '3.12'
Expand All @@ -106,51 +102,76 @@ jobs:
CXX: g++
strategy:
matrix:
compiler:
[
compiler: [
{name: gcc, ver: 11},
{name: gcc, ver: 12},
{name: gcc, ver: 13},
{name: clang, ver: 14},
{name: clang, ver: 15},
# {name: gcc, ver: 14},
{name: nvc++, ver: '24.3'},
]
mpi: [ON, OFF]
openmp: [ON, OFF]
stdpar: [ON, OFF]
exclude:
- compiler: {name: clang, ver: 15}
openmp: ON
- openmp: ON
stdpar: ON
fail-fast: false

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

- name: CPU type and core count
id: cpu-count
run: |
g++ -march=native -Q --help=target | grep -- '-march= ' | cut -f3
# echo "count=$(python3 -c 'import psutil; print(int(psutil.cpu_count(logical=False)))')" >> $GITHUB_OUTPUT
python3 -c 'import multiprocessing; print(f"CPU count: {multiprocessing.cpu_count()}")'
echo "count=$(python3 -c 'import multiprocessing; print(multiprocessing.cpu_count())')" >> $GITHUB_OUTPUT

- name: apt update
- name: Install gcc
if: matrix.compiler.name == 'gcc'
uses: fortran-lang/setup-fortran@v1
# continue-on-error: true
with:
compiler: gcc
version: ${{ matrix.compiler.ver }}

- name: Install gcc for nvc++
if: matrix.compiler.name == 'nvc++'
uses: fortran-lang/setup-fortran@v1
continue-on-error: true
with:
compiler: gcc
version: 13

# - name: Install cuda-toolkit
# if: matrix.compiler.name == 'nvc++'
# run: |
# sudo apt-get -y install nvidia-cuda-toolkit
# echo "/usr/local/cuda-12.4/bin" >> $GITHUB_PATH

- name: Install nvc++
if: matrix.compiler.name == 'nvc++'
uses: fortran-lang/setup-fortran@v1
# continue-on-error: true
with:
compiler: nvidia-hpc
version: ${{ matrix.compiler.ver }}

- name: Set nvc++ as compiler
if: matrix.compiler.name == 'nvc++'
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
echo "CXX=nvc++" >> $GITHUB_ENV
echo "OMPI_CXX=nvc++" >> $GITHUB_ENV

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

- name: Install clang-${{ matrix.compiler.ver }}
if: matrix.compiler.name == 'clang'
- name: install tbb
if: matrix.compiler.name == 'gcc' && matrix.stdpar == 'ON'
run: |
sudo apt install -y clang-${{ matrix.compiler.ver }} --install-suggests
echo "CXX=clang++-${{ matrix.compiler.ver }}" >> $GITHUB_ENV
sudo apt install libtbb-dev

- name: install openmpi
if: matrix.mpi == 'ON'
Expand All @@ -162,30 +183,91 @@ jobs:
run: |
sudo apt-get install -y libomp5-14 libomp-dev

- name: install gsl
run: sudo apt install libgsl-dev
- name: Compile classic mode
run: |
$CXX -v
cp -v -p artisoptions_classic.h artisoptions.h
make clean
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} ${{ matrix.stdpar == 'ON' && ' STDPAR=ON' || ''}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec

- name: Compile nebular mode
run: |
cp -v -p artisoptions_classic.h artisoptions.h
make clean
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} ${{ matrix.stdpar == 'ON' && ' STDPAR=ON' || ''}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec

mac-llvm:
runs-on: macos-14
env:
CXX: clang++
strategy:
matrix:
mpi: [ON, OFF]
openmp: [ON, OFF]
stdpar: [ON, OFF]
exclude:
- openmp: ON
stdpar: ON
fail-fast: false

# - name: Set compiler environment variables (MPI off)
# if: matrix.mpi == 'OFF'
# run: echo "CXX=${{ matrix.compiler.cmd }}" >> $GITHUB_ENV
name: macOS brew clang ${{ matrix.mpi == 'ON' && ' MPI' || ''}}${{ matrix.openmp == 'ON' && ' OpenMP' || ''}}${{ matrix.stdpar == 'ON' && ' stdpar' || ''}}

- name: Set compiler environment variables (MPI on)
steps:
- uses: actions/checkout@v4

- name: CPU core count
id: cpu-count
run: |
# 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

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest-stable'

- name: install dependencies
run: |
brew update
brew install gsl || true

- name: install llvm
run: |
brew install llvm || true
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++ $LDFLAGS" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

- name: install OpenMP
if: matrix.openmp == 'ON'
run: |
brew install libomp || true
brew link --force libomp

echo "LDFLAGS=-L/opt/homebrew/opt/libomp/lib $LDFLAGS" >> $GITHUB_ENV
echo "CXXFLAGS=-I/opt/homebrew/opt/libomp/include $CXXFLAGS" >> $GITHUB_ENV

- name: install OpenMPI
if: matrix.mpi == 'ON'
run: |
echo "OMPI_CXX=$CXX" >> $GITHUB_ENV
echo "CXX=mpicxx" >> $GITHUB_ENV
mpicxx --showme:version
brew install openmpi || true

- name: Show compiler version and CPU type
- name: install onedpl and tbb
if: matrix.stdpar == 'ON'
run: |
${{ env.CXX }} --version
brew install onedpl tbb

echo "LIBRARY_PATH=$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOMEBREW_PREFIX/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "CPATH=$HOMEBREW_PREFIX/include:$CPATH" >> $GITHUB_ENV

- name: Compile classic mode
run: |
cp -v -p artisoptions_classic.h artisoptions.h
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec
make clean
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} ${{ matrix.stdpar == 'ON' && ' STDPAR=ON' || ''}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec

- name: Compile nebular mode
run: |
cp -v -p artisoptions_classic.h artisoptions.h
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec
make clean
make MPI=${{matrix.mpi}} OPENMP=${{matrix.openmp}} ${{ matrix.stdpar == 'ON' && ' STDPAR=ON' || ''}} -j${{ steps.cpu-count.outputs.count}} sn3d exspec
Loading