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
17abbebc
Commit
17abbebc
authored
Feb 25, 2020
by
Matthieu Schaller
Browse files
Report the memory locally allocated for the particles
parent
c7565cff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
17abbebc
...
...
@@ -256,7 +256,8 @@ void engine_repartition_trigger(struct engine *e) {
#ifdef WITH_MPI
const
ticks
tic
=
getticks
();
static
int
opened
=
e
->
restarting
;
static
int
opened
=
0
;
if
(
e
->
restarting
)
opened
=
1
;
/* Do nothing if there have not been enough steps since the last repartition
* as we don't want to repeat this too often or immediately after a
...
...
@@ -1570,6 +1571,28 @@ void engine_rebuild(struct engine *e, int repartitioned,
(
e
->
s
->
nr_cells
+
e
->
s
->
tot_cells
)
*
sizeof
(
struct
gravity_tensors
)
/
(
1024
*
1024
));
/* Report the number of particles and memory */
if
(
e
->
verbose
)
message
(
"Space has memory for %zd/%zd/%zd/%zd part/gpart/spart/bpart "
"(%zd/%zd/%zd/%zd MB)"
,
e
->
s
->
size_parts
,
e
->
s
->
size_gparts
,
e
->
s
->
size_sparts
,
e
->
s
->
size_bparts
,
e
->
s
->
size_parts
*
sizeof
(
struct
part
)
/
(
1024
*
1024
),
e
->
s
->
size_gparts
*
sizeof
(
struct
gpart
)
/
(
1024
*
1024
),
e
->
s
->
size_sparts
*
sizeof
(
struct
spart
)
/
(
1024
*
1024
),
e
->
s
->
size_bparts
*
sizeof
(
struct
bpart
)
/
(
1024
*
1024
));
if
(
e
->
verbose
)
message
(
"Space holds %zd/%zd/%zd/%zd part/gpart/spart/bpart (fracs: "
"%f/%f/%f/%f)"
,
e
->
s
->
nr_parts
,
e
->
s
->
nr_gparts
,
e
->
s
->
nr_sparts
,
e
->
s
->
nr_bparts
,
e
->
s
->
nr_parts
?
e
->
s
->
nr_parts
/
((
double
)
e
->
s
->
size_parts
)
:
0
.,
e
->
s
->
nr_gparts
?
e
->
s
->
nr_gparts
/
((
double
)
e
->
s
->
size_gparts
)
:
0
.,
e
->
s
->
nr_sparts
?
e
->
s
->
nr_sparts
/
((
double
)
e
->
s
->
size_sparts
)
:
0
.,
e
->
s
->
nr_bparts
?
e
->
s
->
nr_bparts
/
((
double
)
e
->
s
->
size_bparts
)
:
0
.);
const
ticks
tic2
=
getticks
();
/* Update the global counters of particles */
...
...
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