Commit 64dc1d0a authored by Deike Kleberg's avatar Deike Kleberg
Browse files

comment out streamWriteVar in examples

parent caa1d23d
......@@ -104,9 +104,10 @@ void modelRun ()
streamDefVlist(streamID, vlistID);
#ifdef USE_MPI
pioMetadata2 ( nNodes, nodeSizes );
pioMetadata ( nNodes, nodeSizes );
#endif
/*
for ( tsID = 0; tsID < ntsteps; tsID++ )
{
taxisDefVdate(taxisID, 19850101+tsID);
......@@ -116,6 +117,7 @@ void modelRun ()
for ( i = 0; i < nlon*nlat*nlev; i++ ) var[i] = 2.2;
streamWriteVar(streamID, varID, var, nmiss);
}
*/
#ifdef USE_MPI
MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
......
......@@ -182,9 +182,10 @@ void modelRun ()
streamDefVlist(streamID, vlistID);
#ifdef USE_MPI
pioMetadata ();
pioMetadata ( nNodes, nodeSizes );
#endif
/*
// Loop over the number of time steps
for ( tsID = 0; tsID < ntsteps; tsID++ )
{
......@@ -204,6 +205,7 @@ void modelRun ()
streamWriteVar(streamID, varID1, var1, nmiss);
streamWriteVar(streamID, varID2, var2, nmiss);
}
*/
#ifdef USE_MPI
MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
......
......@@ -209,8 +209,7 @@ extern "C" {
int pioInit ( int, int, int );
void pioFinalize ( void );
void pioMetadata ( void );
void pioMetadata2 ( int, int * );
void pioMetadata ( int, int * );
void namespaceInit ( int, int * );
void namespaceSetActive ( int );
......
......@@ -335,8 +335,6 @@
PARAMETER (PIO_POSIX_FPGUARD_THREAD_REFUSE = 5)
INTEGER PIO_POSIX_FPGUARD_THREAD
PARAMETER (PIO_POSIX_FPGUARD_THREAD = 6)
INTEGER TEST_LOCAL
PARAMETER (TEST_LOCAL = 1)
INTEGER pioInit
! (INTEGER ,
! INTEGER ,
......@@ -347,6 +345,8 @@
EXTERNAL pioFinalize
! pioMetadata
! (INTEGER ,
! INTEGER )
EXTERNAL pioMetadata
! namespaceInit
......@@ -363,11 +363,27 @@
! INTEGER )
EXTERNAL gridGetIndexArray
! streamGetIndexArray
! (INTEGER ,
! INTEGER )
EXTERNAL streamGetIndexArray
! zaxisGetIndexArray
! (INTEGER ,
! INTEGER )
EXTERNAL zaxisGetIndexArray
! vlistDefVarIOrank
! (INTEGER ,
! INTEGER ,
! INTEGER )
EXTERNAL vlistDefVarIOrank
INTEGER vlistInqVarIOrank
! (INTEGER ,
! INTEGER )
EXTERNAL vlistInqVarIOrank
CHARACTER*80 cdiStringError
! (INTEGER cdiErrno)
EXTERNAL cdiStringError
......@@ -478,6 +494,10 @@
! (INTEGER streamID)
EXTERNAL streamInqVlist
INTEGER streamInqVlistIDorig
! (INTEGER streamID)
EXTERNAL streamInqVlistIDorig
INTEGER streamInqFiletype
! (INTEGER streamID)
EXTERNAL streamInqFiletype
......@@ -531,6 +551,10 @@
! (INTEGER streamID)
EXTERNAL streamNtsteps
INTEGER streamInqNvars
! (INTEGER streamID)
EXTERNAL streamInqNvars
!
! STREAM var I/O routines
!
......
......@@ -58,11 +58,14 @@
FCALLSCFUN3 (INT, pioInit, PIOINIT, pioinit, INT, INT, INT)
FCALLSCSUB0 (pioFinalize, PIOFINALIZE, piofinalize)
FCALLSCSUB0 (pioMetadata, PIOMETADATA, piometadata)
FCALLSCSUB2 (pioMetadata, PIOMETADATA, piometadata, INT, PINT)
FCALLSCSUB2 (namespaceInit, NAMESPACEINIT, namespaceinit, INT, PINT)
FCALLSCSUB1 (namespaceSetActive, NAMESPACESETACTIVE, namespacesetactive, INT)
FCALLSCSUB2 (gridGetIndexArray, GRIDGETINDEXARRAY, gridgetindexarray, INT, PINT)
FCALLSCSUB2 (streamGetIndexArray, STREAMGETINDEXARRAY, streamgetindexarray, INT, PINT)
FCALLSCSUB2 (zaxisGetIndexArray, ZAXISGETINDEXARRAY, zaxisgetindexarray, INT, PINT)
FCALLSCSUB3 (vlistDefVarIOrank, VLISTDEFVARIORANK, vlistdefvariorank, INT, INT, INT)
FCALLSCFUN2 (INT, vlistInqVarIOrank, VLISTINQVARIORANK, vlistinqvariorank, INT, INT)
FCALLSCFUN1 (STRING, cdiStringError, CDISTRINGERROR, cdistringerror, INT)
FCALLSCSUB1 (cdiDebug, CDIDEBUG, cdidebug, INT)
FCALLSCFUN0 (STRING, cdiLibraryVersion, CDILIBRARYVERSION, cdilibraryversion)
......@@ -93,6 +96,7 @@ FCALLSCSUB1 (streamClose, STREAMCLOSE, streamclose, INT)
FCALLSCSUB1 (streamSync, STREAMSYNC, streamsync, INT)
FCALLSCSUB2 (streamDefVlist, STREAMDEFVLIST, streamdefvlist, INT, INT)
FCALLSCFUN1 (INT, streamInqVlist, STREAMINQVLIST, streaminqvlist, INT)
FCALLSCFUN1 (INT, streamInqVlistIDorig, STREAMINQVLISTIDORIG, streaminqvlistidorig, INT)
FCALLSCFUN1 (INT, streamInqFiletype, STREAMINQFILETYPE, streaminqfiletype, INT)
FCALLSCSUB2 (streamDefByteorder, STREAMDEFBYTEORDER, streamdefbyteorder, INT, INT)
FCALLSCFUN1 (INT, streamInqByteorder, STREAMINQBYTEORDER, streaminqbyteorder, INT)
......@@ -105,6 +109,7 @@ FCALLSCFUN2 (INT, streamInqTimestep, STREAMINQTIMESTEP, streaminqtimestep, INT,
FCALLSCFUN1 (STRING, streamFilename, STREAMFILENAME, streamfilename, INT)
FCALLSCFUN1 (STRING, streamFilesuffix, STREAMFILESUFFIX, streamfilesuffix, INT)
FCALLSCFUN1 (INT, streamNtsteps, STREAMNTSTEPS, streamntsteps, INT)
FCALLSCFUN1 (INT, streamInqNvars, STREAMINQNVARS, streaminqnvars, INT)
/* STREAM var I/O routines */
......@@ -444,12 +449,3 @@ FCALLSCFUN1 (INT, streamInqHistorySize, STREAMINQHISTORYSIZE, streaminqhistorysi
FCALLSCSUB2 (streamInqHistoryString, STREAMINQHISTORYSTRING, streaminqhistorystring, INT, PSTRING)
#endif
/*
* Local Variables:
* c-file-style: "Java"
* c-basic-offset: 2
* indent-tabs-mode: nil
* show-trailing-whitespace: t
* require-trailing-newline: t
* End:
*/
......@@ -208,7 +208,7 @@ void setPioCommunicator ( MPI_Comm *myComm, MPI_Comm commF2C, int *color,
{
strncpy ( hostname, myHost, len );
hostname [ len ] = '\0';
xdebug ( "myHost = %s\n", hostname );
xdebug ( "myHost = %s", hostname );
}
allHosts = ( char ** ) xmalloc ( size * sizeof ( char * ));
......@@ -253,10 +253,7 @@ void setPioCommunicator ( MPI_Comm *myComm, MPI_Comm commF2C, int *color,
free ( allHosts );
free ( myHost );
if ( ddebug == MAXDEBUG )
fprintf ( stderr,
"pe%d in setPioCommunicator, color=%d, before return\n",
rank, *color );
xdebug ( "color=%d", *color );
return;
}
......@@ -272,7 +269,6 @@ MPI_Comm bInit ( int ptype, MPI_Comm comm, int *color, int *nnodes )
*nnodes = 1;
*color = 1;
if ( ddebug == MAXDEBUG ) xdebug ();
#ifdef USE_MPI
MPI_Comm_size ( comm, &size );
MPI_Comm_rank ( comm, &rank );
......@@ -287,8 +283,6 @@ MPI_Comm bInit ( int ptype, MPI_Comm comm, int *color, int *nnodes )
pioinfo = ( pioInfo * ) xmalloc ( sizeof ( pioInfo ));
xdebug ();
pioinfo->type = ptype;
setPioCommunicator ( & ( pioinfo->comm ), comm, color, nnodes );
......@@ -298,23 +292,15 @@ MPI_Comm bInit ( int ptype, MPI_Comm comm, int *color, int *nnodes )
pioinfo->color = *color;
xdebug ();
MPI_Comm_rank ( pioinfo->comm, &( pioinfo->rank ));
MPI_Comm_size ( pioinfo->comm, &( pioinfo->size ));
xdebug ();
// if ( ddebug == MAXDEBUG && pioinfo->rank == 0 )
//fprintf ( stderr,
xdebug(
"pe%d in bInit(), ptype=%d, initial_buffersize=%ld: "
"after init pioinfo ...\n",
pioinfo->rank, pioinfo->type, initial_buffersize );
xdebug( "pe%d in bInit(), ptype=%d, initial_buffersize=%ld: "
"after init pioinfo ...",
pioinfo->rank, pioinfo->type, initial_buffersize );
pioinfo->collectorComm = MPI_COMM_NULL;
xdebug ();
switch ( pioinfo->type )
{
case PIO_NONE:
......@@ -344,7 +330,7 @@ MPI_Comm bInit ( int ptype, MPI_Comm comm, int *color, int *nnodes )
}
#endif
xdebug ("bInit out\n" );
xdebug ("out" );
#ifdef USE_MPI
return pioinfo->collectorComm;
......
......@@ -389,30 +389,7 @@ void modelWinCreate ( void )
/************************************************************************/
void pioMetadata ( void )
{
#ifdef USE_MPI
char * buffer;
int bufferSize;
if ( rankGlob < nProcsIO )
{
reshPackBufferCreate ( &buffer, &bufferSize, commsIO[rankGlob] );
MPI_Send ( buffer, bufferSize, MPI_PACKED, nProcsCalc,
METADATA, * ( commsIO + rankGlob ));
xdebug ( "sent message metadata" );
reshPackBufferDestroy ( &buffer );
}
#endif
}
/************************************************************************/
void pioMetadata2 ( int nNodes, int * nodeSizes )
void pioMetadata ( int nNodes, int * nodeSizes )
{
#ifdef USE_MPI
char * buffer;
......
......@@ -55,7 +55,6 @@ void IOServer ( MPI_Comm comm, int ptype )
nfinished = 0;
commColl = bInit ( ptype, comm, &color, &nnodes );
xdebug();
for ( ;; )
{
......
Supports Markdown
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