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
22c15824
Commit
22c15824
authored
7 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Add cell is local to node field to dumpCells output
parent
2a97c713
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!458
Add time based edge repartitioning
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/debug.c
+9
-7
9 additions, 7 deletions
src/debug.c
src/debug.h
+1
-1
1 addition, 1 deletion
src/debug.h
with
10 additions
and
8 deletions
src/debug.c
+
9
−
7
View file @
22c15824
...
...
@@ -304,21 +304,24 @@ static void dumpCells_map(struct cell *c, void *data) {
if
(
c
->
count
>
0
||
c
->
gcount
>
0
||
c
->
scount
>
0
)
fprintf
(
file
,
" %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6d %6d %6d %6d "
"%6.1f %20lld %6d %6d %6d %6d
\n
"
,
"%6.1f %20lld %6d %6d %6d
%6d
%6d
\n
"
,
c
->
loc
[
0
],
c
->
loc
[
1
],
c
->
loc
[
2
],
c
->
width
[
0
],
c
->
width
[
1
],
c
->
width
[
2
],
c
->
count
,
c
->
gcount
,
c
->
scount
,
c
->
depth
,
ntasks
,
c
->
ti_end_min
,
get_time_bin
(
c
->
ti_end_min
),
(
c
->
super
==
c
),
cell_is_active
(
c
,
e
),
c
->
nodeID
);
cell_is_active
(
c
,
e
),
c
->
nodeID
,
c
->
nodeID
==
e
->
nodeID
);
}
/**
* @brief Dump the location, depth, task counts and timebins and active state,
* for all cells to a simple text file.
*
* @param prefix base output filename
* @param prefix base output filename, result is written to
* <prefix>_<rank>_<step>.dat
* @param s the space holding the cells to dump.
* @param rank node ID of MPI rank, or 0 if not relevant.
* @param step the current engine step, or some unique integer.
*/
void
dumpCells
(
const
char
*
prefix
,
struct
space
*
s
)
{
void
dumpCells
(
const
char
*
prefix
,
struct
space
*
s
,
int
rank
,
int
step
)
{
FILE
*
file
=
NULL
;
...
...
@@ -327,15 +330,14 @@ void dumpCells(const char *prefix, struct space *s) {
char
fname
[
200
];
int
uniq
=
atomic_inc
(
&
nseq
);
sprintf
(
fname
,
"%s_%03d.dat"
,
prefix
,
uniq
);
file
=
fopen
(
fname
,
"w"
);
/* Header. */
fprintf
(
file
,
"# %6s %6s %6s %6s %6s %6s %6s %6s %6s %6s %6s %6s "
"%20s %6s %6s %6s
\n
"
,
"%20s %6s %6s
%6s
%6s
\n
"
,
"x"
,
"y"
,
"z"
,
"xw"
,
"yw"
,
"zw"
,
"count"
,
"gcount"
,
"scount"
,
"depth"
,
"tasks"
,
"ti_end_min"
,
"timebin"
,
"issuper"
,
"active"
,
"rank"
);
"tasks"
,
"ti_end_min"
,
"timebin"
,
"issuper"
,
"active"
,
"rank"
,
"local"
);
uintptr_t
data
[
2
];
data
[
0
]
=
(
size_t
)
file
;
...
...
This diff is collapsed.
Click to expand it.
src/debug.h
+
1
−
1
View file @
22c15824
...
...
@@ -36,7 +36,7 @@ void printgParticle_single(struct gpart *gp);
int
checkSpacehmax
(
struct
space
*
s
);
int
checkCellhdxmax
(
const
struct
cell
*
c
,
int
*
depth
);
void
dumpCells
(
const
char
*
prefix
,
struct
space
*
s
);
void
dumpCells
(
const
char
*
prefix
,
struct
space
*
s
,
int
rank
,
int
step
);
#ifdef HAVE_METIS
#include
"metis.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