Skip to content

Commit

Permalink
better handling of netcdf integration in C lirbary
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 12, 2019
1 parent e3d1a21 commit 2469a2b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/clib/pioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#ifdef NETCDF_INTEGRATION
#include "ncintdispatch.h"
#endif /* NETCDF_INTEGRATION */

#ifdef USE_MPE
/* The event numbers for MPE logging. */
extern int event_num[2][NUM_EVENTS];
#endif /* USE_MPE */

#ifdef NETCDF_INTEGRATION
/* Have we initialized? */
extern int ncint_initialized;
#endif /* NETCDF_INTEGRATION */

/**
* @defgroup PIO_init_c Initialize the IO System
* Initialize the IOSystem, including specifying number of IO and
Expand Down Expand Up @@ -934,6 +942,13 @@ PIOc_Init_Intracomm(MPI_Comm comp_comm, int num_iotasks, int stride, int base,
if ((ret = pio_init_logging()))
return pio_err(NULL, NULL, ret, __FILE__, __LINE__);

#ifdef NETCDF_INTEGRATION
PLOG((1, "Initializing netcdf integration"));
/* Initialize netCDF integration layer if we need to. */
if (!ncint_initialized)
PIO_NCINT_initialize();
#endif /* NETCDF_INTEGRATION */

#ifdef USE_MPE
pio_start_mpe_log(INIT);
#endif /* USE_MPE */
Expand Down

0 comments on commit 2469a2b

Please sign in to comment.