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

Removing new operator on already allocated memory to test Frontier memory corruption issue. #313

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions host-configs/ORNL/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set(CONFIG_NAME "[email protected]" CACHE PATH "")

# Set up the tpls
set(GEOSX_TPL_ROOT_DIR "/gpfs/alpine/geo127/world-shared/cray-sles15-zen2/cce-13.0.1" CACHE PATH "")
set(GEOSX_TPL_DIR ${GEOSX_TPL_ROOT_DIR} CACHE PATH "")

set(BLT_DIR "${GEOSX_TPL_DIR}/blt-0.4.1-3zz2mkf2wvglevvl4ozepe4tzhwtchoa/" CACHE PATH "" )
set(CAMP_DIR "${GEOSX_TPL_DIR}/camp-0.2.2-3qpdz6h2dzvfm5t7uabpz2ykiheza5b4/" CACHE PATH "" )

set(UMPIRE_DIR "${GEOSX_TPL_DIR}/umpire-6.0.0-aeczo5gctizktwwt5x7xlmuyoarwipag/" CACHE PATH "" )
set(RAJA_DIR "${GEOSX_TPL_DIR}/raja-0.14.0-twro7k3cfsmp7s6mkiugsqncivj6w327/" CACHE PATH "" )
set(CHAI_DIR "${GEOSX_TPL_DIR}/chai-2.4.0-yubforuougga3ujwwpfz3tmybqhroczp/" CACHE PATH "" )

set(METIS_DIR "${GEOSX_TPL_DIR}/metis-5.1.0-zcfkawg5ifqpzcihrc3i6cdrrijusc2p/" CACHE PATH "" )
set(PARMETIS_DIR "${GEOSX_TPL_DIR}/parmetis-4.0.3-t2amifl5hh7yewre24gn2x3mlrz7qkl5/" CACHE PATH "" )

# C++ options
set(CMAKE_C_COMPILER "/opt/cray/pe/craype/2.7.13/bin/cc" CACHE PATH "")
set(CMAKE_CXX_COMPILER "/opt/cray/pe/craype/2.7.13/bin/CC" CACHE PATH "")
set(CMAKE_Fortran_COMPILER "/opt/cray/pe/craype/2.7.13/bin/ftn" CACHE PATH "")

set(CMAKE_CXX_STANDARD 14 CACHE STRING "")

set( ENABLE_MPI ON CACHE BOOL "" FORCE )
set( ENABLE_FIND_MPI ON CACHE BOOL "" FORCE )

# HIP Options
set( ENABLE_HIP ON CACHE BOOL "" FORCE )
set( HIP_ROOT "/opt/rocm-4.5.2" CACHE PATH "" )
set( HIP_VERSION_STRING "4.5.2" CACHE STRING "" )
set( CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "" FORCE )
set( AMDGPU_TARGETS "${CMAKE_HIP_ARCHITECTURES}" CACHE STRING "" FORCE )
#set( CMAKE_CXX_FLAGS "-std=c++14 -D__HIP_ARCH_GFX90A__=1" CACHE STRING "" FORCE )

set( HIP_HIPCC_INCLUDE_ARGS "$<$<BOOL:/opt/cray/pe/mpich/8.1.12/ofi/crayclang/10.0/include>:-I/opt/cray/pe/mpich/8.1.12/ofi/crayclang/10.0/include>" CACHE STRING "" FORCE )
set( HIP_HIPCC_FLAGS "-std=c++14" CACHE STRING "" FORCE )
set( CMAKE_EXE_LINKER_FLAGS "-L/opt/cray/pe/mpich/8.1.12/ofi/crayclang/10.0/lib -lmpi -L/opt/cray/pe/mpich/8.1.12/gtl/lib -lmpi_gtl_hsa" CACHE STRING "" FORCE )

# GTEST options
set(ENABLE_GTEST_DEATH_TESTS OFF CACHE BOOL "")
set(gtest_disable_pthreads ON CACHE BOOL "")
39 changes: 39 additions & 0 deletions host-configs/ORNL/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set(CONFIG_NAME "[email protected]" CACHE PATH "")

# Set up the tpls
set(GEOSX_TPL_ROOT_DIR "/gpfs/alpine/geo127/scratch/tobin6/spack/opt/spack/cray-sles15-zen2/cce-12.0.3" CACHE PATH "")
set(GEOSX_TPL_DIR ${GEOSX_TPL_ROOT_DIR} CACHE PATH "")

set(BLT_DIR "${GEOSX_TPL_DIR}/blt-0.4.1-qpmhf6p7n5sarmks55hgjnzff3ncs7jd/" CACHE PATH "" )
set(CAMP_DIR "${GEOSX_TPL_DIR}/camp-0.2.2-frggdmwjevbxy4a6kw7ctgrhyv7erfhr/" CACHE PATH "" )

set(UMPIRE_DIR "${GEOSX_TPL_DIR}/umpire-6.0.0-nkdetdg5tjyzzf5yjzo32jxwkmwfjjqn/" CACHE PATH "" )
set(RAJA_DIR "${GEOSX_TPL_DIR}/raja-0.14.0-wun25mr5qf7vo6x2vblhzh2ivs7vr4g6/" CACHE PATH "" )
set(CHAI_DIR "${GEOSX_TPL_DIR}/chai-2.4.0-a5ponjo23u7smy7w4a4jj7im47shrsxk/" CACHE PATH "" )

set(METIS_DIR "/sw/spock/spack-envs/base/opt/cray-sles15-zen2/cce-12.0.3/metis-5.1.0-rbblqiymq6eoursordyaq2ghimzpd22v/" CACHE PATH "" )
set(PARMETIS_DIR "/sw/spock/spack-envs/base/opt/cray-sles15-zen2/cce-12.0.3/parmetis-4.0.3-mliemgo6vxrahsz4f6u5agdqyfpk2yd2/" CACHE PATH "" )

# C++ options
#set(CMAKE_C_COMPILER "/opt/cray/pe/cce/12.0.3/bin/craycc" CACHE PATH "")
#set(CMAKE_CXX_COMPILER "/opt/cray/pe/cce/12.0.3/bin/crayCC" CACHE PATH "")
#set(CMAKE_Fortran_COMPILER "/opt/cray/pe/cce/12.0.3/bin/crayftn" CACHE PATH "")

set(CMAKE_C_COMPILER "/opt/cray/pe/craype/2.7.11/bin/cc" CACHE PATH "")
set(CMAKE_CXX_COMPILER "/opt/cray/pe/craype/2.7.11/bin/CC" CACHE PATH "")
set(CMAKE_Fortran_COMPILER "/opt/cray/pe/craype/2.7.11/bin/ftn" CACHE PATH "")

set(CMAKE_CXX_STANDARD 14 CACHE STRING "")

set( ENABLE_MPI ON CACHE BOOL "" FORCE )
set( ENABLE_FIND_MPI OFF CACHE BOOL "" FORCE )

# HIP Options
set( ENABLE_HIP ON CACHE BOOL "" FORCE )
set( HIP_ROOT "/opt/rocm-4.2.0" CACHE PATH "" )
set( HIP_VERSION_STRING "4.2.0" CACHE STRING "" )
set( CMAKE_HIP_ARCHITECTURES "gfx908" CACHE STRING "" FORCE )

# GTEST options
set(ENABLE_GTEST_DEATH_TESTS OFF CACHE BOOL "")
set(gtest_disable_pthreads ON CACHE BOOL "")
7 changes: 6 additions & 1 deletion src/ArrayOfArraysView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,12 @@ class ArrayOfArraysView
typeManipulation::forEachArg(
[sizeOfNextArray, nextOffset, shiftAmount] ( auto & buffer )
{
arrayManipulation::uninitializedShiftDown( &buffer[ nextOffset ], sizeOfNextArray, shiftAmount );
// arrayManipulation::uninitializedShiftDown( &buffer[ nextOffset ], sizeOfNextArray, shiftAmount );
T * const LVARRAY_RESTRICT ptr = &buffer[ nextOffset ];
for (std::ptrdiff_t j = 0; j < sizeOfNextArray; ++j)
{
ptr[j - shiftAmount] = std::move(ptr[j]);
}
}, m_values, buffers ... );

// And update the offsets.
Expand Down
15 changes: 15 additions & 0 deletions src/bufferManipulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ namespace bufferManipulation
*/
HAS_MEMBER_FUNCTION_NO_RTYPE( move, MemorySpace::host, true );


template < typename T >
struct ContainerShim
{
ContainerShim( T * begin, T * end )
: m_begin( begin )
, m_end( end )
{}
T * begin() const { return m_begin; }
T * end() const { return m_end; }
T * m_begin;
T * m_end;
};


/**
* @class VoidBuffer
* @brief This class implements the default behavior for the Buffer methods related
Expand Down