Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Overhaul #309

Merged
merged 52 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2565a85
Add configuration strings to host config file through spack, begin cr…
ldowen Oct 1, 2024
4fd9292
Removed yaml method and TPL, fixed missed variable in spheraloptionpa…
ldowen Oct 3, 2024
6e15a5a
Made adiak python wrapping more general, automatically add commandLin…
ldowen Oct 3, 2024
064004b
Merge with develop
ldowen Oct 3, 2024
4b581fd
Fix testTimers
ldowen Oct 3, 2024
1248ea6
Moved Caliper and Adiak parsing and init routines to a new SpheralTim…
ldowen Oct 7, 2024
d4c1144
Slight change to testTimers
ldowen Oct 7, 2024
b01e5ef
Fix issues with non-typical types being given to adiak
ldowen Oct 8, 2024
482c5f9
Move performance.py to the correct place
ldowen Oct 8, 2024
b297eae
Reconfigured lcats, removed cerr output for distributed files, added …
ldowen Oct 9, 2024
2622667
Fix typo in Noh-planar-1d.py
ldowen Oct 14, 2024
6e2cdbd
Merge branch 'develop' into feature/performance_tests
ldowen Oct 14, 2024
4c2807b
Change cout to cerr for iterate ideal h
ldowen Oct 14, 2024
958ebef
Merge branch 'develop' into feature/performance_tests
ldowen Oct 15, 2024
48d585d
Overhaul of interactions with ATS system, fixed hacky install of test…
ldowen Oct 23, 2024
09aeaa1
Removed vector, tensor etc types as possible adiak inputs
ldowen Oct 23, 2024
c63f8f0
More minor changes to tests and builds
ldowen Oct 24, 2024
b311adf
Merge with develop
ldowen Oct 24, 2024
78af0ba
Updated py-ats version and added proper patch
ldowen Oct 24, 2024
7e89b24
Added failing test to ensure tests are working, more fixes for option…
ldowen Oct 25, 2024
ef2b1db
Fix ats filters passed from CMake
ldowen Oct 25, 2024
1ca7d9d
More bug fixes for ats arguments
ldowen Oct 28, 2024
a8f85c4
Make sure entire run command is in quotes to avoid bsub issue with in…
ldowen Oct 28, 2024
9f300b2
Another attempt to fix job launch ats stuff
ldowen Oct 28, 2024
02b432f
Fix issue for running ATS on non-LC machines
ldowen Oct 29, 2024
d881ac1
Added mpi for docker ats tests, improved machine config tests for sph…
ldowen Oct 30, 2024
10a4121
Added SpheralConfigs.py.in to remove files configured by CMake, broug…
ldowen Oct 31, 2024
0db33f4
Add line to docs about valgrind, fix typo in dockerfile
ldowen Oct 31, 2024
5ae0f31
Merge branch 'develop' into feature/performance_tests
ldowen Nov 6, 2024
4e1d42d
Remove pdebug queue setting in spheral-ats
ldowen Nov 6, 2024
356c54f
Merge with develop
ldowen Nov 6, 2024
d4c9bf7
Adding -l options to spheral-ats to hopefully remove stty error messages
ldowen Nov 7, 2024
514f6a6
Fix issue where allocations are scheduled inside of allocations, have…
ldowen Nov 7, 2024
57f644b
Fix bug in machine.yaml
ldowen Nov 7, 2024
8b7c046
Removed shell input for machines.yaml
ldowen Nov 7, 2024
42a1217
Explicitly set them to batch runners
ldowen Nov 7, 2024
06da230
Split up host-config CI command to not include build call, added no-c…
ldowen Nov 8, 2024
b7be579
Changed build and test back to be after_script even though after_scri…
ldowen Nov 9, 2024
609b9b3
Switched back to using cmake build for simplicity
ldowen Nov 11, 2024
a6776c8
Fix typo in gitlab script
ldowen Nov 11, 2024
076f8d3
Added allocation time variable and timeout for gitlab ci
ldowen Nov 11, 2024
0ddd853
Moved timeout to be part of the machine specs
ldowen Nov 11, 2024
6e6d0bb
Make alloc and timeout times coincident
ldowen Nov 11, 2024
17b12a6
Trying to fix slowdown of builds on rzgenie
ldowen Nov 12, 2024
10d27a4
Updated release notes
ldowen Nov 13, 2024
6ad28e4
Removed lcats script
ldowen Nov 13, 2024
e351eb4
Fix bugs in performance.py
ldowen Nov 14, 2024
5d9ea27
Added 3d periodic test, removed perftest option from spheral_ats.py
ldowen Nov 15, 2024
4379c85
C Merge branch 'develop' into feature/performance_tests
ldowen Nov 15, 2024
f966013
Fix bug where default adiak data was incorrect if mpi module had not …
ldowen Nov 18, 2024
230c1e2
Merge with develop
ldowen Nov 18, 2024
1673bb2
Cleaned up performance.py, reverted some changes to gitlab/scripts.ya…
ldowen Nov 22, 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
20 changes: 11 additions & 9 deletions .gitlab/machines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@
.on_ruby:
tags:
- ruby
- shell
- batch
variables:
SCHEDULER_ACTION: allocate
SCHEDULER_PARAMETERS: "--res=ci --exclusive -N 2 -t 120"
NPROC: 112
HOSTNAME: 'ruby'
PARTITION: pdebug
BUILD_ALLOC: srun -N 1 -c 36 -p pdebug -t 60
TEST_ALLOC: ''
CLEAN_ALLOC: srun -n 20
timeout: 120 minutes
extends: [.on_toss_4_x86]

.on_lassen:
tags:
- lassen
- shell
- batch
variables:
SCHEDULER_PARAMETERS: "-nnodes 1 -W 150 -q pci -alloc_flags atsdisable"
LSB_JOB_STARTER: "ENVIRONMENT=BATCH /usr/tcetmp/bin/bsub_job_starter %USRCMD"
NPROC: 40
ENVIRONMENT: "BATCH"
HOSTNAME: 'lassen'
BUILD_ALLOC: lalloc 1 -W 60
TEST_ALLOC: $BUILD_ALLOC
CLEAN_ALLOC: lalloc 1 lrun -n 20
LC_MODULES: "cuda/11.1.0"
timeout: 150 minutes
extends: [.on_blueos_3_ppc64]

# ------------------------------------------------------------------------------
Expand Down
26 changes: 16 additions & 10 deletions .gitlab/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- cd $CI_BUILD_DIR
- echo $SPEC

- $BUILD_ALLOC ./$SCRIPT_DIR/gitlab/build_and_install.py --spec="$SPEC" --tpls-only
- ./$SCRIPT_DIR/gitlab/build_and_install.py --spec="$SPEC" --tpls-only
artifacts:
paths:
- ci-dir.txt
Expand All @@ -27,7 +27,7 @@
script:
- CI_BUILD_DIR=$(cat ci-dir.txt)
- cd $CI_BUILD_DIR && cat job-name.txt
- $BUILD_ALLOC ./$SCRIPT_DIR/devtools/host-config-build.py --host-config gitlab.cmake --build $EXTRA_CMAKE_ARGS
- ./$SCRIPT_DIR/devtools/host-config-build.py --no-clean --build --nprocs $NPROC --host-config gitlab.cmake $EXTRA_CMAKE_ARGS
artifacts:
paths:
- ci-dir.txt
Expand Down Expand Up @@ -55,7 +55,7 @@
- CI_BUILD_DIR=$(cat ci-dir.txt)
- cd $CI_BUILD_DIR && cat job-name.txt

- ./build_gitlab/install/spheral $SCRIPT_DIR/gitlab/run_ats.py --test-alloc "$TEST_ALLOC" --ats-file $ATS_FILE --ci-build-dir $CI_BUILD_DIR || exit_code=$?
- ./build_gitlab/install/spheral-ats --ciRun ./build_gitlab/install/$ATS_FILE || exit_code=$?
- cp -r test-logs $CI_PROJECT_DIR
- exit $exit_code
artifacts:
Expand All @@ -76,24 +76,26 @@

- ml load mpifileutils
- cd $SPHERAL_BUILDS_DIR
- $CLEAN_ALLOC drm $CI_BUILD_DIR/..
- drm $CI_BUILD_DIR/..

# ------------------------------------------------------------------------------
# Shared TPL scripts.
# ------------------------------------------------------------------------------

.update_tpls:
stage: update_tpls
variables:
GIT_STRATEGY: none
script:
- $BUILD_ALLOC ./$SCRIPT_DIR/devtools/tpl-manager.py --spec-list="$SCRIPT_DIR/devtools/spec-list.json" --spheral-spack-dir=$UPSTREAM_DIR
- ./$SCRIPT_DIR/devtools/tpl-manager.py --spec-list="$SCRIPT_DIR/devtools/spec-list.json" --spheral-spack-dir=$UPSTREAM_DIR
mdavis36 marked this conversation as resolved.
Show resolved Hide resolved

.toss_update_permissions:
stage: update_permissions
variables:
GIT_STRATEGY: none
script:
- ml load mpifileutils
- srun -N 1 -p $PARTITION -n 20 -t 10 dchmod --mode go+rx $UPSTREAM_DIR
- dchmod --mode go+rx $UPSTREAM_DIR

# ------------------------------------------------------------------------------
# Production Installation scripts
Expand All @@ -112,12 +114,14 @@

.build_dev_pkg:
stage: generate_buildcache
variables:
GIT_STRATEGY: none
extends: [.spheral_rev_str]
script:
- INSTALL_DIR=/usr/gapps/Spheral/$SYS_TYPE/spheral-$SPHERAL_REV_STR
- DEV_PKG_NAME=$SYS_TYPE-spheral-dev-pkg-$SPHERAL_REV_STR

- env SPHERAL_REV_STR=$SPHERAL_REV_STR INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME BUILD_ALLOC="$BUILD_ALLOC" SCRIPT_DIR=$SCRIPT_DIR
- env SPHERAL_REV_STR=$SPHERAL_REV_STR INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME SCRIPT_DIR=$SCRIPT_DIR
bash ./$SCRIPT_DIR/lc/generate-buildcache.sh

- echo $INSTALL_DIR &> install-dir.txt
mdavis36 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -131,6 +135,8 @@

.install_dev_pkg:
stage: install_production
variables:
GIT_STRATEGY: none
script:
- INSTALL_DIR=$(cat install-dir.txt)
- DEV_PKG_NAME=$(cat dev-pkg-name.txt)
Expand All @@ -139,7 +145,7 @@
- tar -xzf $DEV_PKG_NAME.tar.gz
- cd $DEV_PKG_NAME

- env INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME BUILD_ALLOC="$BUILD_ALLOC" SCRIPT_DIR=$SCRIPT_DIR
- env INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME SCRIPT_DIR=$SCRIPT_DIR
bash ./$SCRIPT_DIR/lc/install-from-dev-pkg.sh

artifacts:
Expand All @@ -158,7 +164,7 @@
- chmod go+r /usr/gapps/Spheral/modulefiles/Spheral/"$ALIAS".lua

- ml load mpifileutils
- srun -N 1 -p $PARTITION -n 20 -t 10 dchmod --mode go+rx $INSTALL_DIR
- dchmod --mode go+rx $INSTALL_DIR
- ln -sfn $INSTALL_DIR /usr/gapps/Spheral/$SYS_TYPE/$ALIAS


Expand All @@ -181,7 +187,7 @@
- echo $DIR_LIST

- ml load mpifileutils
- if [[ $DIR_LIST ]]; then $CLEAN_ALLOC drm $DIR_LIST; else echo "No directories to remove at this time."; fi
- if [[ $DIR_LIST ]]; then drm $DIR_LIST; else echo "No directories to remove at this time."; fi
when: always

.merge_pr_rule:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(cmake/SpheralVersion.cmake)
project(spheral LANGUAGES C CXX Fortran VERSION ${SPHERAL_VERSION})

set(SPHERAL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to Spheral source directory")
set(SPHERAL_TEST_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(SPHERAL_TEST_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/tests)

include(cmake/SetupSpheral.cmake)

Expand Down
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,13 @@ RUN make install
# Run ATS testing suite.
WORKDIR ../install
ENV MPLBACKEND=agg
RUN ./spheral-atstest --filter="level<100" tests/integration.ats

# ATS currently does not allow us to run in parallel for regular linux machines
# If it did, we would need some of the following commands
#RUN export OMP_NUM_THREADS=1
#RUN export MACHINE_TYPE="winParallel"
#RUN ./spheral-ats --level 99 --mpiexe mpiexec --npMax $JCXX tests/integration.ats

# Instead, we will just run it normally
RUN ./spheral-ats --level 99 tests/integration.ats
# -----------------------------------------------------------------------------
8 changes: 6 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Notable changes include:
* Physics::postStateUpdate now returns a bool indicating if boundary conditions should be enforced again.
* Physics packages can now have Physics sub-packages, which can be run before or after the main package. The SpheralController
now checks for these packages and adds them to the physics package list as needed.
* Physics packages can indicate if they require Voronoi cell information be available. If so, a new package which computes and
* Physics packages can indicate if they require Voronoi cell information be available. If so, a new package which computes and
updates the Voronoi information is automatically added to the package list by the SpheralController (similar to how the
Reproducing Kernel corrections are handled).
* Command line options are now consistent. Default values of a string "None" are no longer allowed and any input through the command line of "None" will become the python NoneType None.
* Cleaned up use of std::any in State objects using a visitor pattern to be rigorous ensuring all state entries are handled properly
during assignement, equality, and cloning operations. This is intended to help ensure our Physics advance during time integration
is correct.
Expand All @@ -43,13 +44,16 @@ Notable changes include:
* ENABLE\_DEV\_BUILD can now export targets properly.
* Added a GCC flag to prevent building variable tracking symbols when building PYB11 modules. This is unnecessary, and
on some platforms trying to build such symbols is very expensive and in some cases fails.
* Consolidates lcatstest.in and run\_ats.py into a single spheral\_ats.py script.
* SPHERAL\_TEST\_INSTALL\_PREFIX now includes the tests directory.
* Removed most configured files and added a SpheralConfigs.py file to use at runtime instead.

* Bug Fixes / improvements:
* Wrappers for MPI calls are simplified and improved.
* Time step estimate due to velocity divergence in RZ space has been fixed.
* Fixed tolerances for ANEOS equation of state temperature lookup
* Clang C++ warnings have eliminated, so the Clang CI tests have been updated to treat warnings as errors.
* Fix for installing libraries when building individual package WITH ENABLE_DEV_BUILD=On.
* Fix for installing libraries when building individual package with ENABLE\_DEV\_BUILD=On.
* Bugfix for RZ solid CRKSPH with compatible energy.
* Parsing of None string now always becomes None python type. Tests have been updated accordingly.
* IO for checkpoints and visuzalization can now be properly turned off through SpheralController input options.
Expand Down
41 changes: 8 additions & 33 deletions cmake/SetupSpheral.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -153,40 +153,15 @@ endif()
# Build C++ tests and install tests to install directory
#-------------------------------------------------------------------------------
if (ENABLE_TESTS)
install(DIRECTORY ${SPHERAL_ROOT_DIR}/tests/
USE_SOURCE_PERMISSIONS
DESTINATION "${SPHERAL_TEST_INSTALL_PREFIX}"
PATTERN "*CMakeLists.txt*" EXCLUDE
PATTERN "*.cmake" EXCLUDE
PATTERN "*.in" EXCLUDE
PATTERN "*.pyc" EXCLUDE
PATTERN "*~" EXCLUDE)
add_subdirectory(${SPHERAL_ROOT_DIR}/tests/unit)

# A macro to preserve directory structure when installing files
macro(install_with_directory)
set(optionsArgs "")
set(oneValueArgs SOURCE DESTINATION)
set(multiValueArgs FILES)
cmake_parse_arguments(CAS "${optionsArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
foreach(FILE ${CAS_FILES})
get_filename_component(DIR ${FILE} DIRECTORY)
INSTALL(FILES ${CAS_SOURCE}/${FILE} DESTINATION ${CAS_DESTINATION}/${DIR})
endforeach()
endmacro(install_with_directory)

# Find the test files we want to install
set(test_files1 "")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git ls-files tests
WORKING_DIRECTORY ${SPHERAL_ROOT_DIR}
OUTPUT_VARIABLE test_files1)
else()
execute_process(
COMMAND find tests -type f
WORKING_DIRECTORY ${SPHERAL_ROOT_DIR}
OUTPUT_VARIABLE test_files1)
endif()
string(REPLACE "\n" " " test_files ${test_files1})
separate_arguments(test_files)
list(REMOVE_ITEM test_files tests/unit/CXXTests/runCXXTests.ats)
install_with_directory(
FILES ${test_files}
SOURCE ${SPHERAL_ROOT_DIR}
DESTINATION ${SPHERAL_TEST_INSTALL_PREFIX})
endif()

include(${SPHERAL_ROOT_DIR}/cmake/SpheralConfig.cmake)
Loading
Loading