Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
80ed8b79
Commit
80ed8b79
authored
Mar 23, 2016
by
Florian Wittkamp
Browse files
Fix possible bug in exchange of L
The vector FL was allocated before the value L was exchanged.
parent
0c927f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/exchange_par.c
View file @
80ed8b79
...
...
@@ -377,7 +377,6 @@ void exchange_par(void){
}
/** if (MYID == 0) **/
if
(
MYID
!=
0
)
FL
=
vector
(
1
,
L
);
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Bcast
(
&
idum
,
NPAR
,
MPI_INT
,
0
,
MPI_COMM_WORLD
);
...
...
@@ -661,6 +660,12 @@ void exchange_par(void){
TRKILL_STF_OFFSET
=
idum
[
115
];
TRKILL_STF_OFFSET_INVERT
=
idum
[
116
];
MPI_Bcast
(
&
FL
[
1
],
L
,
MPI_FLOAT
,
0
,
MPI_COMM_WORLD
);
if
(
MYID
!=
0
&&
L
>
0
)
{
FL
=
vector
(
1
,
L
);
}
if
(
L
>
0
)
{
MPI_Bcast
(
&
FL
[
1
],
L
,
MPI_FLOAT
,
0
,
MPI_COMM_WORLD
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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