Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
8329529f
Commit
8329529f
authored
Mar 18, 2020
by
snuverink_j
Browse files
Resolve "clang compiler errors for MPI_AllReduce (-Wtype-safety)"
parent
b8cd789e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
src/Algorithms/ParallelSliceTracker.cpp
src/Algorithms/ParallelSliceTracker.cpp
+1
-1
src/Algorithms/bet/EnvelopeBunch.cpp
src/Algorithms/bet/EnvelopeBunch.cpp
+1
-1
src/Distribution/Distribution.cpp
src/Distribution/Distribution.cpp
+4
-4
No files found.
src/Algorithms/ParallelSliceTracker.cpp
View file @
8329529f
...
...
@@ -288,7 +288,7 @@ void ParallelSliceTracker::execute() {
//reduce(&globalEOL_m, &globalEOL_m, OpBitwiseOrAssign());
//reduce(&globalEOL_m, &globalEOL_m + 1, &globalEOL_m, OpBitwiseAndAssign());
MPI_Allreduce
(
MPI_IN_PLACE
,
&
globalEOL_m
,
1
,
MPI_
INT
,
MPI_LAND
,
Ippl
::
getComm
());
MPI_Allreduce
(
MPI_IN_PLACE
,
&
globalEOL_m
,
1
,
MPI_
CXX_BOOL
,
MPI_LAND
,
Ippl
::
getComm
());
computeSpaceChargeFields
();
timeIntegration
();
...
...
src/Algorithms/bet/EnvelopeBunch.cpp
View file @
8329529f
...
...
@@ -1455,7 +1455,7 @@ double EnvelopeBunch::get_sPos() {
}
}
MPI_Allreduce
(
MPI_IN_PLACE
,
&
count
,
1
,
MPI_LONG
,
MPI_SUM
,
Ippl
::
getComm
());
MPI_Allreduce
(
MPI_IN_PLACE
,
&
count
,
1
,
MPI_
UNSIGNED_
LONG
,
MPI_SUM
,
Ippl
::
getComm
());
MPI_Allreduce
(
MPI_IN_PLACE
,
&
refpos
,
1
,
MPI_DOUBLE
,
MPI_SUM
,
Ippl
::
getComm
());
return
refpos
/
count
;
}
...
...
src/Distribution/Distribution.cpp
View file @
8329529f
...
...
@@ -1110,7 +1110,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
++
numPartsToSend
;
if
(
numPartsToSend
%
distributeFrequency
==
0
)
{
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
INT
,
0
,
Ippl
::
getComm
());
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
UNSIGNED
,
0
,
Ippl
::
getComm
());
MPI_Bcast
(
&
data
[
0
],
dataSize
,
MPI_CHAR
,
0
,
Ippl
::
getComm
());
numPartsToSend
=
0
;
...
...
@@ -1131,7 +1131,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
}
dataSize
=
(
numberOfParticlesRead
==
numParts
?
data
.
size
()
:
std
::
numeric_limits
<
unsigned
int
>::
max
());
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
INT
,
0
,
Ippl
::
getComm
());
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
UNSIGNED
,
0
,
Ippl
::
getComm
());
if
(
numberOfParticlesRead
!=
numParts
)
{
throw
OpalException
(
"Distribution::createDistributionFromFile"
,
"Found "
+
...
...
@@ -1145,7 +1145,7 @@ void Distribution::createDistributionFromFile(size_t /*numberOfParticles*/, doub
}
else
{
do
{
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
INT
,
0
,
Ippl
::
getComm
());
MPI_Bcast
(
&
dataSize
,
1
,
MPI_
UNSIGNED
,
0
,
Ippl
::
getComm
());
if
(
dataSize
==
std
::
numeric_limits
<
unsigned
int
>::
max
())
{
throw
OpalException
(
"Distribution::createDistributionFromFile"
,
"Couldn't find "
+
...
...
@@ -4252,7 +4252,7 @@ void Distribution::writeOutFileEmission() {
const
size_t
bitsPerParticle
=
(
6
*
sizeof
(
double
)
+
sizeof
(
size_t
));
size_t
totalSendBits
=
xWrite_m
.
size
()
*
bitsPerParticle
;
std
::
vector
<
long
>
numberOfBits
(
Ippl
::
getNodes
(),
0
);
std
::
vector
<
unsigned
long
>
numberOfBits
(
Ippl
::
getNodes
(),
0
);
numberOfBits
[
Ippl
::
myNode
()]
=
totalSendBits
;
if
(
Ippl
::
myNode
()
==
0
)
{
...
...
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