Skip to content

Commit 76acc65

Browse files
committed
Merge branch 'main' into bugfix-mastereq
2 parents d3b670a + 76ad3a5 commit 76acc65

File tree

10 files changed

+95
-63
lines changed

10 files changed

+95
-63
lines changed

.ci-scripts/build_and_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ then
261261

262262
timed_message "Run regression tests"
263263

264-
mpi_exe=`grep 'MPIEXEC_EXECUTABLE' ${hostconfig_path} | cut -d'"' -f2`
265-
pytest -v -s regression_tests --mpi-exec=${mpi_exe}
264+
mpi_exe=$(grep 'MPIEXEC_EXECUTABLE' "${hostconfig_path}" | cut -d'"' -f2 | sed 's/;/ /g')
265+
pytest -v -s regression_tests --mpi-exec="${mpi_exe}"
266266

267267
timed_message "Quandary tests completed"
268268
fi

.ci-scripts/radiuss-spack-configs

.github/workflows/test-macos.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches: ['main']
6+
push:
7+
branches: ['main']
8+
9+
jobs:
10+
build-and-test:
11+
strategy:
12+
matrix:
13+
os: [macos-latest, ubuntu-24.04]
14+
runs-on: ${{ matrix.os }}
15+
permissions:
16+
packages: write
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Set up Spack
25+
uses: spack/setup-spack@v2
26+
27+
- name: Configure Spack
28+
run: |
29+
spack -e .spack_env mirror set binary_mirror --unsigned
30+
spack mirror add --type binary --unsigned --oci-username GITHUB_USER --oci-password-variable GITHUB_TOKEN local-buildcache oci://ghcr.io/LLNL/quandary-spack-buildcache
31+
32+
- name: Install
33+
# explicitly use openmpi, since mpich causes rpath problems in binary
34+
run: |
35+
spack -e .spack_env rm quandary
36+
spack -e .spack_env add quandary@develop+test^openmpi
37+
spack -e .spack_env install --use-buildcache package:never
38+
39+
- name: Run regression tests
40+
shell: spack-sh {0}
41+
run: |
42+
spack env activate .spack_env
43+
python -m pip install -e . --prefer-binary
44+
pytest -v -s regression_tests --mpi-opt="--oversubscribe"
45+
46+
- name: Push packages and update index
47+
env:
48+
GITHUB_USER: ${{ github.actor }}
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
DOCKER_DEFAULT_PLATFORM: linux/amd64
51+
run: |
52+
if [[ "${{ matrix.os }}" == "ubuntu-24.04" ]]; then
53+
# Force push quandary package
54+
spack -e .spack_env buildcache push -f --base-image ubuntu:24.04 --update-index local-buildcache quandary
55+
spack -e .spack_env buildcache push --base-image ubuntu:24.04 --update-index local-buildcache
56+
else
57+
spack -e .spack_env buildcache push --update-index local-buildcache
58+
fi
59+
if: ${{ !cancelled() }}

.gitlab/custom-jobs-and-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variables:
3939
# Project specific variants for lassen
4040
PROJECT_LASSEN_VARIANTS: "+test"
4141
# Project specific deps for lassen
42-
PROJECT_LASSEN_DEPS: ""
42+
PROJECT_LASSEN_DEPS: "^netlib-lapack@3.9.0"
4343

4444
# Configuration shared by build and test jobs specific to this project.
4545
# Not all configuration can be shared. Here projects can fine tune the

.gitlab/jobs/lassen.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,3 @@
1313
########################
1414
# Overridden shared jobs
1515
########################
16-
# We duplicate the shared jobs description and add necessary changes for RAJA.
17-
# We keep ${PROJECT_<MACHINE>_VARIANTS} and ${PROJECT_<MACHINE>_DEPS} So that
18-
# the comparison with the original job is easier.
19-
20-
gcc_11_2_1_cuda_11_8_0:
21-
variables:
22-
# Force petsc to use same compiler
23-
SPEC: "${PROJECT_LASSEN_VARIANTS} +cuda %gcc@=11.2.1 ^cuda@11.8.0+allow-unsupported-compilers ${PROJECT_LASSEN_DEPS} ^petsc%gcc@=11.2.1"
24-
MODULE_LIST: "cuda/11.8.0"
25-
extends: [.job_on_lassen]

.gitlab/jobs/ruby.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ oneapi_2023_2_1:
1717
variables:
1818
ON_RUBY: "OFF"
1919
extends: .job_on_ruby
20+
21+
# Force mvapich2 to be built with gcc
22+
gcc_10_3_1:
23+
variables:
24+
SPEC: "${PROJECT_RUBY_VARIANTS} %gcc@=10.3.1 ${PROJECT_RUBY_DEPS} ^mvapich2%gcc@=10.3.1"
25+
extends: .job_on_ruby

CMakeLists.txt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@ set(CMAKE_CXX_STANDARD 14)
1111
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
1212
set(ENABLE_MPI ON CACHE BOOL "")
1313

14-
include(blt/SetupBLT.cmake)
14+
################################
15+
# BLT
16+
################################
17+
if (NOT BLT_LOADED)
18+
if (DEFINED BLT_SOURCE_DIR)
19+
if (NOT EXISTS ${BLT_SOURCE_DIR}/SetupBLT.cmake)
20+
message(FATAL_ERROR "Given BLT_SOURCE_DIR does not contain SetupBLT.cmake")
21+
endif()
22+
else ()
23+
set (BLT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/blt CACHE PATH "")
24+
25+
if (NOT EXISTS ${BLT_SOURCE_DIR}/SetupBLT.cmake)
26+
message(FATAL_ERROR
27+
"The BLT git submodule is not present. "
28+
"Either run the following two commands in your git repository: \n"
29+
" git submodule init\n"
30+
" git submodule update\n"
31+
"Or add -DBLT_SOURCE_DIR=/path/to/blt to your CMake command." )
32+
endif ()
33+
endif ()
34+
35+
message(STATUS "BLT Source Directory: ${BLT_SOURCE_DIR}")
36+
include(${BLT_SOURCE_DIR}/SetupBLT.cmake)
37+
endif()
1538

1639
add_subdirectory(src)

regression_tests/regression_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def test_eval(test_case: Case, request):
5353
def run_test(simulation_dir, number_of_processes, config_file, files_to_compare, exact, mpi_exec, mpi_opt):
5454
os.chdir(simulation_dir)
5555

56-
command = [mpi_exec, "-n", str(number_of_processes)]
56+
command = mpi_exec.split()
57+
command.extend(["-n", str(number_of_processes)])
5758
if mpi_opt:
5859
command.extend([mpi_opt])
5960
command.extend([QUANDARY_PATH, config_file])

src/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ find_package(PkgConfig REQUIRED)
2525
pkg_search_module(PETSC REQUIRED IMPORTED_TARGET PETSc)
2626
target_link_libraries(quandary_lib PUBLIC PkgConfig::PETSC)
2727

28-
# Other libraries
29-
target_link_libraries(quandary_lib PUBLIC m blas lapack)
30-
3128
# Put executable in root directory
3229
set_target_properties(
3330
quandary

0 commit comments

Comments
 (0)