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
iwr
amdis
Commits
cf094515
Commit
cf094515
authored
Aug 13, 2008
by
Thomas Witkowski
Browse files
* Added time information to parallel debug server
parent
c7be95ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/ParallelProblem.cc
View file @
cf094515
"ParallelProblem.h"
#include
"ParallelProblem.h"
#include "ProblemScal.h"
#include "ProblemScal.h"
#include "ProblemVec.h"
#include "ProblemVec.h"
#include "ProblemInstat.h"
#include "ProblemInstat.h"
...
@@ -116,7 +116,26 @@ namespace AMDiS {
...
@@ -116,7 +116,26 @@ namespace AMDiS {
closeTimestep
(
adaptInfo
);
closeTimestep
(
adaptInfo
);
amdisGroup
.
Free
();
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
)
Flag
ParallelProblemBase
::
oneIteration
(
AdaptInfo
*
adaptInfo
,
Flag
toDo
)
{
{
...
@@ -1746,6 +1765,19 @@ namespace AMDiS {
...
@@ -1746,6 +1765,19 @@ namespace AMDiS {
int
mpiTag
=
100
;
int
mpiTag
=
100
;
while
(
true
)
{
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
];
MeshStructure
*
structures
=
NEW
MeshStructure
[
mpiWorldSize
];
/* ===== Communication with exchangeMeshStructureCode() ====== */
/* ===== Communication with exchangeMeshStructureCode() ====== */
...
...
AMDiS/src/ParallelProblem.h
View file @
cf094515
...
@@ -116,17 +116,7 @@ namespace AMDiS {
...
@@ -116,17 +116,7 @@ namespace AMDiS {
timeIF_
->
initTimestep
(
adaptInfo
);
timeIF_
->
initTimestep
(
adaptInfo
);
};
};
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
)
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
);
{
if
(
mpiSize
>
1
&&
doBuildGlobalSolution
(
adaptInfo
))
{
synchronizeMeshes
(
adaptInfo
);
exchangeRankSolutions
(
adaptInfo
);
buildGlobalSolution
(
adaptInfo
);
}
if
(
timeIF_
)
timeIF_
->
closeTimestep
(
adaptInfo
);
};
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
{
{
...
...
Write
Preview
Supports
Markdown
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