Skip to content

Commit

Permalink
init thread for heap preinit
Browse files Browse the repository at this point in the history
  • Loading branch information
wrrobin committed Oct 23, 2023
1 parent a645139 commit bb6b457
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions mpp/shmemx_c_func.h4
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_pcntr_get_all(shmem_ctx_t ctx, shme
/* Separate initializers */
SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_heap_create(void *base, size_t size, int device_type, int device_index);
SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_heap_preinit();
SHMEM_FUNCTION_ATTRIBUTES int SHPRE()shmemx_heap_preinit_thread(int requested, int *provided);
SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmemx_heap_postinit();
13 changes: 13 additions & 0 deletions src/init_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ shmem_init_thread(int tl_requested, int *tl_provided)
}


int SHMEM_FUNCTION_ATTRIBUTES
shmemx_heap_preinit_thread(int tl_requested, int *tl_provided)
{
int ret;
if (shmem_internal_initialized) {
RAISE_ERROR_STR("attempt to reinitialize library");
}

ret = shmem_internal_heap_preinit(tl_requested, tl_provided);
return ret;
}


void SHMEM_FUNCTION_ATTRIBUTES
shmem_query_thread(int *provided)
{
Expand Down

0 comments on commit bb6b457

Please sign in to comment.