Skip to content

Commit

Permalink
Merge branch 'ejh_async2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed May 27, 2016
2 parents 24a34ff + 696d403 commit eecde10
Show file tree
Hide file tree
Showing 16 changed files with 8,398 additions and 13,783 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,28 @@ mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
#===== Library Options =====
option (PIO_ENABLE_FORTRAN "Enable the Fortran library builds" ON)
option (PIO_ENABLE_TIMING "Enable the use of the GPTL timing library" ON)
option (PIO_ENABLE_ASYNC "Enable the use of asychronus IO operations" OFF)
option (PIO_ENABLE_LOGGING "Enable debug logging (large output possible)" OFF)
option (PIO_TEST_BIG_ENDIAN "Enable test to see if machine is big endian" ON)
option (PIO_USE_MPIIO "Enable support for MPI-IO auto detect" ON)
option (PIO_USE_MPISERIAL "Enable mpi-serial support (instead of MPI)" OFF)
option (PIO_USE_MALLOC "Use native malloc (instead of bget package)" OFF)
option (WITH_PNETCDF "Require the use of PnetCDF" ON)

# Set a variable that appears in the config.h.in file.
if(PIO_USE_MALLOC)
set(USE_MALLOC 1)
else()
set(USE_MALLOC 0)
endif()

# Set a variable that appears in the config.h.in file.
if(PIO_ENABLE_LOGGING)
set(ENABLE_LOGGING 1)
else()
set(ENABLE_LOGGING 0)
endif()

#===== Library Variables =====
set (PIO_FILESYSTEM_HINTS IGNORE CACHE STRING "Filesystem hints (lustre or gpfs)")

Expand Down
21 changes: 12 additions & 9 deletions src/clib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ set (PIO_C_SRCS topology.c
pio_spmd.c
pio_rearrange.c
pio_darray.c
pio_nc4.c
bget.c)

set (PIO_GENNC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/pio_nc.c
${CMAKE_CURRENT_BINARY_DIR}/pio_nc4.c
${CMAKE_CURRENT_BINARY_DIR}/pio_put_nc.c
${CMAKE_CURRENT_BINARY_DIR}/pio_get_nc.c)
set (PIO_GENNC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/pio_put_nc.c
${CMAKE_CURRENT_BINARY_DIR}/pio_get_nc.c
${CMAKE_CURRENT_BINARY_DIR}/pio_nc.c)

add_library (pioc ${PIO_C_SRCS} ${PIO_GENNC_SRCS})
if (PIO_ENABLE_ASYNC)
set (PIO_ADDL_SRCS pio_nc_async.c pio_put_nc_async.c pio_get_nc_async.c pio_msg.c pio_varm.c)
else ()
set (PIO_ADDL_SRCS ${PIO_GENNC_SRCS})
endif ()

add_library (pioc ${PIO_C_SRCS} ${PIO_ADDL_SRCS})

# set up include-directories
include_directories(
Expand Down Expand Up @@ -196,12 +202,9 @@ else ()
pio_get_nc.c
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/pio_nc.c
pio_nc.c
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/pio_nc4.c
pio_nc4.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pio_put_nc.c
${CMAKE_CURRENT_SOURCE_DIR}/pio_get_nc.c
${CMAKE_CURRENT_SOURCE_DIR}/pio_nc.c
${CMAKE_CURRENT_SOURCE_DIR}/pio_nc4.c)
${CMAKE_CURRENT_SOURCE_DIR}/pio_nc.c)
endif ()


Expand Down
3 changes: 3 additions & 0 deletions src/clib/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
* will use the included bget() package for memory management. */
#define PIO_USE_MALLOC @USE_MALLOC@

/** Set to non-zero to turn on logging. Output may be large. */
#define PIO_ENABLE_LOGGING @ENABLE_LOGGING@

#endif /* _PIO_CONFIG_ */
19 changes: 15 additions & 4 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ typedef struct file_desc_t
int mode;
struct wmulti_buffer buffer;
struct file_desc_t *next;

/** True if this task should participate in IO (only true for one
* task with netcdf serial files. */
int do_io;
} file_desc_t;

/**
Expand Down Expand Up @@ -409,8 +413,8 @@ int PIOc_inq_varnatts (int ncid, int varid, int *nattsp);
int PIOc_def_var (int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp);
int PIOc_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
int deflate_level);
int PIOc_inq_var_deflate(int ncid, int varid, int *shufflep,
int *deflatep, int *deflate_levelp);
int PIOc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep,
int *deflate_levelp);
int PIOc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp);
int PIOc_def_var_chunking(int ncid, int varid, int storage, const PIO_Offset *chunksizesp);
int PIOc_inq_var_chunking(int ncid, int varid, int *storagep, PIO_Offset *chunksizesp);
Expand Down Expand Up @@ -481,6 +485,8 @@ int PIOc_InitDecomp(const int iosysid, const int basetype,const int ndims, const
int PIOc_Init_Intracomm(const MPI_Comm comp_comm,
const int num_iotasks, const int stride,
const int base, const int rearr, int *iosysidp);
int PIOc_Init_Intercomm(int component_count, MPI_Comm peer_comm, MPI_Comm *comp_comms,
MPI_Comm io_comm, int *iosysidp);
int PIOc_closefile(int ncid);
int PIOc_createfile(const int iosysid, int *ncidp, int *iotype,
const char *fname, const int mode);
Expand Down Expand Up @@ -586,10 +592,11 @@ int PIOc_set_blocksize(const int newblocksize);
int PIOc_put_vars_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const long long *op);
int PIOc_put_vara_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const double *op);
int PIOc_put_vars (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const void *buf, PIO_Offset bufcount, MPI_Datatype buftype);
int PIOc_put_vars_tc(int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], nc_type xtype, const void *buf);
int PIOc_put_var_uchar (int ncid, int varid, const unsigned char *op);
int PIOc_put_var_long (int ncid, int varid, const long *op);
int PIOc_put_varm_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const long long *op);
int PIOc_get_vara_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], int *buf);
int PIOc_get_vara_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], int *buf);
int PIOc_get_var1_float (int ncid, int varid, const PIO_Offset index[], float *buf);
int PIOc_get_var1_short (int ncid, int varid, const PIO_Offset index[], short *buf);
int PIOc_get_vars_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], int *buf);
Expand Down Expand Up @@ -641,11 +648,15 @@ int PIOc_set_blocksize(const int newblocksize);
int PIOc_get_vars_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], char *buf);
int PIOc_get_var1_uchar (int ncid, int varid, const PIO_Offset index[], unsigned char *buf);
int PIOc_get_vars (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], void *buf, PIO_Offset bufcount, MPI_Datatype buftype);
int PIOc_get_vars_tc(int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], nc_type xtype, void *buf);
int PIOc_get_varm_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], short *buf);
int PIOc_get_varm_ulonglong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], unsigned long long *buf);
int PIOc_get_var_schar (int ncid, int varid, signed char *buf);
int PIOc_iotype_available(const int iotype);

int PIOc_set_log_level(int level);
int PIOc_put_att(int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const void *op);
int PIOc_get_att(int ncid, int varid, const char *name, void *ip);
int PIOc_inq_type(int ncid, nc_type xtype, char *name, PIO_Offset *sizep);
#if defined(__cplusplus)
}
#endif
Expand Down
Loading

0 comments on commit eecde10

Please sign in to comment.