From bc3de414fee97260583f2df8b706d2ee1d06fd6e Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Sat, 6 Jul 2019 06:09:07 -0600 Subject: [PATCH] moving functions around --- src/ncint/ncint_pio.c | 27 +++++++++++++++++++++++++++ src/ncint/ncintdispatch.c | 24 ------------------------ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/ncint/ncint_pio.c b/src/ncint/ncint_pio.c index e99ff43966e..b59fb821a70 100644 --- a/src/ncint/ncint_pio.c +++ b/src/ncint/ncint_pio.c @@ -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(). * diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index 5ad4018adc5..0eac5c0e352 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -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. *