Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ jobs:
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Install
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wmissing-include-dirs -Wno-array-bounds"}
env: {CXXFLAGS: "-fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wlogical-op -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wmissing-include-dirs -Wno-array-bounds -Wno-maybe-uninitialized"}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/trigger-hpsf-gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
curl --request PUT \
--header "PRIVATE-TOKEN: ${{ secrets.HPSF_GITLAB_API_TOKEN }}" \
--data-urlencode "name=${PIPELINE_NAME}" \
"https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/pipelines/${PIPELINE_ID}/metadata"
|| echo "Warning: Failed to update pipline name (possibly expired token)"
"https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/pipelines/${PIPELINE_ID}/metadata" \
|| echo "Warning: Failed to update pipeline name (possibly expired token)"
echo "Updated pipeline name to: $PIPELINE_NAME"

- name: Post status to GitHub PR
Expand All @@ -90,7 +90,7 @@ jobs:
echo "Waiting on GitLab pipeline $PIPELINE_ID..."

STATUS="running"
MAX_WAIT=14400 # 4 hours
MAX_WAIT=86400 # 24 hours
ELAPSED=0

while [[ "$STATUS" == "running" || "$STATUS" == "pending" ]]; do
Expand All @@ -100,8 +100,13 @@ jobs:
exit 1
fi

sleep 300
ELAPSED=$((ELAPSED + 300))
if [ $ELAPSED -lt 7200 ]; then
SLEEP_TIME=600 # 10 minutes
else
SLEEP_TIME=3600 # 1 hour
fi
sleep $SLEEP_TIME
ELAPSED=$((ELAPSED + SLEEP_TIME))

STATUS=$(curl -s \
"https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/pipelines/$PIPELINE_ID" \
Expand Down
7 changes: 5 additions & 2 deletions .gitlab/hpsf-gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
workflow:
name: '$GITHUB_PR_TITLE'

.dependency-n-fetch-pr:
stage: test
before_script:
Expand All @@ -10,7 +13,7 @@
echo "GITHUB_PR_TITLE=$GITHUB_PR_TITLE"
git remote add github https://github.com/amrex-codes/amrex.git
git fetch --depth=1 github "${GITHUB_MERGE_REF}"
git checkout FETCH_HEAD -b pr-${GITHUB_PR_NUMBER}
git checkout FETCH_HEAD
fi

Nvidia-H100-single-precision:
Expand Down Expand Up @@ -81,7 +84,6 @@ Intel-PVC:
- |
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DAMReX_MPI=OFF \
-DAMReX_SPACEDIM="1;2;3" \
-DAMReX_FFT=ON \
Expand All @@ -91,6 +93,7 @@ Intel-PVC:
-DAMReX_GPU_BACKEND=SYCL \
-DCMAKE_C_COMPILER=$(which icx) \
-DCMAKE_CXX_COMPILER=$(which icpx) \
-DCMAKE_CXX_FLAGS="-fp-model=precise" \
-DAMReX_PARALLEL_LINK_JOBS=8
- cmake --build build -j 16
- export AMREX_THE_ARENA_INIT_SIZE=1e9
Expand Down
7 changes: 5 additions & 2 deletions Src/Base/AMReX_Vector.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <algorithm>
#include <memory>
#include <string>
#include <vector>

namespace amrex {
Expand All @@ -32,13 +33,15 @@ public:

[[nodiscard]] T& operator[] (size_type i) noexcept
{
BL_ASSERT( i < (this->std::vector<T, Allocator>::size()) );
AMREX_ASSERT_WITH_MESSAGE(i < (this->std::vector<T, Allocator>::size()),
"Out of bound error, index: " + std::to_string(i) + " size: " + std::to_string(size()));
return this->std::vector<T, Allocator>::operator[](i);
}

[[nodiscard]] const T& operator[] (size_type i) const noexcept
{
BL_ASSERT( i < (this->std::vector<T, Allocator>::size()) );
AMREX_ASSERT_WITH_MESSAGE(i < (this->std::vector<T, Allocator>::size()),
"Out of bound error, index: " + std::to_string(i) + " size: " + std::to_string(size()));
return this->std::vector<T, Allocator>::operator[](i);
}

Expand Down
Loading