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
Aland, Sebastian
amdis
Commits
97be72e8
Commit
97be72e8
authored
Jan 06, 2012
by
Thomas Witkowski
Browse files
And some more bugfixes.
parent
4e04f5ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AMDiS.cc
View file @
97be72e8
...
...
@@ -56,7 +56,7 @@ namespace AMDiS {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
MeshDistributor
::
globalMeshDistributor
->
exitParallelization
();
#ifdef HAVE_PARALLEL_MTL4
if
(
mtl_environment
)
if
(
mtl_environment
)
delete
mtl_environment
;
#else
PetscFinalize
();
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
97be72e8
...
...
@@ -906,8 +906,12 @@ namespace AMDiS {
stdMpi
.
send
(
sendCodes
);
for
(
RankToBoundMap
::
iterator
it
=
allBound
.
begin
();
it
!=
allBound
.
end
();
++
it
)
stdMpi
.
recv
(
it
->
first
);
MSG
(
"DA 1
\n
"
);
stdMpi
.
startCommunication
();
MSG
(
"DA 2
\n
"
);
// === Compare received mesh structure codes. ===
...
...
AMDiS/src/parallel/StdMpi.h
View file @
97be72e8
...
...
@@ -386,12 +386,17 @@ namespace AMDiS {
FUNCNAME
(
"StdMpi::commDataSize()"
);
MPI
::
Request
request
[
sendData
.
size
()
+
recvDataSize
.
size
()];
vector
<
int
>
sendBuffers
,
recvBuffers
;
MPI
::
Status
status
[
sendData
.
size
()
+
recvDataSize
.
size
()];
vector
<
int
>
sendBuffers
;
sendBuffers
.
resize
(
sendDataSize
.
size
());
int
requestCounter
=
0
;
for
(
typename
map
<
int
,
int
>::
iterator
sendIt
=
sendDataSize
.
begin
();
sendIt
!=
sendDataSize
.
end
();
++
sendIt
)
{
sendBuffers
.
push_back
(
sendIt
->
second
);
sendBuffers
[
requestCounter
]
=
sendIt
->
second
;
request
[
requestCounter
]
=
mpiComm
.
Isend
(
&
(
sendBuffers
[
requestCounter
]),
1
,
MPI_INT
,
sendIt
->
first
,
0
);
...
...
@@ -399,11 +404,18 @@ namespace AMDiS {
}
for
(
map
<
int
,
int
>::
iterator
recvIt
=
recvDataSize
.
begin
();
recvIt
!=
recvDataSize
.
end
();
++
recvIt
)
request
[
requestCounter
++
]
=
mpiComm
.
Irecv
(
&
(
recvIt
->
second
),
1
,
MPI_INT
,
recvIt
->
first
,
0
);
MPI
::
Request
::
Waitall
(
requestCounter
,
request
);
recvIt
!=
recvDataSize
.
end
();
++
recvIt
)
{
request
[
requestCounter
]
=
mpiComm
.
Irecv
(
&
(
recvIt
->
second
),
1
,
MPI_INT
,
recvIt
->
first
,
0
);
requestCounter
++
;
}
MPI
::
Request
::
Waitall
(
requestCounter
,
request
,
status
);
/* for (int j = 0; j < requestCounter; j++) */
/* if (status[j].Get_error() != MPI::SUCCESS) */
/* MSG("MPI ERROR IN COMM: %d\n", status[j].Get_error()); */
}
...
...
@@ -421,6 +433,38 @@ namespace AMDiS {
if
(
exchangeDataSize
)
commDataSize
();
// === Remove empty data communication. ===
{
map
<
int
,
int
>::
iterator
it
=
sendDataSize
.
begin
();
while
(
it
!=
sendDataSize
.
end
())
{
TEST_EXIT_DBG
(
it
->
second
>=
0
)(
"Should not happen!
\n
"
);
if
(
it
->
second
==
0
)
{
sendData
.
erase
(
it
->
first
);
sendDataSize
.
erase
(
it
++
);
}
else
++
it
;
}
}
{
map
<
int
,
int
>::
iterator
it
=
recvDataSize
.
begin
();
while
(
it
!=
recvDataSize
.
end
())
{
TEST_EXIT_DBG
(
it
->
second
>=
0
)(
"Should not happen!
\n
"
);
if
(
it
->
second
==
0
)
{
recvData
.
erase
(
it
->
first
);
recvDataSize
.
erase
(
it
++
);
}
else
++
it
;
}
}
// === Start communication. ===
MPI
::
Request
request
[
sendData
.
size
()
+
recvDataSize
.
size
()];
int
requestCounter
=
0
;
vector
<
cppDataType
*>
sendBuffers
,
recvBuffers
;
...
...
AMDiS/src/parallel/ZoltanPartitioner.cc
View file @
97be72e8
...
...
@@ -81,6 +81,7 @@ namespace AMDiS {
zoltan
.
Set_Param
(
"DEBUG_LEVEL"
,
"0"
);
#endif
int
err
=
zoltan
.
LB_Partition
(
changes
,
nGid
,
nLid
,
nImportEls
,
import_global_ids
,
...
...
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