Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
cf094515
Commit
cf094515
authored
Aug 13, 2008
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added time information to parallel debug server
parent
c7be95ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
13 deletions
+35
-13
AMDiS/src/ParallelProblem.cc
AMDiS/src/ParallelProblem.cc
+34
-2
AMDiS/src/ParallelProblem.h
AMDiS/src/ParallelProblem.h
+1
-11
No files found.
AMDiS/src/ParallelProblem.cc
View file @
cf094515
"ParallelProblem.h"
#include
"ParallelProblem.h"
#include "ProblemScal.h"
#include "ProblemVec.h"
#include "ProblemInstat.h"
...
...
@@ -116,7 +116,26 @@ namespace AMDiS {
closeTimestep
(
adaptInfo
);
amdisGroup
.
Free
();
};
}
void
ParallelProblemBase
::
closeTimestep
(
AdaptInfo
*
adaptInfo
)
{
if
(
mpiSize
>
1
&&
doBuildGlobalSolution
(
adaptInfo
))
{
if
(
debugMode
&&
mpiRank
==
0
)
{
// Send adaptInfo inforamtion to debug server
double
sendTime
=
adaptInfo
->
getTime
();
double
sendTimestep
=
adaptInfo
->
getTimestep
();
MPI
::
COMM_WORLD
.
Send
(
&
sendTime
,
1
,
MPI_DOUBLE
,
0
,
100
);
MPI
::
COMM_WORLD
.
Send
(
&
sendTimestep
,
1
,
MPI_DOUBLE
,
0
,
100
);
}
synchronizeMeshes
(
adaptInfo
);
exchangeRankSolutions
(
adaptInfo
);
buildGlobalSolution
(
adaptInfo
);
}
if
(
timeIF_
)
timeIF_
->
closeTimestep
(
adaptInfo
);
}
Flag
ParallelProblemBase
::
oneIteration
(
AdaptInfo
*
adaptInfo
,
Flag
toDo
)
{
...
...
@@ -1746,6 +1765,19 @@ namespace AMDiS {
int
mpiTag
=
100
;
while
(
true
)
{
/* ===== Communication with closeTimestep() ============== */
// Get current time and timestep
double
recvTime
=
0.0
;
double
recvTimestep
=
0.0
;
MPI
::
COMM_WORLD
.
Recv
(
&
recvTime
,
1
,
MPI_DOUBLE
,
1
,
mpiTag
);
MPI
::
COMM_WORLD
.
Recv
(
&
recvTimestep
,
1
,
MPI_DOUBLE
,
1
,
mpiTag
);
adaptInfo
->
setTime
(
recvTime
);
adaptInfo
->
setTimestep
(
recvTimestep
);
MeshStructure
*
structures
=
NEW
MeshStructure
[
mpiWorldSize
];
/* ===== Communication with exchangeMeshStructureCode() ====== */
...
...
AMDiS/src/ParallelProblem.h
View file @
cf094515
...
...
@@ -116,17 +116,7 @@ namespace AMDiS {
timeIF_
->
initTimestep
(
adaptInfo
);
};
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
)
{
if
(
mpiSize
>
1
&&
doBuildGlobalSolution
(
adaptInfo
))
{
synchronizeMeshes
(
adaptInfo
);
exchangeRankSolutions
(
adaptInfo
);
buildGlobalSolution
(
adaptInfo
);
}
if
(
timeIF_
)
timeIF_
->
closeTimestep
(
adaptInfo
);
};
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
);
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
{
...
...
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