From af13933823b667a66c37c9715594564ab6187724 Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Tue, 24 Nov 2020 08:41:12 -0800 Subject: [PATCH 1/2] Resize as needed for SF groups --- src/libnnpif/CabanaMD/ElementCabana_impl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libnnpif/CabanaMD/ElementCabana_impl.h b/src/libnnpif/CabanaMD/ElementCabana_impl.h index ba871da36..3feae0507 100644 --- a/src/libnnpif/CabanaMD/ElementCabana_impl.h +++ b/src/libnnpif/CabanaMD/ElementCabana_impl.h @@ -311,7 +311,7 @@ void ElementCabana::setupSymmetryFunctionGroups( t_SF SF, h_t_int h_numSFGperElem, int maxSFperElem ) { - int num_group = h_numSFperElem.extent( 0 ) * 2; + int num_group = h_numSFperElem.extent( 0 ); h_t_int h_numGR( "RadialCounter", num_group ); h_t_int h_numGA( "AngularCounter", num_group ); int SFindex; @@ -366,12 +366,16 @@ void ElementCabana::setupSymmetryFunctionGroups( t_SF SF, if ( SF( attype, SFindex, 1 ) == 2 ) { SFGmemberlist( attype, l, 0 ) = SFindex; + if ( l >= (int)h_numGR.extent( 0 ) ) + Kokkos::resize( h_numGR, l+1 ); h_numGR( l ) = 1; SFGmemberlist( attype, l, maxSFperElem )++; } else if ( SF( attype, SFindex, 1 ) == 3 ) { SFGmemberlist( attype, l, 0 ) = SFindex; + if ( l >= (int)h_numGA.extent( 0 ) ) + Kokkos::resize( h_numGA, l+1 ); h_numGA( l ) = 1; SFGmemberlist( attype, l, maxSFperElem )++; } From 6398e019ef2eb46f17d7e6e525d1af37384fec29 Mon Sep 17 00:00:00 2001 From: Andreas Singraber Date: Tue, 24 Nov 2020 23:47:40 +0100 Subject: [PATCH 2/2] Bugfix leads to new patch version v2.0.2 --- src/libnnp/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnnp/version.h b/src/libnnp/version.h index 54dfa681b..cd565d5c8 100644 --- a/src/libnnp/version.h +++ b/src/libnnp/version.h @@ -17,7 +17,7 @@ #ifndef VERSION_H #define VERSION_H -#define NNP_VERSION "2.0.0" +#define NNP_VERSION "2.0.2" #define NNP_GIT_REV "" #define NNP_GIT_REV_SHORT "" #define NNP_GIT_BRANCH ""