Commit 7fa9d999 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

merged branch cdi-pio to trunk cdi

parents 0e1c04e0 01dda077
......@@ -231,6 +231,8 @@ src/pio.c -text
src/pio.h -text
src/pio_cdf_int.c -text
src/pio_cdf_int.h -text
src/pio_client.c -text
src/pio_client.h -text
src/pio_comm.c -text
src/pio_comm.h -text
src/pio_dbuffer.c -text
......@@ -323,6 +325,7 @@ tests/Makefile.in -text
tests/cksum.c -text
tests/cksum.h -text
tests/cksum_read.c -text
tests/cksum_verify.c -text
tests/cksum_write.c -text
tests/cksum_write_chunk.c -text
tests/ensure_array_size.c -text
......
......@@ -3,6 +3,10 @@
* Version 1.6.2 released
* using CGRIBEX library version 1.6.2
2013-11-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* merged branch cdi-pio to trunk cdi
2013-10-22 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Added support for netCDF CF time attribute: climatology [Feature #4092]
......@@ -60,7 +64,7 @@
2013-07-15 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Version 1.6.1.1 released (merged branche cdi-pio to trunk cdi)
* Version 1.6.1.1 released (merged branch cdi-pio to trunk cdi)
2013-07-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
......@@ -149,6 +149,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......
......@@ -123,6 +123,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......
......@@ -26,7 +26,7 @@ case "${HOSTNAME}" in
export MP_PROCS=1
export MP_HOSTFILE="${cwd}/hostfile"
hostname >"$MP_HOSTFILE"
export PKG_CONFIG_PATH="/sw/aix61/yaxt-0.1.4-64bit/lib/pkgconfig:/sw/aix61/ppm-1.0.1-64bit-xl-pe-noomp/lib/pkgconfig:${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="/sw/aix61/yaxt-0.1.5-64bit/lib/pkgconfig:/sw/aix61/ppm-1.0.2-64bit-xl-pe-noomp/lib/pkgconfig:${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}"
OPTFLAGS='-O3 -qarch=pwr6 -qtune=pwr6'
export CONFIG_SHELL=/bin/bash
# add shared library wrappers to PATH
......
......@@ -616,6 +616,13 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
BUILD_F77
BUILD_FC
BUILD_CXX
BUILD_CC
BUILD_LDFLAGS
BUILD_FCFLAGS
BUILD_CFLAGS
USE_FC_FALSE
USE_FC_TRUE
CREATE_INTERFACES_FALSE
......@@ -878,7 +885,14 @@ YAXT_CFLAGS
YAXT_LIBS
PPM_CORE_CFLAGS
PPM_CORE_LIBS
FCMODEXT'
FCMODEXT
BUILD_CFLAGS
BUILD_FCFLAGS
BUILD_LDFLAGS
BUILD_CC
BUILD_CXX
BUILD_FC
BUILD_F77'
 
 
# Initialize some variables set by options.
......@@ -1592,6 +1606,20 @@ Some influential environment variables:
PPM_CORE_LIBS
linker flags for PPM_CORE, overriding pkg-config
FCMODEXT file extension of compiled Fortran module files
BUILD_CFLAGS
append to CFLAGS during build but not in configure phase
BUILD_FCFLAGS
append to FCFLAGS during build but not in configure phase
BUILD_LDFLAGS
append to LDFLAGS during build but not in configure phase
BUILD_CC replace CC with expansion of $BUILD_CC during build but not in
configure phase
BUILD_CXX replace CXX with expansion of $BUILD_CXX during build but not in
configure phase
BUILD_FC replace FC with expansion of $BUILD_FC during build but not in
configure phase
BUILD_F77 replace F77 with expansion of $BUILD_F77 during build but not in
configure phase
 
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
......@@ -26857,7 +26885,7 @@ $as_echo_n "checking for flag to alter module search path... " >&6; }
if ${acx_sl_cv_fc_mod_path_flag_fc+:} false; then :
$as_echo_n "(cached) " >&6
else
mkdir conftestdir
mkdir conftestdir
cd conftestdir
cat > conftest.$ac_ext <<_ACEOF
module cnftst
......@@ -27291,6 +27319,22 @@ fi
 
 
 
# Checks for compiler
COMPILER="$CC $CFLAGS"
 
......@@ -27473,6 +27517,13 @@ if test -z "${USE_FC_TRUE}" && test -z "${USE_FC_FALSE}"; then
as_fn_error $? "conditional \"USE_FC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
CFLAGS="$CFLAGS${BUILD_CFLAGS+ $BUILD_CFLAGS}"
FCFLAGS="$FCFLAGS${BUILD_FCFLAGS+ $BUILD_FCFLAGS}"
LDFLAGS="$LDFLAGS${BUILD_LDFLAGS+ $BUILD_LDFLAGS}"
CC="${BUILD_CC-$CC}"
CXX="${BUILD_CXX-$CXX}"
FC="${BUILD_FC-$FC}"
F77="${BUILD_F77-$F77}"
 
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
......
......@@ -279,6 +279,29 @@ AM_CONDITIONAL([USE_FC],[test -n "$FC" && test "X$FC" != "Xno" && test x$acx_cv_
AC_SUBST([CPPFLAGS])
AC_ARG_VAR([BUILD_CFLAGS],
[append to CFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([CFLAGS="$CFLAGS${BUILD_CFLAGS+ $BUILD_CFLAGS}"])
AC_ARG_VAR([BUILD_FCFLAGS],
[append to FCFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([FCFLAGS="$FCFLAGS${BUILD_FCFLAGS+ $BUILD_FCFLAGS}"])
AC_ARG_VAR([BUILD_LDFLAGS],
[append to LDFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([LDFLAGS="$LDFLAGS${BUILD_LDFLAGS+ $BUILD_LDFLAGS}"])
AC_ARG_VAR([BUILD_CC],
[replace CC with expansion of $BUILD_CC during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([CC="${BUILD_CC-$CC}"])
AC_ARG_VAR([BUILD_CXX],
[replace CXX with expansion of $BUILD_CXX during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([CXX="${BUILD_CXX-$CXX}"])
AC_ARG_VAR([BUILD_FC],
[replace FC with expansion of $BUILD_FC during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([FC="${BUILD_FC-$FC}"])
AC_ARG_VAR([BUILD_F77],
[replace F77 with expansion of $BUILD_F77 during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([F77="${BUILD_F77-$F77}"])
# Checks for compiler
COMPILER="$CC $CFLAGS"
AC_DEFINE_UNQUOTED(COMPILER, ["$COMPILER"], [Compiler])
......
......@@ -4,6 +4,15 @@
This appendix provide a brief listing of the C language bindings of the
CDI library routines:
\section*{\tt \htmlref{cdiClearAdditionalKeys}{cdiClearAdditionalKeys}}
\begin{verbatim}
void cdiClearAdditionalKeys ();
\end{verbatim}
Clear the list of additional GRIB keys..
\section*{\tt \htmlref{cdiDefAdditionalKey}{cdiDefAdditionalKey}}
\begin{verbatim}
......@@ -757,7 +766,7 @@ Copy some entries of a variable list.
\section*{\tt \htmlref{vlistCreate}{vlistCreate}}
\begin{verbatim}
int vlistCreate (
int vlistCreate ();
\end{verbatim}
Create a variable list.
......
......@@ -4,6 +4,15 @@
This appendix provide a brief listing of the Fortran language bindings of the
CDI library routines:
\section*{\tt \htmlref{cdiClearAdditionalKeys}{cdiClearAdditionalKeys}}
\begin{verbatim}
SUBROUTINE cdiClearAdditionalKeys
\end{verbatim}
Clear the list of additional GRIB keys..
\section*{\tt \htmlref{cdiDefAdditionalKey}{cdiDefAdditionalKey}}
\begin{verbatim}
......@@ -759,7 +768,7 @@ Copy some entries of a variable list.
\section*{\tt \htmlref{vlistCreate}{vlistCreate}}
\begin{verbatim}
INTEGER FUNCTION vlistCreate (
INTEGER FUNCTION vlistCreate
\end{verbatim}
Create a variable list.
......
......@@ -37,4 +37,12 @@ cdi_read_LDFLAGS = -all-static
cdi_copy_LDFLAGS = -all-static
cdi_read_f2003_LDFLAGS = -all-static
cdi_write_f2003_LDFLAGS = -all-static
cdi_read_f2003_LDFLAGS = -all-static
cdi_write_f2003_LDFLAGS = -all-static
endif
cdi_read_f2003_SOURCES = cdi_read_f2003.f90
cdi_read_f2003_LDADD = $(top_builddir)/src/libcdi.la $(top_builddir)/src/mo_cdi.o
cdi_write_f2003_SOURCES = cdi_write_f2003.f90
cdi_write_f2003_LDADD = $(top_builddir)/src/libcdi.la $(top_builddir)/src/mo_cdi.o
......@@ -161,6 +161,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......@@ -359,10 +366,8 @@ cdi_read_LDADD = $(top_builddir)/src/libcdi.la
#
cdi_copy_SOURCES = cdi_copy.c
cdi_copy_LDADD = $(top_builddir)/src/libcdi.la
#
cdi_read_f2003_SOURCES = cdi_read_f2003.f90
cdi_read_f2003_LDADD = $(top_builddir)/src/libcdi.la $(top_builddir)/src/mo_cdi.o
#
cdi_write_f2003_SOURCES = cdi_write_f2003.f90
cdi_write_f2003_LDADD = $(top_builddir)/src/libcdi.la $(top_builddir)/src/mo_cdi.o
#
......
......@@ -136,6 +136,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......
......@@ -106,7 +106,7 @@ static void modelRun(MPI_Comm commModel)
#endif
for ( tfID = 0; tfID < ntfiles; tfID++ )
{
if ( tfID > 0 )
/* if ( tfID > 0 ) */
{
streamClose ( streamID );
sprintf ( &filename[0], "%s_%d.grb", name, tfID );
......@@ -139,7 +139,7 @@ static void modelRun(MPI_Comm commModel)
chunk = CDI_UNDEFID;
}
#ifdef USE_MPI
pioWriteTimestep ( tsID, vdate, vtime );
pioWriteTimestep();
#endif
}
}
......@@ -166,7 +166,8 @@ struct {
{ "PIO_MPI", PIO_MPI },
{ "PIO_FPGUARD", PIO_FPGUARD },
{ "PIO_ASYNCH", PIO_ASYNCH },
{ "PIO_WRITER", PIO_WRITER }
{ "PIO_WRITER", PIO_WRITER },
{ "PIO_FPGUARD", PIO_FPGUARD},
};
......@@ -176,7 +177,7 @@ int main (int argc, char *argv[])
#ifdef USE_MPI
MPI_Comm commGlob;
int sizeGlob, rankGlob, pioNamespace;
int IOMode = PIO_MPI;
int IOMode = PIO_WRITER;
int nProcsIO = 2;
xmpi ( MPI_Init ( &argc, &argv));
......
......@@ -204,7 +204,7 @@ CONTAINS
#ifdef USE_MPI
! For parallel IO:
! Start transmission of all data for output in this timestep to IO server.
CALL pioWriteTimestep ( tsID, vdate, vtime )
CALL pioWriteTimestep
#endif
END DO
......@@ -224,7 +224,8 @@ CONTAINS
CALL zaxisDestroy(zaxisID2)
CALL gridDestroy(gridID)
#ifdef USE_MPI
CALL mpi_barrier(commGlob)
CALL mpi_barrier(commModel, ierror)
IF (ierror /= mpi_success) STOP 1
#endif
END SUBROUTINE modelrun
......
......@@ -100,9 +100,9 @@ static void modelRun(MPI_Comm commModel)
varSize[i][j] = nlon * nlat * nlev[i][j];
#ifdef USE_MPI
{
int start = uniform_partition_start((int [2]){ 0, varSize[i] - 1 },
int start = uniform_partition_start((int [2]){ 0, varSize[i][j] - 1 },
comm_size, rank),
chunkSize = uniform_partition_start((int [2]){ 0, varSize[i] - 1 },
chunkSize = uniform_partition_start((int [2]){ 0, varSize[i][j] - 1 },
comm_size, rank + 1) - start;
if (maxChunkSize < chunkSize)
maxChunkSize = chunkSize;
......@@ -160,9 +160,14 @@ static void modelRun(MPI_Comm commModel)
hoursPassingHack ( &vdate, &vtime, hourStep );
taxisDefVdate ( taxisID, vdate );
taxisDefVtime ( taxisID, vtime );
/* temporary fix for problem calling streamDefTimestep after
* streamWriteVarPart
* FIXME: this can be merged with the loop below again once
* per-stream RDMA windows are realized */
for ( i = 0; i < nStreams; i++ )
streamDefTimestep(streamID[i], tsID);
for ( i = 0; i < nStreams; i++ )
{
streamDefTimestep ( streamID[i], tsID );
for ( j = 0; j < nVars; j++ )
{
#ifdef USE_MPI
......@@ -172,12 +177,17 @@ static void modelRun(MPI_Comm commModel)
int start = 0, chunk = varSize[i][j];
#endif
for(int k = 0; k < chunk; k++)
var[k] = 3.3;
streamWriteVar(streamID[i], varID[i][j], var, nmiss );
var[k] = 3.3 * (double)(k + start);
#ifdef USE_MPI
streamWriteVarPart(streamID[i], varID[i][j], var, nmiss,
varDeco[i][j].partDesc);
#else
streamWriteVar(streamID[i], varID[i][j], var, nmiss);
#endif
}
}
#ifdef USE_MPI
pioWriteTimestep ( tsID, vdate, vtime );
pioWriteTimestep();
#endif
}
#ifdef USE_MPI
......
......@@ -140,6 +140,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......
......@@ -58,7 +58,7 @@ AC_DEFUN([ACX_SL_FC_CHECK_MOD_PATH_FLAG],dnl
AC_REQUIRE([AC_PROG_FC])
AS_VAR_PUSHDEF([mod_flag],[acx_sl_cv_fc_mod_path_flag_]_AC_LANG_ABBREV)dnl
ASX_VAR_UNSET([mod_flag])
AC_CACHE_CHECK([for flag to alter module search path],[mod_flag],dnl
AC_CACHE_CHECK([for flag to alter module search path],[mod_flag],
[mkdir conftestdir
cd conftestdir
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ module cnftst
......
......@@ -74,6 +74,8 @@ libcdi_la_SOURCES = \
resource_unpack.h \
resource_unpack.c \
pio_rpc.h \
pio_client.c \
pio_client.h \
pio_server.c \
pio_server.h \
pio_util.c \
......
......@@ -118,13 +118,14 @@ am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
pio_dbuffer.lo pio_interface.lo pio_mpinonb.lo \
pio_record_send.lo pio_posixasynch.lo \
pio_posixfpguardsendrecv.lo pio_posixnonb.lo pio_list_set.lo \
resource_unpack.lo pio_server.lo pio_util.lo pio_serialize.lo \
pio_cdf_int.lo resource_handle.lo servicelib.lo stream_cdf.lo \
stream_cgribex.lo stream_ext.lo stream_grb.lo \
stream_gribapi.lo stream_history.lo stream_ieg.lo cdi_int.lo \
stream_record.lo stream_srv.lo stream_var.lo table.lo taxis.lo \
timebase.lo tsteps.lo util.lo varscan.lo version.lo vlist.lo \
vlist_att.lo vlist_var.lo zaxis.lo stream.lo swap.lo
resource_unpack.lo pio_client.lo pio_server.lo pio_util.lo \
pio_serialize.lo pio_cdf_int.lo resource_handle.lo \
servicelib.lo stream_cdf.lo stream_cgribex.lo stream_ext.lo \
stream_grb.lo stream_gribapi.lo stream_history.lo \
stream_ieg.lo cdi_int.lo stream_record.lo stream_srv.lo \
stream_var.lo table.lo taxis.lo timebase.lo tsteps.lo util.lo \
varscan.lo version.lo vlist.lo vlist_att.lo vlist_var.lo \
zaxis.lo stream.lo swap.lo
libcdi_la_OBJECTS = $(am_libcdi_la_OBJECTS)
@ENABLE_CDI_LIB_FALSE@am_libcdi_la_rpath =
@ENABLE_CDI_LIB_TRUE@am_libcdi_la_rpath = -rpath $(libdir)
......@@ -161,6 +162,13 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_CXX = @BUILD_CXX@
BUILD_F77 = @BUILD_F77@
BUILD_FC = @BUILD_FC@
BUILD_FCFLAGS = @BUILD_FCFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CDI_F90_INTERFACE_FCFLAGS = @CDI_F90_INTERFACE_FCFLAGS@
......@@ -408,6 +416,8 @@ libcdi_la_SOURCES = \
resource_unpack.h \
resource_unpack.c \
pio_rpc.h \
pio_client.c \
pio_client.h \
pio_server.c \
pio_server.h \
pio_util.c \
......@@ -598,6 +608,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namespace.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_cdf_int.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_client.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_comm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_dbuffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pio_interface.Plo@am__quote@
......
......@@ -59,7 +59,7 @@ void cdf_create(const char *path, int cmode, int *ncidp)
if ( cdiNcChunksizehint != CDI_UNDEFID ) chunksizehint = cdiNcChunksizehint;
cdi_nc__create_funcp my_nc__create =
namespaceSwitchGet(NSSWITCH_NC__CREATE);
(cdi_nc__create_funcp)namespaceSwitchGet(NSSWITCH_NC__CREATE).func;
status = my_nc__create(path, cmode, initialsz, &chunksizehint, ncidp);
if ( CDF_Debug || status != NC_NOERR )
......@@ -241,7 +241,7 @@ void cdf_def_var(int ncid, const char *name, nc_type xtype, int ndims,
const int dimids[], int *varidp)
{
cdi_cdf_def_var_funcp my_cdf_def_var
= namespaceSwitchGet(NSSWITCH_CDF_DEF_VAR);
= (cdi_cdf_def_var_funcp)namespaceSwitchGet(NSSWITCH_CDF_DEF_VAR).func;
my_cdf_def_var(ncid, name, xtype, ndims, dimids, varidp);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment