Skip to content

Commit

Permalink
Merge branch 'develop' into compactR
Browse files Browse the repository at this point in the history
  • Loading branch information
markdewing authored Apr 26, 2023
2 parents 89b341e + 421d1b5 commit ff50544
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 131 deletions.
130 changes: 18 additions & 112 deletions .github/workflows/ci-github-actions-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
fail-fast: false
matrix:
jobname: [
GCC9-NoMPI-MKL-Real-Mixed, # mixed precision
GCC9-NoMPI-MKL-Complex-Mixed,
GCC9-NoMPI-MKL-Real, # full precision
GCC9-NoMPI-MKL-Complex,
GCC11-NoMPI-MKL-Real-Mixed, # mixed precision
GCC11-NoMPI-MKL-Complex-Mixed,
GCC11-NoMPI-MKL-Real, # full precision
GCC11-NoMPI-MKL-Complex,
]

steps:
Expand Down Expand Up @@ -79,15 +79,15 @@ jobs:

- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh configure
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh configure

- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh build
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh build

- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh test
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh test

- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
Expand Down Expand Up @@ -115,13 +115,14 @@ jobs:
fail-fast: false
matrix:
jobname: [
Clang15-MPI-CUDA-AFQMC-Offload-Real-Mixed, # auxiliary field, offload
Clang15-MPI-CUDA-AFQMC-Offload-Real,
Clang15-MPI-CUDA-AFQMC-Offload-Complex-Mixed,
Clang15-MPI-CUDA-AFQMC-Offload-Complex,
Intel21-MPI-CUDA-AFQMC-Real-Mixed, # auxiliary field, requires MPI
Intel21-MPI-CUDA-AFQMC-Complex-Mixed,
Intel21-MPI-CUDA-AFQMC-Real,
V100-Clang16-MPI-CUDA-AFQMC-Offload-Real-Mixed, # auxiliary field, offload
V100-Clang16-MPI-CUDA-AFQMC-Offload-Real,
V100-Clang16-MPI-CUDA-AFQMC-Offload-Complex-Mixed,
V100-Clang16-MPI-CUDA-AFQMC-Offload-Complex,
V100-GCC11-MPI-CUDA-Real-Mixed,
V100-GCC11-MPI-CUDA-Real,
V100-GCC11-MPI-CUDA-Complex-Mixed,
V100-GCC11-MPI-CUDA-Complex,
]

steps:
Expand Down Expand Up @@ -177,15 +178,15 @@ jobs:

- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh configure
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh configure

- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh build
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh build

- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh test
run: tests/test_automation/github-actions/ci/run_step_ornl-sulfur-2.sh test

- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
Expand Down Expand Up @@ -292,98 +293,3 @@ jobs:
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

nitrogen-cuda:
if: |
github.repository_owner == 'QMCPACK' &&
github.event.issue.pull_request &&
( startsWith(github.event.comment.body, 'Test this please') ||
startsWith(github.event.comment.body, 'Start testing in-house') )
runs-on: [self-hosted, Linux, X64, ornl-nitrogen-2]

env:
GH_JOBNAME: ${{matrix.jobname}}
GH_OS: Linux
strategy:
fail-fast: false
matrix:
jobname: [
GCC9-MPI-CUDA-AFQMC-Real-Mixed, # auxiliary field, requires MPI
GCC9-MPI-CUDA-AFQMC-Complex-Mixed,
GCC9-MPI-CUDA-AFQMC-Real,
GCC9-MPI-CUDA-AFQMC-Complex,
]

steps:
- name: Verify actor
# Only trigger for certain "actors" (those commenting the PR, not the PR originator)
# this is in-line with the current workflow
env:
ACTOR_TOKEN: ${{secrets.TOKENIZER}}${{github.actor}}${{secrets.TOKENIZER}}
SECRET_ACTORS: ${{secrets.CI_GPU_ACTORS}}
if: contains(env.SECRET_ACTORS, env.ACTOR_TOKEN)
id: check
run: |
echo "::set-output name=triggered::true"
# Request repo info, required since issue_comment doesn't point at PR commit, but develop
- name: GitHub API Request
if: steps.check.outputs.triggered == 'true'
id: request
uses: octokit/request-action@v2.1.7
with:
route: ${{github.event.issue.pull_request.url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# Create a separate PR status pointing at GitHub Actions tab URL
# just like any other third-party service
- name: Create PR status
if: steps.check.outputs.triggered == 'true'
uses: Sibz/github-status-action@v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-nitrogen CI ${{matrix.jobname}}"
state: "pending"
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- name: Get PR information
if: steps.check.outputs.triggered == 'true'
id: pr_data
run: |
echo "::set-output name=branch::${{ fromJson(steps.request.outputs.data).head.ref }}"
echo "::set-output name=repo_name::${{ fromJson(steps.request.outputs.data).head.repo.full_name }}"
echo "::set-output name=repo_clone_url::${{ fromJson(steps.request.outputs.data).head.repo.clone_url }}"
echo "::set-output name=repo_ssh_url::${{ fromJson(steps.request.outputs.data).head.repo.ssh_url }}"
- name: Checkout PR branch
if: steps.check.outputs.triggered == 'true'
uses: actions/checkout@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
repository: ${{fromJson(steps.request.outputs.data).head.repo.full_name}}
ref: ${{steps.pr_data.outputs.branch}}

- name: Configure
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh configure

- name: Build
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh build

- name: Test
if: steps.check.outputs.triggered == 'true'
run: tests/test_automation/github-actions/ci/run_step.sh test

- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
uses: Sibz/github-status-action@v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "ornl-nitrogen CI ${{matrix.jobname}}"
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
5 changes: 4 additions & 1 deletion nexus/lib/numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,10 @@ def simplestats(x,dim=None,full=False):
#end def simplestats


def equilibration_length(x,tail=.5,plot=False,xlim=None,bounces=2,random=True):
def equilibration_length(x,tail=.5,plot=False,xlim=None,bounces=2,random=True,seed_from_hash=True):
if seed_from_hash:
np.random.seed(hash(tuple(x))%(2**32))
#end if
bounces = max(1,bounces)
eqlen = 0
nx = len(x)
Expand Down
8 changes: 4 additions & 4 deletions tests/solids/NiO_a4_e48_pp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ else()
list(APPEND DET_NIO_A4_E48_SCALARS "kinetic" "289.74197931 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "potential" "-660.30274039 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "eeenergy" "80.56038781 0.003")
list(APPEND DET_NIO_A4_E48_SCALARS "ionion" "-239.29802821 0.000002")
list(APPEND DET_NIO_A4_E48_SCALARS "ionion" "-239.29802821 0.0000022")
list(APPEND DET_NIO_A4_E48_SCALARS "localecp" "-392.26505707 0.001")
list(APPEND DET_NIO_A4_E48_SCALARS "nonlocalecp" "-109.29992959 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "samples" "9 0.0")
Expand All @@ -290,7 +290,7 @@ else()
list(APPEND DET_NIO_A4_E48_SCALARS "kinetic" "289.73576973 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "potential" "-660.30813251 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "eeenergy" "80.56139080 0.003")
list(APPEND DET_NIO_A4_E48_SCALARS "ionion" "-239.29802821 0.000002")
list(APPEND DET_NIO_A4_E48_SCALARS "ionion" "-239.29802821 0.0000022")
list(APPEND DET_NIO_A4_E48_SCALARS "localecp" "-392.26503661 0.001")
list(APPEND DET_NIO_A4_E48_SCALARS "nonlocalecp" "-109.30472876 0.02")
list(APPEND DET_NIO_A4_E48_SCALARS "samples" "9 0.0")
Expand Down Expand Up @@ -335,7 +335,7 @@ else()
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "kinetic" "248.13553181 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "potential" "-619.18437480 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "eeenergy" "75.55908504 0.003")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "ionion" "-239.29802821 0.000002")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "ionion" "-239.29802821 0.0000022")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "localecp" "-391.88718168 0.0015")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "nonlocalecp" "-63.55832834 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "samples" "9 0.0")
Expand All @@ -344,7 +344,7 @@ else()
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "kinetic" "248.13840975 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "potential" "-619.18265461 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "eeenergy" "75.55912430 0.003")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "ionion" "-239.29802821 0.000002")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "ionion" "-239.29802821 0.0000022")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "localecp" "-391.88648786 0.0015")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "nonlocalecp" "-63.55606971 0.02")
list(APPEND DET_NIO_BATCHED_A4_E48_SCALARS "samples" "9 0.0")
Expand Down
14 changes: 0 additions & 14 deletions tests/test_automation/github-actions/ci/run_step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,6 @@ case "$1" in
;;
esac

# Path to QMC_DATA in self-hosted CI system and point at minimum gcc-9
if [[ "$HOST_NAME" =~ (sulfur) || "$HOST_NAME" =~ (nitrogen) ]]
then
QMC_DATA_DIR=/scratch/ci/QMC_DATA_FULL

# use gcc-9
export PATH=/opt/rh/gcc-toolset-9/root/bin:$PATH
export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9:$LD_LIBRARY_PATH

# Make current environment variables available to subsequent steps
echo "PATH=/opt/rh/gcc-toolset-9/root/bin:$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9:$LD_LIBRARY_PATH" >> $GITHUB_ENV
fi

if [[ "$CONTAINER_OS" =~ (centos) ]]
then
# use spack
Expand Down
82 changes: 82 additions & 0 deletions tests/test_automation/github-actions/ci/run_step_ornl-sulfur-1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/bash

set -x
HOST_NAME=$(hostname -s)

case "$1" in

# Configure qmcpack using cmake out-of-source builds
configure)

echo "Use recent CMake v3.26.3"
export PATH=$HOME/opt/cmake/3.26.3/bin:$PATH
# Make current environment variables available to subsequent steps, ctest
echo "PATH=$PATH" >> $GITHUB_ENV

QMC_DATA_DIR=/scratch/ci/QMC_DATA_FULL

if [ -d ${GITHUB_WORKSPACE}/../qmcpack-build ]
then
echo "Found existing out-of-source build directory ${GITHUB_WORKSPACE}/../qmcpack-build, removing"
rm -fr ${GITHUB_WORKSPACE}/../qmcpack-build
fi

echo "Creating new out-of-source build directory ${GITHUB_WORKSPACE}/../qmcpack-build"
cd ${GITHUB_WORKSPACE}/.. && mkdir qmcpack-build && cd qmcpack-build

# Build variants
# Real or Complex configuration
case "${GH_JOBNAME}" in
*"Real"*)
echo 'Configure for real build -DQMC_COMPLEX=0'
IS_COMPLEX=0
;;
*"Complex"*)
echo 'Configure for complex build -DQMC_COMPLEX=1'
IS_COMPLEX=1
;;
esac

# Mixed or Non-Mixed (default, full) precision, used with GPU code
case "${GH_JOBNAME}" in
*"Mixed"*)
echo 'Configure for mixed precision build -DQMC_MIXED_PRECISION=1'
IS_MIXED_PRECISION=1
;;
*)
IS_MIXED_PRECISION=0
;;
esac

case "${GH_JOBNAME}" in
*"GCC11-NoMPI-MKL-"*)
echo 'Configure for building with GCC and Intel MKL'

source /opt/intel/oneapi/setvars.sh

cmake -GNinja \
-DBLA_VENDOR=Intel10_64lp \
-DQMC_MPI=0 \
-DQMC_COMPLEX=$IS_COMPLEX \
-DQMC_MIXED_PRECISION=$IS_MIXED_PRECISION \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DQMC_DATA=$QMC_DATA_DIR \
${GITHUB_WORKSPACE}

;;
esac
;;

build)
cd ${GITHUB_WORKSPACE}/../qmcpack-build
ninja
;;

test)
source /opt/intel/oneapi/setvars.sh
echo "Running deterministic tests"
cd ${GITHUB_WORKSPACE}/../qmcpack-build
ctest --output-on-failure -L deterministic -j 32
;;

esac
Loading

0 comments on commit ff50544

Please sign in to comment.