Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
3b98e735
Commit
3b98e735
authored
3 months ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add missing MPI_Comm_free
parent
ba6c638c
No related branches found
No related tags found
1 merge request
!202
Prepare PTScotch integration
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/ParMETISPartitioner.cpp
+5
-5
5 additions, 5 deletions
src/utils/ParMETISPartitioner.cpp
with
5 additions
and
5 deletions
src/utils/ParMETISPartitioner.cpp
+
5
−
5
View file @
3b98e735
...
@@ -27,10 +27,8 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
...
@@ -27,10 +27,8 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
std
::
vector
<
float
>
ubvec
{
1.05
};
std
::
vector
<
float
>
ubvec
{
1.05
};
std
::
vector
<
int
>
options
{
1
,
0
,
0
};
std
::
vector
<
int
>
options
{
1
,
0
,
0
};
int
edgecut
=
0
;
int
edgecut
=
0
;
Array
<
int
>
part
(
0
);
MPI_Group
world_group
;
MPI_Group
world_group
;
MPI_Comm_group
(
parallel
::
Messenger
::
getInstance
().
comm
(),
&
world_group
);
MPI_Comm_group
(
parallel
::
Messenger
::
getInstance
().
comm
(),
&
world_group
);
MPI_Group
mesh_group
;
MPI_Group
mesh_group
;
...
@@ -53,8 +51,9 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
...
@@ -53,8 +51,9 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
int
local_number_of_nodes
=
graph
.
numberOfNodes
();
int
local_number_of_nodes
=
graph
.
numberOfNodes
();
Array
<
int
>
partition
;
if
(
graph
.
numberOfNodes
()
>
0
)
{
if
(
graph
.
numberOfNodes
()
>
0
)
{
part
=
Array
<
int
>
(
local_number_of_nodes
);
part
ition
=
Array
<
int
>
(
local_number_of_nodes
);
std
::
vector
<
int
>
vtxdist
{
0
,
local_number_of_nodes
};
std
::
vector
<
int
>
vtxdist
{
0
,
local_number_of_nodes
};
const
Array
<
const
int
>&
entries
=
graph
.
entries
();
const
Array
<
const
int
>&
entries
=
graph
.
entries
();
...
@@ -65,7 +64,7 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
...
@@ -65,7 +64,7 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
int
result
=
int
result
=
ParMETIS_V3_PartKway
(
&
(
vtxdist
[
0
]),
entries_ptr
,
neighbors_ptr
,
NULL
,
NULL
,
&
wgtflag
,
&
numflag
,
&
ncon
,
&
npart
,
ParMETIS_V3_PartKway
(
&
(
vtxdist
[
0
]),
entries_ptr
,
neighbors_ptr
,
NULL
,
NULL
,
&
wgtflag
,
&
numflag
,
&
ncon
,
&
npart
,
&
(
tpwgts
[
0
]),
&
(
ubvec
[
0
]),
&
(
options
[
0
]),
&
edgecut
,
&
(
part
[
0
]),
&
parmetis_comm
);
&
(
tpwgts
[
0
]),
&
(
ubvec
[
0
]),
&
(
options
[
0
]),
&
edgecut
,
&
(
part
ition
[
0
]),
&
parmetis_comm
);
// LCOV_EXCL_START
// LCOV_EXCL_START
if
(
result
==
METIS_ERROR
)
{
if
(
result
==
METIS_ERROR
)
{
throw
UnexpectedError
(
"Metis Error"
);
throw
UnexpectedError
(
"Metis Error"
);
...
@@ -76,8 +75,9 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
...
@@ -76,8 +75,9 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
}
}
MPI_Group_free
(
&
mesh_group
);
MPI_Group_free
(
&
mesh_group
);
MPI_Group_free
(
&
world_group
);
return
part
;
return
part
ition
;
}
}
#else // PUGS_HAS_PARMETIS
#else // PUGS_HAS_PARMETIS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment