Skip to content

Commit

Permalink
moving functions around
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 6, 2019
1 parent 8cd22e5 commit bc3de41
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
27 changes: 27 additions & 0 deletions src/ncint/ncint_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@
/* The default io system id. */
extern int diosysid;

/* Have we initialized? */
extern int ncint_initialized;

/**
* Same as PIOc_Init_Intracomm().
*
* @author Ed Hartnett
*/
int
nc_init_intracomm(MPI_Comm comp_comm, int num_iotasks, int stride, int base, int rearr,
int *iosysidp)
{
int ret;

if (!ncint_initialized)
NC_NCINT_initialize();

if ((ret = PIOc_Init_Intracomm(comp_comm, num_iotasks, stride, base, rearr,
iosysidp)))
return ret;

/* Remember the io system id. */
diosysid = *iosysidp;

return PIO_NOERR;
}

/**
* Same as PIOc_free_iosystem().
*
Expand Down
24 changes: 0 additions & 24 deletions src/ncint/ncintdispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,30 +113,6 @@ NC_Dispatch NCINT_dispatcher = {

const NC_Dispatch* NCINT_dispatch_table = NULL;

/**
* Same as PIOc_Init_Intracomm().
*
* @author Ed Hartnett
*/
int
nc_init_intracomm(MPI_Comm comp_comm, int num_iotasks, int stride, int base, int rearr,
int *iosysidp)
{
int ret;

if (!ncint_initialized)
NC_NCINT_initialize();

if ((ret = PIOc_Init_Intracomm(comp_comm, num_iotasks, stride, base, rearr,
iosysidp)))
return ret;

/* Remember the io system id. */
diosysid = *iosysidp;

return PIO_NOERR;
}

/**
* @internal Initialize NCINT dispatch layer.
*
Expand Down

0 comments on commit bc3de41

Please sign in to comment.