Commit ddcfacb9 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Simplify logic of backend switch.

parent d7cf35bb
......@@ -336,7 +336,7 @@ void commDefCommColl ( int isProcColl )
info->commNode != MPI_COMM_NULL &&
info->commColl == MPI_COMM_NULL );
info->nodeInfo.isProcColl = isProcColl;
info->nodeInfo.isProcColl = isProcColl;
xmpi ( MPI_Comm_split ( info->commNode, info->nodeInfo.isProcColl, 0,
&info->commColl ));
xmpi ( MPI_Comm_size ( info->commColl, &info->sizeColl ));
......
......@@ -523,23 +523,16 @@ void initPOSIXFPGUARDSENDRECV ( void )
{
if ( commInqSizeNode () < 2 )
xabort ( "USAGE: # IO PROCESSES ON A PHYSICAL NODE >= 2" );
if ( commInqRankNode () == commInqSpecialRankNode ())
{
commDefCommColl ( 0 );
commSendNodeInfo ();
commRecvNodeMap ();
commDefCommsIO ();
fpgPOSIXFPGUARDSENDRECV ();
}
int isCollector = commInqRankNode () != commInqSpecialRankNode ();
commDefCommColl(isCollector);
commSendNodeInfo ();
commRecvNodeMap ();
commDefCommsIO ();
if (!isCollector)
fpgPOSIXFPGUARDSENDRECV ();
else
{
commDefCommColl ( 1 );
commSendNodeInfo ();
commRecvNodeMap ();
commDefCommsIO ();
bibAFiledataPF = listSetNew( destroyAFiledataPF, compareNamesAPF );
}
bibAFiledataPF = listSetNew( destroyAFiledataPF, compareNamesAPF );
}
#endif
......
......@@ -326,30 +326,23 @@ pioSendInitialize(void)
xabort ( "USAGE: # IO PROCESSES ON A PHYSICAL NODE >= 2" );
if ( commInqRankNode () == commInqSpecialRankNode ())
{
commDefCommColl ( 0 );
commSendNodeInfo ();
commRecvNodeMap ();
commDefCommsIO ();
switch ( commInqIOMode ())
{
case PIO_WRITER:
pioWriterStdIO();
break;
case PIO_ASYNCH:
pioWriterAIO();
break;
}
}
int isCollector = commInqRankNode () != commInqSpecialRankNode ();
commDefCommColl(isCollector);
commSendNodeInfo();
commRecvNodeMap();
commDefCommsIO();
if (!isCollector)
switch ( commInqIOMode ())
{
case PIO_WRITER:
pioWriterStdIO();
break;
case PIO_ASYNCH:
pioWriterAIO();
break;
}
else
{
commDefCommColl ( 1 );
commSendNodeInfo ();
commRecvNodeMap ();
commDefCommsIO ();
bibRemoteFileBuf = listSetNew(destroyRemoteFileBuf, compareNames);
}
bibRemoteFileBuf = listSetNew(destroyRemoteFileBuf, compareNames);
}
#endif
......
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