Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SWIFT
SWIFTsim
Commits
f733b66d
Commit
f733b66d
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
1960b4d1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/debug.c
+7
-8
7 additions, 8 deletions
src/debug.c
src/debug.h
+1
-2
1 addition, 2 deletions
src/debug.h
with
8 additions
and
10 deletions
src/debug.c
+
7
−
8
View file @
f733b66d
...
...
@@ -341,14 +341,13 @@ void dumpMETISGraph(const char *prefix, idx_t nvertices, idx_t nvertexweights,
* Can be used to visualise the partitioning of an MPI run. Note should
* be used immediately after repartitioning when the top-level cells
* have been assigned their nodes. Each time this is called a new file
* with the given prefix, a unique integer and type of .dat is created.
* with the given prefix, a unique integer and type of .dat is created.
*
* @param prefix base output filename
* @param cells_top the top-level cells.
* @param nr_cells the number of cells.
*/
void
dumpCellRanks
(
const
char
*
prefix
,
struct
cell
*
cells_top
,
int
nr_cells
)
{
void
dumpCellRanks
(
const
char
*
prefix
,
struct
cell
*
cells_top
,
int
nr_cells
)
{
FILE
*
file
=
NULL
;
...
...
@@ -361,15 +360,15 @@ void dumpCellRanks(const char *prefix, struct cell *cells_top,
file
=
fopen
(
fname
,
"w"
);
/* Header. */
fprintf
(
file
,
"# %6s %6s %6s %6s %6s %6s %6s
\n
"
,
"x"
,
"y"
,
"z"
,
"xw"
,
"yw"
,
"zw"
,
"rank"
);
fprintf
(
file
,
"# %6s %6s %6s %6s %6s %6s %6s
\n
"
,
"x"
,
"y"
,
"z"
,
"xw"
,
"yw"
,
"zw"
,
"rank"
);
/* Output */
for
(
int
i
=
0
;
i
<
nr_cells
;
i
++
)
{
struct
cell
*
c
=
&
cells_top
[
i
];
fprintf
(
file
,
" %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6d
\n
"
,
c
->
loc
[
0
],
c
->
loc
[
1
],
c
->
loc
[
2
],
c
->
width
[
0
],
c
->
width
[
1
],
c
->
width
[
2
],
c
->
nodeID
);
fprintf
(
file
,
" %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6d
\n
"
,
c
->
loc
[
0
],
c
->
loc
[
1
],
c
->
loc
[
2
],
c
->
width
[
0
],
c
->
width
[
1
],
c
->
width
[
2
],
c
->
nodeID
);
}
fclose
(
file
);
...
...
This diff is collapsed.
Click to expand it.
src/debug.h
+
1
−
2
View file @
f733b66d
...
...
@@ -40,8 +40,7 @@ void dumpMETISGraph(const char *prefix, idx_t nvtxs, idx_t ncon, idx_t *xadj,
#endif
#ifdef HAVE_MPI
void
dumpCellRanks
(
const
char
*
prefix
,
struct
cell
*
cells_top
,
int
nr_cells
);
void
dumpCellRanks
(
const
char
*
prefix
,
struct
cell
*
cells_top
,
int
nr_cells
);
#endif
#endif
/* SWIFT_DEBUG_H */
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