-
Notifications
You must be signed in to change notification settings - Fork 440
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
Kokkos Threads Backend impl_shared_alloc Broken on Intel 16.1 (Shepard Haswell) #186
Comments
Looking into it |
This is the first step in addressing issue #186 by fixing a segfault error in the error reporting mechanism. I believe that the test itself is not supposed to enter the error reporting mechanism, so something else probably went wrong before.
I fixed the actual crash, but the underlying reason for the crash is unexpected (incorrect) behaviour. So the test still fails. |
Tracked this down to the static initialization of the root SharedAllocRecord. constexpr SharedAllocationRecord()
: m_alloc_ptr( 0 )
, m_alloc_size( 0 )
, m_dealloc( 0 )
, m_root( this )
, m_prev( this )
, m_next( this )
, m_count( 0 )
{} Possible workaround: do a dynamic initialization in the HostSpace constructors protected by some static variable to make sure its only done ones. For example in the HostSpace default constructor: static int check = 0;
Experimental::Impl::SharedAllocationRecord< void , void >* r = &Experimental::Impl::SharedAllocationRecord< Kokkos::HostSpace , void >::s_root_record;
if(check==0) {
r->m_root=r;
r->m_next=r;
r->m_prev=r;
check=1;
} |
For the record: this is a SHA with the issue: 261a546 |
…cord confused the Intel/16 optimizer, leading to incorrect initialization. Removed the qualifier to fix issu3 #186.
The use of 'this' in a function other than use as a postfix-expression is not permitted within a constrant expression (C++11 spec P5.19). The result is undefined (i.e., implementation defined) and thus non-portable. Removing the 'constexpr' qualifier on the constructor. |
Pushed to master and trilinos |
Doing standard test in develop branch on Shepard with Intel 16.1 compiler.
Backtrace Information:
The text was updated successfully, but these errors were encountered: