Skip to content
Snippets Groups Projects
Commit 03939f9b authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Minor beautifications.

parent b049888a
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,7 @@ void commDestroy ( void )
{
for ( collID = 0; collID < info->nProcsColl; collID++ )
if ( info->commsIO[collID] != MPI_COMM_NULL )
xmpi ( MPI_Comm_free ( &info->commsIO[collID] ));
xmpi(MPI_Comm_free(info->commsIO + collID));
free ( info->commsIO );
info->commsIO = NULL;
}
......@@ -710,19 +710,20 @@ void commDefCommsIO ( void )
ranks = xmalloc (( info->nProcsModel + 1 ) * sizeof ( ranks[0] ));
for ( i = 0; i < info->nProcsModel; i++ )
* ( ranks + i ) = i;
ranks[i] = i;
xmpi ( MPI_Comm_group ( info->commGlob, &groupGlob ));
for ( collID = 0; collID < info->nProcsColl; collID++ )
{
currIORank = info->nodeMap[collID];
* ( ranks + info->nProcsModel ) = currIORank;
ranks[info->nProcsModel] = currIORank;
MPI_Group currGroupIO;
xmpi ( MPI_Group_incl ( groupGlob, info->nProcsModel + 1,
ranks, &currGroupIO ));
xmpi ( MPI_Comm_create ( info->commGlob, currGroupIO,
info->commsIO + collID ));
xmpi(MPI_Group_incl(groupGlob, info->nProcsModel + 1,
ranks, &currGroupIO));
xmpi(MPI_Comm_create(info->commGlob, currGroupIO,
info->commsIO + collID));
xmpi(MPI_Group_free(&currGroupIO));
if ( info->rankGlob == currIORank )
info->commCalc = info->commsIO[collID];
......@@ -733,7 +734,6 @@ void commDefCommsIO ( void )
sprintf ( &name[8], "%d", collID );
xmpi ( MPI_Comm_set_name ( info->commsIO[collID], name ));
}
xmpi(MPI_Group_free(&currGroupIO));
}
if ( ddebug >= 2 )
......
......@@ -93,8 +93,8 @@ int destroyAFiledataMPINONB ( void *v )
of = (aFiledataM * ) v;
xdebug ( "IOPE%d: name=%s, close file, in",
rankNode, of->name );
xdebug ( "IOPE%d: close file %d, name=\"%s\"",
rankNode, of->fileID, of->name );
/* close file */
......
......@@ -117,21 +117,18 @@ void listInitPointer ( void )
static void listDestroy ( void )
{
listElem_t * listElem;
int i, j, nnsp;
if ( listResources )
{
nnsp = namespaceGetNumber ();
for ( i = 0; i < nnsp; i++ )
int nnsp = namespaceGetNumber ();
for (int i = 0; i < nnsp; i++ )
{
pioNamespaceSetActive ( i );
if ( listResources[i] )
{
if ( listSizeAllocated )
for ( j = 0; j < listSizeAllocated[i]; j++ )
for ( int j = 0; j < listSizeAllocated[i]; j++ )
{
listElem = listResources[i] + j;
listElem_t *listElem = listResources[i] + j;
if ( listElem->val )
listElem->ops->valDestroy ( listElem->val );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment