Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Weik
waLBerla
Commits
d65b1063
Commit
d65b1063
authored
Jan 07, 2019
by
Christoph Schwarzmeier
Browse files
Correct usage of validity check
parent
ea056823
Changes
3
Hide whitespace changes
Inline
Side-by-side
apps/benchmarks/UniformGrid/UniformGrid.cpp
View file @
d65b1063
...
...
@@ -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
);
...
...
src/blockforest/Initialization.cpp
View file @
d65b1063
...
...
@@ -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
);
...
...
src/core/mpi/MPIManager.cpp
View file @
d65b1063
...
...
@@ -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
tru
e
;
return
fals
e
;
}
else
{
return
fals
e
;
return
tru
e
;
}
#else
return
fals
e
;
return
tru
e
;
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment