diff --git a/frame/3/gemm/bli_gemm_threading.c b/frame/3/gemm/bli_gemm_threading.c index 3d85c253f..15ef24e36 100644 --- a/frame/3/gemm/bli_gemm_threading.c +++ b/frame/3/gemm/bli_gemm_threading.c @@ -91,6 +91,8 @@ void bli_gemm_thrinfo_free( gemm_thrinfo_t* thread) // Free Communicators if( thread_am_ochief( thread ) ) bli_free_communicator( thread->ocomm ); + if( thread->sub_gemm == NULL && thread_am_ichief( thread ) ) + bli_free_communicator( thread->icomm ); // Free Sub Thrinfos bli_packm_thrinfo_free( thread->opackm ); diff --git a/frame/3/herk/bli_herk_threading.c b/frame/3/herk/bli_herk_threading.c index 8bc3d3e23..0f708a72c 100644 --- a/frame/3/herk/bli_herk_threading.c +++ b/frame/3/herk/bli_herk_threading.c @@ -91,6 +91,8 @@ void bli_herk_thrinfo_free( herk_thrinfo_t* thread) // Free Communicators if( thread_am_ochief( thread ) ) bli_free_communicator( thread->ocomm ); + if( thread->sub_herk == NULL && thread_am_ichief( thread ) ) + bli_free_communicator( thread->icomm ); // Free Sub Thrinfos bli_packm_thrinfo_free( thread->opackm ); diff --git a/frame/3/trmm/bli_trmm_threading.c b/frame/3/trmm/bli_trmm_threading.c index d15a45b0c..084484f04 100644 --- a/frame/3/trmm/bli_trmm_threading.c +++ b/frame/3/trmm/bli_trmm_threading.c @@ -91,6 +91,8 @@ void bli_trmm_thrinfo_free( trmm_thrinfo_t* thread) // Free Communicators if( thread_am_ochief( thread ) ) bli_free_communicator( thread->ocomm ); + if( thread->sub_trmm == NULL && thread_am_ichief( thread ) ) + bli_free_communicator( thread->icomm ); // Free Sub Thrinfos bli_packm_thrinfo_free( thread->opackm ); diff --git a/frame/3/trsm/bli_trsm_threading.c b/frame/3/trsm/bli_trsm_threading.c index 1cfd61ebb..b2935114d 100644 --- a/frame/3/trsm/bli_trsm_threading.c +++ b/frame/3/trsm/bli_trsm_threading.c @@ -91,6 +91,8 @@ void bli_trsm_thrinfo_free( trsm_thrinfo_t* thread) // Free Communicators if( thread_am_ochief( thread ) ) bli_free_communicator( thread->ocomm ); + if( thread->sub_trsm == NULL && thread_am_ichief( thread ) ) + bli_free_communicator( thread->icomm ); // Free Sub Thrinfos bli_packm_thrinfo_free( thread->opackm );