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
SWIFT
SWIFTsim
Commits
186d79e1
Commit
186d79e1
authored
Feb 29, 2016
by
Peter W. Draper
Browse files
Clean up include file
Remove unused define and make check static
parent
ab551762
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/partition.c
View file @
186d79e1
...
...
@@ -73,6 +73,9 @@ const char *repart_name[] = {
"METIS particle count vertex and time edge cells"
};
/* Local functions, if needed. */
static
int
check_complete
(
struct
space
*
s
,
int
verbose
,
int
nregions
);
/* Vectorisation support */
/* ===================== */
...
...
@@ -807,7 +810,7 @@ void part_part(struct initpart *ipart, int nodeID, int nr_nodes,
}
/* The grid technique can fail, so check for this before proceeding. */
if
(
!
part_
check_complete
(
s
,
(
nodeID
==
0
),
nr_nodes
))
{
if
(
!
check_complete
(
s
,
(
nodeID
==
0
),
nr_nodes
))
{
if
(
nodeID
==
0
)
message
(
"Grid initial partition failed, using a vectorised partition"
);
ipart
->
type
=
INITPART_VECTORIZE
;
...
...
@@ -874,7 +877,7 @@ void part_part(struct initpart *ipart, int nodeID, int nr_nodes,
split_metis
(
s
,
nr_nodes
,
celllist
);
/* It's not known if this can fail, but check for this before proceeding. */
if
(
!
part_
check_complete
(
s
,
(
nodeID
==
0
),
nr_nodes
))
{
if
(
!
check_complete
(
s
,
(
nodeID
==
0
),
nr_nodes
))
{
if
(
nodeID
==
0
)
message
(
"METIS initial partition failed, using a vectorised partition"
);
ipart
->
type
=
INITPART_VECTORIZE
;
...
...
@@ -926,7 +929,7 @@ void part_part(struct initpart *ipart, int nodeID, int nr_nodes,
* @param verbose if true report the missing regions.
* @return true if all regions have been found, false otherwise.
*/
int
part_
check_complete
(
struct
space
*
s
,
int
verbose
,
int
nregions
)
{
static
int
check_complete
(
struct
space
*
s
,
int
verbose
,
int
nregions
)
{
int
*
present
=
(
int
*
)
malloc
(
sizeof
(
int
)
*
nregions
);
if
(
present
==
NULL
)
error
(
"Failed to allocate present array"
);
...
...
src/partition.h
View file @
186d79e1
...
...
@@ -51,13 +51,9 @@ enum repart_type {
/* Simple descriptions of types for reports. */
extern
const
char
*
repart_name
[];
void
part_pick_metis
(
struct
space
*
s
,
int
nregions
,
int
*
vertexw
,
int
*
edgew
,
int
*
celllist
);
void
part_repart
(
enum
repart_type
reparttype
,
int
nodeID
,
int
nr_nodes
,
struct
space
*
s
,
struct
task
*
tasks
,
int
nr_tasks
);
void
part_part
(
struct
initpart
*
ipart
,
int
nodeID
,
int
nr_nodes
,
struct
space
*
s
);
int
part_check_complete
(
struct
space
*
s
,
int
verbose
,
int
nregions
);
#endif
/* SWIFT_PARTITION_H */
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