Skip to content

Commit 97309b1

Browse files
authored
Merge pull request #422 from uiuc-hpc/fix/comm_es_tls
comm: set parsec_tls_execution_stream in comm thread
2 parents d2535c4 + f42ab4c commit 97309b1

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

parsec/parsec.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,3 +2891,8 @@ parsec_execution_stream_t *parsec_my_execution_stream(void)
28912891
{
28922892
return (parsec_execution_stream_t*)PARSEC_TLS_GET_SPECIFIC(parsec_tls_execution_stream);
28932893
}
2894+
2895+
void parsec_set_my_execution_stream(parsec_execution_stream_t *es)
2896+
{
2897+
PARSEC_TLS_SET_SPECIFIC(parsec_tls_execution_stream, es);
2898+
}

parsec/parsec_internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,9 @@ parsec_release_local_OUT_dependencies(parsec_execution_stream_t* es,
656656
parsec_data_copy_t* target_dc,
657657
data_repo_entry_t* target_repo_entry);
658658

659+
/* Set internal TLS variable parsec_tls_execution_stream */
660+
void parsec_set_my_execution_stream(parsec_execution_stream_t *es);
661+
659662
#define parsec_execution_context_priority_comparator offsetof(parsec_task_t, priority)
660663

661664
#if defined(PARSEC_SIM)

parsec/remote_dep_mpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ remote_dep_mpi_initialize_execution_stream(parsec_context_t *context)
473473
memcpy(&parsec_comm_es, context->virtual_processes[0]->execution_streams[0],
474474
sizeof(parsec_execution_stream_t));
475475
parsec_comm_es.next_task = (parsec_task_t*)0xdeadbeef; /* should not be NULL, but it should also never be used */
476+
parsec_set_my_execution_stream(&parsec_comm_es);
476477
}
477478

478479
void* remote_dep_dequeue_main(parsec_context_t* context)

0 commit comments

Comments
 (0)