Commit d65b1063 authored by Christoph Schwarzmeier's avatar Christoph Schwarzmeier
Browse files

Correct usage of validity check

parent ea056823
......@@ -263,7 +263,7 @@ void createSetupBlockForest( blockforest::SetupBlockForest & sforest, const Conf
WALBERLA_MPI_SECTION()
{
if ( ! MPIManager::instance()->isCartesianCommValid() )
if ( MPIManager::instance()->isCartesianCommValid() )
{
MPIManager::instance()->createCartesianComm(numberOfXProcesses, numberOfYProcesses, numberOfZProcesses, false, false, false);
......
......@@ -229,7 +229,7 @@ createBlockForest( const AABB& domainAABB,
//create cartesian communicator only if not yet a cartesian communicator (or other communicator was created)
if ( ! mpiManager->rankValid() )
{
if ( ! mpiManager->isCartesianCommValid() ) {
if ( mpiManager->isCartesianCommValid() ) {
mpiManager->createCartesianComm( numberOfXProcesses, numberOfYProcesses, numberOfZProcesses, xPeriodic, yPeriodic, zPeriodic );
processIdMap = new std::vector< uint_t >( numberOfProcesses );
......
......@@ -158,7 +158,7 @@ void MPIManager::createCartesianComm( int dims[3], int periodicity[3] )
WALBERLA_ASSERT_GREATER( dims[1], 0 );
WALBERLA_ASSERT_GREATER( dims[2], 0 );
if ( isCartesianCommValid() ) {
if ( ! isCartesianCommValid() ) {
WALBERLA_LOG_WARNING_ON_ROOT( "Your version of OpenMPI contains a bug which might lead to a segmentation fault "
"when generating vtk output. Since the bug only occurs with a 3D Cartesian MPI "
"communicator, try to use MPI_COMM_WORLD instead. See waLBerla issue #73 for "
......@@ -242,13 +242,13 @@ bool MPIManager::isCartesianCommValid() const
if (ompi_ver == "2.0.0" || ompi_ver == "2.0.1" || ompi_ver == "2.0.2" || ompi_ver == "2.0.3" ||
ompi_ver == "2.1.0" || ompi_ver == "2.1.1") {
return true;
return false;
}
else {
return false;
return true;
}
#else
return false;
return true;
#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