Skip to content

Improve performance analysis tool #330

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

Merged
merged 27 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0d0c960
Improved performance analysis script for more general timing comparisons
ldowen Jan 31, 2025
1f3377e
Improved performance_analysis.py including better error messages, bug…
ldowen Feb 7, 2025
d490fc4
Merge branch 'develop' into feature/improve_perf_analysis
ldowen Feb 7, 2025
8ae72c9
Fixed SPHERAL_TEST_INSTALL_PREFIX, added advance region to use for pe…
ldowen Feb 13, 2025
0e4a059
Merge branch 'develop' into feature/improve_perf_analysis
ldowen Feb 13, 2025
4b1e759
Try setting mpi4py version to 4.0.2
ldowen Feb 18, 2025
f81c2f3
Switched specs around to avoid issues with newer spack versions, upda…
ldowen Mar 27, 2025
44becce
Merge branch 'develop' into feature/improve_perf_analysis
ldowen Mar 27, 2025
fc2b477
Add plot function for historical benchmarks, add call to pickle bench…
ldowen Apr 25, 2025
234589b
Fix analysis bugs
ldowen Apr 28, 2025
e2cd76d
No more pickling data
ldowen May 8, 2025
2c6d2d5
Merge branch 'develop' into feature/improve_perf_analysis
ldowen May 13, 2025
5a7f641
Merge branch 'develop' into feature/improve_perf_analysis
ldowen May 14, 2025
69f372c
Merge branch 'develop' into feature/improve_perf_analysis
ldowen May 15, 2025
55006ff
Improve plot readability and add option to save plot files
ldowen May 19, 2025
8f5bf15
Fix bug where CI performance test would incorrectly move benchmark da…
ldowen May 20, 2025
7a7c6f3
Merge with develop
ldowen May 21, 2025
54bfe7c
Updated RELEASE_NOTES, added deploy CI stage, improved performance an…
ldowen May 21, 2025
dba25e5
Removed unused variable in tests/performance.py
ldowen May 21, 2025
8b696a1
test-deploy Pages needs git submodules because LLNLspheral needs the …
ldowen May 21, 2025
559ca84
Updated docs with gitlab pages info
ldowen May 21, 2025
56addde
test-deploy Prevent LLNLSpheral from grabbing the wrong conf.py, prev…
ldowen May 21, 2025
3f23619
test-deploy deploy stage now uses python environment in $HOME to mini…
ldowen May 21, 2025
8f6e65a
Remove lines between faint markers in historical plots
ldowen May 22, 2025
a07d4b6
Change spheral test install prefix to allow LLNLSpheral tests to be r…
ldowen May 22, 2025
6efbcdd
Performance.py now finds tests relative to itself and is called from …
ldowen May 22, 2025
50c7cb7
Cannot use __file__variable when running ats so removing test dir alt…
ldowen May 22, 2025
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: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ stages:
- install_production
- update_permissions
- cleanup
- deploy

include:
- project: lc-templates/id_tokens
Expand All @@ -53,3 +54,4 @@ include:
when: never
- when: always
- local: .gitlab/jobs-prod.yml
- local: .gitlab/pages.yml
25 changes: 25 additions & 0 deletions .gitlab/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
create-pages:
extends: [.toss_shell1]
variables:
GIT_SUBMODULE_STRATEGY: normal
stage: deploy
pages:
# The folder that contains the files to be exposed at the Page URL
publish: public
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: '$CI_COMMIT_REF_NAME == "develop"'
when: always
- if: '$CI_COMMIT_MESSAGE =~ /test-deploy/'
when: always
script:
- python3 -m venv $HOME/docsvenv
- source $HOME/docsvenv/bin/activate
- python3 -m pip install --progress-bar off -U pip
- python3 -m pip install --progress-bar off llnl-thicket sphinx sphinx-rtd-theme sphinx-design ipython
- python3 $SCRIPT_DIR/lc/plot_hist_data.py --out-dir time_doc
- python3 -m sphinx -q time_doc/ public/
artifacts:
paths:
- public
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}/tests)
set(SPHERAL_TEST_INSTALL_PREFIX "tests")

include(cmake/SetupSpheral.cmake)

Expand Down
9 changes: 7 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Notable changes include:
- RadialFunctor
* FacetedSurfaceASPHHydro has been removed in favor of providing user filters to the ASPH methods (i.e., the RadialFunctor method).
* Field resizing operations have been removed from the public interface.
* Performance analysis tools are improved.
- Added an "advance" Caliper timer to be used in the future as the default reference timer.
- Added a deploy CI stage to create a GitLab page with the historical performance benchmarks.

* Build changes / improvements:
* Native Spack environments are now being used.
Expand All @@ -45,8 +48,10 @@ Notable changes include:
* ATS submodule is updated to fix bug with latest Flux update on LC systems.
* Update Polytope version.
* TPL manager removes the symoblic links to the install directory.
* Consolidated CMake configured files into SpheralConfigs.py.in
* Deviatoric stress evolution in lower dimensions (1 and 2D) now consistent with other solid hydros
* Consolidated CMake configured files into SpheralConfigs.py.in.
* Deviatoric stress evolution in lower dimensions (1 and 2D) now consistent with other solid hydros.
* Changes the `SPHERAL_TEST_INSTALL_PREFIX` to be relative to `CMAKE_INSTALL_PREFIX/tests` directory.
* Fixed bug where performance tests would incorrectly move a benchmark directory if rerunning failed jobs.

Version v2025.01.0 -- Release date 2025-01-31
==============================================
Expand Down
1 change: 0 additions & 1 deletion cmake/InstallTPLs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ endif()
message("-----------------------------------------------------------------------------")
# TPLs that must be imported
list(APPEND SPHERAL_EXTERN_LIBS boost eigen qhull silo hdf5)
list(APPEND SPHERAL_EXTERN_LIBS boost eigen qhull silo hdf5)

blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS leos IF ENABLE_LEOS)
blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS aneos IF ENABLE_ANEOS)
Expand Down
4 changes: 2 additions & 2 deletions cmake/SetupSpheral.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ endif()
if (ENABLE_TESTS)
add_subdirectory(${SPHERAL_ROOT_DIR}/tests)

spheral_install_python_tests(${SPHERAL_ROOT_DIR}/tests/ ${SPHERAL_TEST_INSTALL_PREFIX})
spheral_install_python_tests(${SPHERAL_ROOT_DIR}/tests/ ${CMAKE_INSTALL_PREFIX}/${SPHERAL_TEST_INSTALL_PREFIX})
# Always install performance.py in the top of the testing script
install(FILES ${SPHERAL_ROOT_DIR}/tests/performance.py
DESTINATION ${CMAKE_INSTALL_PREFIX}/tests)
DESTINATION ${CMAKE_INSTALL_PREFIX}/${SPHERAL_TEST_INSTALL_PREFIX})
endif()

include(${SPHERAL_ROOT_DIR}/cmake/SpheralConfig.cmake)
19 changes: 15 additions & 4 deletions docs/developer/dev/diagnostic_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,22 @@ The general procedure to comparing performance regression tests is:

\delta_{\mathrm{thresh}} = 0.08 \mu + 2 \sigma

If the :math:`t_c - \mu > \delta_{\mathrm{thresh}}` for the ``main`` region, where :math:`t_c` is the new performance time, the test is considered to have failed and the timing tree of the exclusive average time per rank (``Avg time/rank (exc)``) will be displayed.
If the test configurations, like the number of time steps differed between the runs, or the hardware/install configurations did not match, it will consider the test skipped.
Otherwise, the test is considered to have passed.
If the :math:`t_c - \mu < -\delta_{\mathrm{thresh}}`, the performance improved significantly and the timing tree will be displayed.
There are 3 possible outcomes for each test:

- ``FAILED`` if :math:`t_c - \mu > \delta_{\mathrm{thresh}}` for the ``main`` region, where :math:`t_c` is the new performance time. The timing tree of the exclusive average time per rank (``Avg time/rank (exc)``) will be displayed.
- ``SKIPPED`` if test configurations do not match (number of time steps, number of SPH nodes, or hardware/install configurations).
- ``PASSED`` otherwise. Additionally, if :math:`t_c - \mu < -\delta_{\mathrm{thresh}}`, the performance improved significantly and the timing tree will be displayed.

.. note::

If ``performance.py`` is run on a non-MPI Spheral build, it will only use 1 rank and will thread all other available cores.

Historical Timing Benchmarks
----------------------------

After the CI creates performance benchmark data during a merge to the develop branch, a deploy stage is run that creates plots showing the history of the benchmark timers over time.
This page can be accessed by going to the repo page on GitLab (not GitHub), and either:

* Click ``GitLab Pages`` on the right side of the repos home page.

* Click ``Deploy->Pages`` on the left side of the page and select the link in the ``Deployments`` section.
Loading