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

v3.6.0 #669

Merged
merged 55 commits into from
Sep 26, 2024
Merged

v3.6.0 #669

merged 55 commits into from
Sep 26, 2024

Conversation

K20shores
Copy link
Collaborator

No description provided.

sjsprecious and others added 30 commits June 28, 2024 09:19
* add sync functions to state variable
add cuda rosenbrock tests

* fix all the compilation errors
analytical tests do not work for CUDA rosenbrock

* fix call to the base class function;
bug fix for CuLudecompose and add
singularity check

* fix the compilation error for CUDA decomposition class

* remove unnecessary calls to the base class functions

* fix all the compilation errors

* add crtp to allow calls to function from either base or derived class

* fix more compilation errors about abstract rosenbrock solver
now the cuda test passes for Troe case

* add lambda functions as arguments for CPU/JIT/CUDA tests

* initialize Yerror on the GPU every time and pass all the analytical
tests

* turn off the cuda memory check for the integration tests

* revert back to the original process class

* clean up unused header

* update JIT test interface

* extend state class to cudastate class

* remove unnecessary cuda device sync

* add cuda state class and address compilation errors

* fix broken CI tests

* more bug fix for CI tests

* fix the compiler warning for cuda code

* more fix for broken CI tests

* resolve the cuda compiler warnings

* address Matt's PR comments

---------

Co-authored-by: Jian Sun <sunjian@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* removing condensing x and b in nonvectorizable matrix code for linear solve

* adding alias back

* adding back comment

* spacing

* adding back comment

* moving comment

* vectorize version no longer segfaults but something is wrong

* vectorized passes

* removing b from jit linear solver

* removing b from cuda linear solver

* usin function pointer alias

* adding a comment

* fix conflict resolve typo

---------

Co-authored-by: Jian Sun <sjsprecious@gmail.com>
Co-authored-by: Jian Sun <sunjian@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
…582)

* trying to continue on with current solution

* mimicing camchem

* testing backward euler against hires, e5

* updating citations

* oregonator is too stiff for backward euler

* addressing PR comments

* collecting solver stats

* Update include/micm/solver/backward_euler.inl

Co-authored-by: Matt Dawson <mattdawson@ucar.edu>

* removing backward euler for oregonator test

* removing cerr in favor of a solver state

---------

Co-authored-by: Matt Dawson <mattdawson@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* reorganizing files

* correcting cuda imports
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
…e analytical policy tests (#593)

Converts HIRES, Oregonator, E5 to chemical equations so that they can be tested on the GPU

All analytical tests are tested with CPU and GPU rosenbrock. Backward euler as well (except oregonator). Renaming to match naming schemes for test files
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* fix most GPU memory leak

* allocate a device pointer in the device struct

* remove unused cuda mem copy

* use swap in the move constructor and assignment of CUDA class
initialize the null pointer in the struct definition
pass the cuda memory check for all the unit tests

* remove unnecessary nullptr

* fix the broken CI tests

* more bug fixes

---------

Co-authored-by: Jian Sun <sunjian@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* starting to test all solver parameter types

* saving progress

* saving progress

* testing all stages analytically

* updating all interfaces

* correcting cuda build I hope

* testing jit against hires, e5, oregonator

* adding cuda solver builder test

* removing hires, e5, oregonator from cuda tests; they need their own kernels

* testing e5 from a configuration

* testing e5 jit integration

* testing e5 properly

* removing reset of L and U matrices (#594)

* oregonator from a configuration

* renaming things

* using different tolerances?

* moving state onto and off of host

* saving gpu changes

* updating cuda tests

* adding some better tolerances for cuda tests

* adding different tolerances for e5

* adding citation to e5

* thing

* formed hires equations

* using passing tolerances for cpu tests

* jit tolerances

* backward euler tests

* configuration for hires

* add AddToDiagonal function on sparse matrix

* use ForEach in Backward Euler

* add convergence check function to backward euler

* fix merge problems

* add vector matrix to analytical solver tests

* update JIT analytical tests

* set up general use analytical test function

* add general function for stiff analytical tests

* fix jit analytical tests

* update remaining analytical tests

* address review comments

* update cuda analytical tests

* update tolerances for cuda analytical tests

---------

Co-authored-by: Kyle Shores <kyle.shores44@gmail.com>
Co-authored-by: Kyle Shores <kshores@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
#603)

Add tests to check for singularity in the U matrix after the LU decomposition. If the check for singularity flag is turned on, decrease the timestep and try again. Fixes a bug where a zero in the bottom right of the U matrix would not have been detected
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
return the process_ member

Co-authored-by: Jian Sun <sunjian@ucar.edu>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
add missing cuda tests and fix broken path
* throwing error on mismatched size

* using a copy of the paramteres so that a builder can be repeatedly used

* adding const

* correcting number of tolerances for robertson
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
using the species map to grab the exact same species for reactants and products
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* correcting solver builder constructor

* fix a bug

---------

Co-authored-by: Jiwon Gim <jiwongim@ucar.edu>
)

relax the criteria to pass the GPU test with nvhpc/24.7 on Derecho
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* update the fill function for cuda matrix to avoid data transfer

* fix compilation errors

* add a comment about template function

* update fill function for cuda sparse matrix

* remove gcc11 CI test and add gcc14 CI test
github-actions bot and others added 25 commits August 21, 2024 14:45
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
…A functions (#630)

* remove data transfer in the cuda dense matrix constructor

* template many cuda functions for cuda dense and sparse matrix
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
…DA matrix (#636)

* test to remove forcing variables

* fix broken unit tests

* fix the bug of calculating forcing term when substepping happens

* update the copy assignment operator for CUDA matrix

* fix the broken unit tests again
remove local copy of state in solver functions
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* add the functions to create & get cuda stream

* simplify the CUDA dense matrix destructor

* add cuda stream to cuda matrix functions

* add cuda stream to process_set.cu

* add cuda stream to CudaLuDecomposition

* add cuda stream to CudaLinearSolver

* set cuda stream in the cublas handle
add cuda stream to rosenbrock.cu

* switch to singleton class for cuda stream manager

* update the method to get the cuda stream

* revise the Gtest main function to cleanup the CUDA resources explicitly

* fix broken cuda analytical test

* fix GPU memory leak in the unit test

* clean up unused files

* fix Kyle's review comment

* make cudamemset asynchronous
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
…646)

remove the local copy of jaocbian matrix in the LinFactor function
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
add const to solver functions
* reaplce

* json to yaml

* yamle to JSON

* test

* added .string to yaml file

* added string to loadFile

* changes based on the PR. modified the code to use YAML file
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
add const qualifiers
…ck (#652)

* added error outside of the loop

* moved the code to all the way to outer while loop
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* add temporary variables in the solver class

* declare temporary variable in the State class; initialize temporary variable in the solver

* fix broken units test build

* rename base class for temporary variables

* make destructor of base class virtual so that the GPU memory is freed correctly

* remove unnecessary data member from the solver class

* add the copy assignment and constructor for the state class

* add JIT rosenbrock parameter type

* maybe this fixes the broken JIT tests

* try is_convertible instead
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* use cuda rosenbrock parameters instead

* use 0 for fill function
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
* add back the getnumberofreactions function

* update cuda thread count to 512
* pushing

* pushing fix

* removing unneccesary logic check

* adding cuda stuff

* lowering tolerance

* lowering tolerance

* modified jit ludecomp

* raising tolerance

* testing jit and cuda properly

* raising tolerance

* raising again

* again

* raising again

* lowering tolerance

* adding prints to matrices

* copy LU to host

* printing A

* sparsity

* bernoulli again

* manual engine

* double

* thing

* printing values

* larger matrix

* 2 cells

* now

* dense

* 20

* 4000

* things

* uncomment

* uncomment

* print

* 9

* 8

* 6

* 5

* 2e-6

* lu decomp

* 10

* 8

* 0

* comment

* checking

* uncomment

* 7

* 1

* 10

* print

* print

* again

* 100

* data check

* remove check results

* 13

* 16

* eq

* equal

* uncomment

* 1 block

* 5

* print

* 1

* testing LU decomp specifically

* trying to correct cuda test

* lowering

* lowering tolerance

* lowering again

* thing

* variable

* all tests pass on derecho

* setting values to zero for lu decomp

* defaulting LU to 0 instead of 1e-30

* copying block values to other blocks

* removing small value initialization

* correcting version copyright

* using absolute error

* making index once

* camel case
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
@K20shores K20shores merged commit cac62bc into release Sep 26, 2024
58 checks passed
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.07724% with 14 lines in your changes missing coverage. Please review.

Project coverage is 93.33%. Comparing base (1787346) to head (c756a3d).
Report is 55 commits behind head on release.

Files with missing lines Patch % Lines
include/micm/configure/solver_config.hpp 95.93% 7 Missing ⚠️
include/micm/solver/backward_euler.inl 96.92% 2 Missing ⚠️
include/micm/jit/solver/jit_linear_solver.inl 93.75% 1 Missing ⚠️
include/micm/jit/solver/jit_lu_decomposition.inl 95.65% 1 Missing ⚠️
include/micm/jit/solver/jit_rosenbrock.hpp 80.00% 1 Missing ⚠️
include/micm/solver/solver.hpp 87.50% 1 Missing ⚠️
include/micm/solver/solver_result.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           release     #669      +/-   ##
===========================================
+ Coverage    92.89%   93.33%   +0.44%     
===========================================
  Files           49       53       +4     
  Lines         3477     3603     +126     
===========================================
+ Hits          3230     3363     +133     
+ Misses         247      240       -7     
Flag Coverage Δ
93.33% <97.07%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants