Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
23 changes: 11 additions & 12 deletions .github/workflows/trigger-hpsf-gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ jobs:
MERGE_REF="${{ steps.setref.outputs.merge_ref }}"
echo "Triggering GitLab pipeline for ref: $MERGE_REF"

GITHUB_PIPELINE_NAME="GitHub #${{ github.event.issue.number }}: ${{ steps.setref.outputs.pr_title }}"

RESPONSE=$(curl -s -X POST \
-F token=${{ secrets.HPSF_GITLAB_TRIGGER_TOKEN }} \
-F ref=development \
-F "variables[GITHUB_PR_NUMBER]=${{ github.event.issue.number }}" \
-F "variables[GITHUB_MERGE_REF]=refs/pull/${{ github.event.issue.number }}/merge" \
-F "variables[GITHUB_TRIGGER_ACTOR]=${{ github.actor }}" \
-F "variables[GITHUB_PR_TITLE]=${{ steps.setref.outputs.pr_title }}" \
-F "variables[GITHUB_PIPELINE_NAME]=${GITHUB_PIPELINE_NAME}" \
"https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/trigger/pipeline")

echo "GitLab response: $RESPONSE"
Expand All @@ -60,15 +63,6 @@ jobs:
echo "pipeline_url=$PIPELINE_URL" >> $GITHUB_OUTPUT
echo "pipeline_id=$PIPELINE_ID" >> $GITHUB_OUTPUT

# Update pipeline name
PIPELINE_NAME="GitHub #${{ github.event.issue.number }}: ${{ steps.setref.outputs.pr_title }}"
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)"
echo "Updated pipeline name to: $PIPELINE_NAME"

- name: Post status to GitHub PR
shell: bash
run: |
Expand All @@ -90,7 +84,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 +94,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_PIPELINE_NAME'

.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