Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e58be3f
fix bug in metadomain.cpp; link library stdc++fs
StaticObserver Jun 21, 2024
107a968
1.1.0 tag bump
haykh Jun 24, 2024
e71fa79
workflows disabled
haykh Jun 24, 2024
75133f8
containers made better
haykh Jun 25, 2024
2b3b0b2
branch-policy-added
haykh Jun 25, 2024
3f1f723
Merge pull request #52 from entity-toolkit/dev/branch-policy
haykh Jun 25, 2024
ec3c868
added special check for 2D in sph/qsph
haykh Jun 27, 2024
4332f29
Merge pull request #55 from entity-toolkit/bug/phitrans
haykh Jun 27, 2024
a98f023
Update CMakeLists.txt
haykh Jun 27, 2024
1aa8c8c
Update CMakeLists.txt
haykh Jun 27, 2024
4bd5728
added <limits> lib
haykh Jun 27, 2024
9634557
unit tests as gh actions + self-hosted runner tags
haykh Jun 27, 2024
58f9ff6
dockerfile + readme + actions fastfail
haykh Jun 27, 2024
c80c59b
Merge pull request #56 from entity-toolkit/dev/actions
haykh Jun 27, 2024
6d4880b
tests for double prec
haykh Jun 27, 2024
9cf718f
new pgen for bc test
haykh Jun 29, 2024
0d4db39
linked stdc++fs
haykh Jul 1, 2024
86adb2f
Merge pull request #54 from StaticObserver/v1.0.0rc
haykh Jul 1, 2024
c583d44
Merge pull request #57 from entity-toolkit/bug/double
haykh Jul 1, 2024
74ee866
minor bug in srpic::currentampere range
haykh Jul 5, 2024
6575053
pgen-specific field output
haykh Jul 7, 2024
1d106cc
(minor) rm const
haykh Jul 7, 2024
eb88241
(minor) naming
haykh Jul 7, 2024
9cddc37
(minor) address in lambda
haykh Jul 7, 2024
e9c3baa
added range as arg
haykh Jul 7, 2024
25b4009
example added + simple bugfixes
haykh Jul 7, 2024
959cf5e
new pgen for bc test
haykh Jun 29, 2024
13c164d
minor bug in srpic::currentampere range
haykh Jul 5, 2024
f308a4d
const in range policy
haykh Jul 17, 2024
09eceb7
header added
haykh Jul 17, 2024
3b32aae
precision as print
haykh Jul 17, 2024
7bcd17a
ranges for AXIS bc separate function
haykh Jul 17, 2024
2d2594d
rm temp pgen
haykh Jul 17, 2024
260bfd5
potential race condition fixed
haykh Jul 17, 2024
106bb16
conflict
haykh Jul 17, 2024
7d4d305
culprit fixed for 1D and 3D too
haykh Jul 17, 2024
e8a7536
srpic_bc rm
haykh Jul 17, 2024
6bcb4c2
rm const in metric tests
haykh Jul 28, 2024
c64c5a2
rm const in kernel tests + uint->int
haykh Jul 28, 2024
358e1ee
rocm tests
haykh Jul 28, 2024
ac5389b
minor
haykh Jul 28, 2024
fabeaa9
extern + docker
haykh Jul 28, 2024
4ff47ed
action upd
haykh Jul 28, 2024
81a9663
amd runner
haykh Jul 28, 2024
a86b336
actions upd
haykh Jul 28, 2024
e478ccd
actions updated
haykh Jul 28, 2024
1b22bf3
actions updated
haykh Jul 28, 2024
54cc679
Merge pull request #58 from entity-toolkit/bug/mpicommbc
haykh Jul 28, 2024
46817b8
mv shock to regular directory
haykh Jul 28, 2024
82aeccd
shock upd
haykh Jul 28, 2024
d524c3f
Merge branch '1.1.0rc' of github.com:entity-toolkit/entity into 1.1.0rc
haykh Jul 28, 2024
8d97b6b
passing domain to customout
haykh Jul 28, 2024
3cc1006
pgen-specific field output
haykh Jul 7, 2024
d343cf5
(minor) rm const
haykh Jul 7, 2024
9f38e3a
(minor) naming
haykh Jul 7, 2024
1404202
(minor) address in lambda
haykh Jul 7, 2024
4e8a9cd
added range as arg
haykh Jul 7, 2024
ae3683c
example added + simple bugfixes
haykh Jul 7, 2024
2a1cdd0
passing domain to customout
haykh Jul 28, 2024
529554c
Merge branch 'dev/customout' of github.com:entity-toolkit/entity into…
haykh Jul 28, 2024
8e0e7c5
added report on arch & rocm+cuda versions
haykh Jul 29, 2024
b51cf72
Merge pull request #61 from entity-toolkit/dev/customout
haykh Jul 29, 2024
52a4fd5
Update magnetar setup.
Jul 29, 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
43 changes: 26 additions & 17 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,42 @@ name: Unit tests
on:
pull_request:
branches:
- master
- '**rc'
- 'master'

jobs:
tests:
strategy:
fail-fast: false
matrix:
cuda: ["ON", "OFF"]
precision: ["double", "single"]
runs-on:
- self-hosted
device: [amd-gpu, nvidia-gpu]
precision: [double, single]
exclude:
- device: amd-gpu
precision: double
# my AMD GPUs doesn't support fp64 atomics : (
runs-on: [self-hosted, "${{ matrix.device }}"]
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Load CUDA Entity
if: ${{ matrix.cuda == 'ON' }}
- name: Configure
run: |
module load entity/cuda/volta70/skx
- name: Load Entity without CUDA
if: ${{ matrix.cuda == 'OFF' }}
run: |
module load entity/skx
if [ "${{ matrix.device }}" = "nvidia-gpu" ]; then
FLAGS="-D Kokkos_ENABLE_CUDA=ON"
if [[ ! -z $(nvidia-smi | grep "V100") ]]; then
FLAGS+=" -D Kokkos_ARCH_VOLTA70=ON"
elif [[ ! -z $(nvidia-smi | grep "A100") ]]; then
FLAGS+=" -D Kokkos_ARCH_AMPERE80=ON"
else
FLAGS+=" -D Kokkos_ARCH_AMPERE86=ON"
fi
elif [ "${{ matrix.device }}" = "amd-gpu" ]; then
FLAGS="-D Kokkos_ENABLE_HIP=ON -D Kokkos_ARCH_AMD_GFX1100=ON"
fi
cmake -B build -D TESTS=ON -D output=ON -D precision=${{ matrix.precision }} $FLAGS
- name: Compile
run: |
cmake -B build -D TESTS=ON -D precision=${{ matrix.precision }}
cd build
make -j $(exec nproc)
cmake --build build -j $(nproc)
- name: Run tests
run: |
cd build/tests
ctest
ctest --test-dir build --output-on-failure --verbose
69 changes: 0 additions & 69 deletions .github/workflows/compilation.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ Testing/

.schema.json
*_old/
action-token
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(PROJECT_NAME entity)

project(
${PROJECT_NAME}
VERSION 1.0.0
VERSION 1.1.0
LANGUAGES CXX C)
add_compile_options("-D ENTITY_VERSION=\"${PROJECT_VERSION}\"")
execute_process(COMMAND
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ Our [detailed documentation](https://entity-toolkit.github.io/) includes everyth
🤷 __Arno Vanthieghem__ {[@vanthieg](https://github.com/vanthieg): framework, PIC}

😺 __Muni Zhou__ {[@munizhou](https://github.com/munizhou): PIC}

## Branch policy

Master branch contains the latest stable version of the code which has already been released. Development on the core is done on branches starting with `dev/`, while fixing bugs is done in branches that start with `bug/`. User-specific modifications (i.e., new problem generators plus perhaps minor corrections in the core) are done on branches starting with `pgen/`. Before merging to the master branch, all the branches must first be merged to the latest release-candidate branch, which ends with `rc`, via a pull request. After which, when all the release goals are met, the `rc` branch is merged to the master and released as a new stable version. Stale branches will be archived with a tag starting with `archive/` (can still be accessed via the "Tags" tab) and removed.
50 changes: 47 additions & 3 deletions cmake/report.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ PrintChoices("CUDA"
0
42
)
PrintChoices("HIP"
"Kokkos_ENABLE_HIP"
"${ON_OFF_VALUES}"
${Kokkos_ENABLE_HIP}
"OFF"
"${Green}"
HIP_REPORT
0
42
)
PrintChoices("OpenMP"
"Kokkos_ENABLE_OPENMP"
"${ON_OFF_VALUES}"
Expand Down Expand Up @@ -183,6 +193,28 @@ PrintChoices("C compiler"
42
)

get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
string(REGEX MATCH "Kokkos_ARCH_*" _isMatched ${_variableName})
if(_isMatched)
get_property(isSet CACHE ${_variableName} PROPERTY VALUE)
if(isSet STREQUAL "ON")
string(REGEX REPLACE "Kokkos_ARCH_" "" ARCH ${_variableName})
break()
endif()
endif()
endforeach()
PrintChoices("Architecture"
"Kokkos_ARCH_*"
"${ARCH}"
"${ARCH}"
"N/A"
"${ColorReset}"
ARCH_REPORT
0
42
)

if(${Kokkos_ENABLE_CUDA})
if("${CMAKE_CUDA_COMPILER}" STREQUAL "")
execute_process(COMMAND which nvcc OUTPUT_VARIABLE CUDACOMP)
Expand All @@ -194,14 +226,13 @@ if(${Kokkos_ENABLE_CUDA})

message(STATUS "CUDA compiler: ${CUDACOMP}")
execute_process(COMMAND bash -c "${CUDACOMP} --version | grep release | sed -e 's/.*release //' -e 's/,.*//'"

OUTPUT_VARIABLE CUDACOMP_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)

PrintChoices("CUDA compiler"
"CMAKE_CUDA_COMPILER"
"${CUDACOMP} v${CUDACOMP_VERSION}"
"${CUDACOMP} v${CUDACOMP_VERSION}"
"${CUDACOMP}"
"${CUDACOMP}"
"N/A"
"${ColorReset}"
CUDA_COMPILER_REPORT
Expand All @@ -210,6 +241,12 @@ if(${Kokkos_ENABLE_CUDA})
)
endif()

if (${Kokkos_ENABLE_HIP})
execute_process(COMMAND bash -c "hipcc --version | grep HIP | cut -d ':' -f 2 | tr -d ' '"
OUTPUT_VARIABLE ROCM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

set(DOT_SYMBOL "${ColorReset}.")
set(DOTTED_LINE_SYMBOL "${ColorReset}. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ")

Expand Down Expand Up @@ -242,7 +279,9 @@ message(" ${OUTPUT_REPORT}")
message("${DASHED_LINE_SYMBOL}
Compile configurations")

message(" ${ARCH_REPORT}")
message(" ${CUDA_REPORT}")
message(" ${HIP_REPORT}")
message(" ${OPENMP_REPORT}")

message(" ${C_COMPILER_REPORT}")
Expand All @@ -259,6 +298,11 @@ message(" ${DEBUG_REPORT}")

message("${DASHED_LINE_SYMBOL}\nDependencies")

if (NOT "${CUDACOMP_VERSION}" STREQUAL "")
message(" - CUDA:\tv${CUDACOMP_VERSION}")
elseif(NOT "${ROCM_VERSION}" STREQUAL "")
message(" - ROCm:\tv${ROCM_VERSION}")
endif()
message(" - Kokkos:\tv${Kokkos_VERSION}")
if(${output})
message(" - ADIOS2:\tv${adios2_VERSION}")
Expand Down
81 changes: 81 additions & 0 deletions dev/Dockerfile.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
ARG DEBIAN_FRONTEND=noninteractive
ENV DISPLAY=host.docker.internal:0.0

# upgrade
RUN apt-get update && apt-get upgrade -y

# cmake & build tools
RUN apt-get remove -y --purge cmake && \
apt-get install -y wget build-essential && \
wget "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.tar.gz" -P /opt && \
tar xvf /opt/cmake-3.29.6-linux-x86_64.tar.gz -C /opt && \
rm /opt/cmake-3.29.6-linux-x86_64.tar.gz
ENV PATH=/opt/cmake-3.29.6-linux-x86_64/bin:$PATH

# adios2
RUN apt-get update && apt-get install -y git libhdf5-dev && \
git clone https://github.com/ornladios/ADIOS2.git /opt/adios2-src && \
cd /opt/adios2-src && \
cmake -B build \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_CXX_EXTENSIONS=OFF \
-D CMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-D BUILD_SHARED_LIBS=ON \
-D ADIOS2_USE_HDF5=ON \
-D ADIOS2_USE_Python=OFF \
-D ADIOS2_USE_Fortran=OFF \
-D ADIOS2_USE_ZeroMQ=OFF \
-D BUILD_TESTING=OFF \
-D ADIOS2_BUILD_EXAMPLES=OFF \
-D ADIOS2_USE_MPI=OFF \
-D ADIOS2_HAVE_HDF5_VOL=OFF \
-D CMAKE_INSTALL_PREFIX=/opt/adios2 && \
cmake --build build -j && \
cmake --install build && \
rm -rf /opt/adios2-src
ENV ADIOS2_DIR=/opt/adios2
ENV HDF5_ROOT=/usr

# other packages + python
RUN apt-get update && \
apt-get install -y bc gpg curl ssh vim emacs bat fzf ffmpeg hdf5-tools software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y python3.12-dev python3.12-venv

# eza
RUN mkdir -p /etc/apt/keyrings && \
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor -o /etc/apt/keyrings/gierens.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | tee /etc/apt/sources.list.d/gierens.list && \
chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list && \
apt-get update && apt-get install -y eza

# cleanup
RUN apt-get clean && \
apt-get autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/cache/* && \
rm -rf /var/lib/log/* && \
rm -rf /var/lib/apt/lists/*

# python
RUN ln -s $(which python3.12) /bin/python && \
python -m venv /opt/venv && \
/opt/venv/bin/pip install --upgrade pip && \
/opt/venv/bin/pip install black numpy myplotlib nt2py jupyterlab ipykernel
ENV VIRTUAL_ENV=/opt/venv

# user environment
ARG HOME=/root
WORKDIR $HOME
RUN echo "alias ls='eza -a --sort=type'" >> $HOME/.bashrc && \
echo "alias ll='eza -a --long --header --sort=type --time-style=long-iso'" >> $HOME/.bashrc && \
echo "alias cat='batcat -pp'" >> $HOME/.bashrc

RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes && \
echo eval "\$(starship init bash)" >> $HOME/.bashrc && \
mkdir -p $HOME/.config && \
starship preset pure-preset -o $HOME/.config/starship.toml && \
sed -i 's/$python\\//g' $HOME/.config/starship.toml
ENV STARSHIP_CONFIG=$HOME/.config/starship.toml

ENV PATH=/opt/adios2/bin:/opt/venv/bin:$PATH
Loading