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

Updated LvArray and added [email protected] host config. #1003

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

corbett5
Copy link
Contributor


// For some reason this needs to be defined when using cuda
#if defined( __CUDACC__)
#define KOKKOS_ENABLE_SERIAL_ATOMICS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the issue I was having with Trilinos and cuda.

@corbett5
Copy link
Contributor Author

Now passing the travis tests, only the submodule check fails.

@@ -144,15 +144,15 @@ using ViewTypeConst = typename LvArray::GetViewTypeConst< T >::type &;

/// True if T is or inherits from std::string.
template< typename T >
constexpr bool is_string = std::is_base_of_v< std::string, T >;
constexpr bool is_string = std::is_base_of< std::string, T >::value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this really not in clang10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I had it in LvArray, but I thought it's probably best to take it out.

src/coreComponents/common/GeosxMacros.hpp Show resolved Hide resolved
@@ -1334,7 +1330,14 @@ void SiloFile::WriteElementRegionSilo( ElementRegionBase const & elemRegion,
sourceWrapper = Wrapper< arrayType >::cast( *(viewPointers[esr][fieldName]));
typename arrayType::ViewTypeConst const & sourceArray = sourceWrapper.reference();

targetArray.copy( counter, sourceArray );
localIndex const offset = counter * targetArray.strides()[ 0 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a behavioral change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I just thought it's probably best if this function wasn't in LvArray::ArraySlice. As implemented I don't think it would work for permuted arrays and this was the only place it was called from.

m_elementSubRegionIndices.appendArray( elementSubRegionIndices, numPts );
m_elementIndices.appendArray( elementIndices, numPts );
m_weights.appendArray( weights, numPts );
m_elementRegionIndices.appendArray( elementRegionIndices, elementRegionIndices + numPts );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the function change or is this a behavioral change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appendArray now takes iterators instead of a pointer and a size.

@@ -121,7 +121,6 @@ void GMRESsolver< VECTOR >::solve( Vector const & b,

// Create upper Hessenberg matrix
array2d< real64, MatrixLayout::COL_MAJOR_PERM > H( m_maxRestart + 1, m_maxRestart );
H = 0.0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these always initialized to zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elements in an LvArray::Array or an LvArray class are initialized with T() when resizing (or creating) unless you call resizeWithoutInitializationOrDestruction(). For numeric types T() is 0.

@corbett5 corbett5 force-pushed the feature/corbett/lvarray-update branch from d084753 to 9b23b2e Compare June 19, 2020 02:26
@corbett5 corbett5 force-pushed the feature/corbett/lvarray-update branch from 9b23b2e to 0eff133 Compare June 19, 2020 04:16
@corbett5 corbett5 merged commit 01e4fe4 into develop Jun 19, 2020
@corbett5 corbett5 deleted the feature/corbett/lvarray-update branch June 19, 2020 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants