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
0a8d34b7
Commit
0a8d34b7
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Removed initialisation of timers in the stand-alone FOF exec.
parent
67123550
No related branches found
No related tags found
1 merge request
!827
Improvement to the stand-alone FOF tool
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/main_fof.c
+11
-29
11 additions, 29 deletions
examples/main_fof.c
with
11 additions
and
29 deletions
examples/main_fof.c
+
11
−
29
View file @
0a8d34b7
...
...
@@ -53,11 +53,11 @@
struct
profiler
prof
;
/* Usage string. */
static
const
char
*
const
swift
_usage
[]
=
{
"
swift
[options] [[--] param-file]"
,
"
swift
[options] param-file"
,
"
swift
_mpi [options] [[--] param-file]"
,
"
swift
_mpi [options] param-file"
,
static
const
char
*
const
fof
_usage
[]
=
{
"
fof
[options] [[--] param-file]"
,
"
fof
[options] param-file"
,
"
fof
_mpi [options] [[--] param-file]"
,
"
fof
_mpi [options] param-file"
,
NULL
,
};
...
...
@@ -144,7 +144,6 @@ int main(int argc, char *argv[]) {
int
with_fp_exceptions
=
0
;
int
verbose
=
0
;
int
nr_threads
=
1
;
int
with_verbose_timers
=
0
;
char
*
output_parameters_filename
=
NULL
;
char
*
cpufreqarg
=
NULL
;
char
*
param_filename
=
NULL
;
...
...
@@ -178,8 +177,6 @@ int main(int argc, char *argv[]) {
"The number of threads to use on each MPI rank. Defaults to "
"1 if not specified."
,
NULL
,
0
,
0
),
OPT_INTEGER
(
'T'
,
"timers"
,
&
with_verbose_timers
,
"Print timers every time-step."
,
NULL
,
0
,
0
),
OPT_INTEGER
(
'v'
,
"verbose"
,
&
verbose
,
"Run in verbose mode, in MPI mode 2 outputs from all ranks."
,
NULL
,
0
,
0
),
...
...
@@ -192,7 +189,7 @@ int main(int argc, char *argv[]) {
OPT_END
(),
};
struct
argparse
argparse
;
argparse_init
(
&
argparse
,
options
,
swift
_usage
,
0
);
argparse_init
(
&
argparse
,
options
,
fof
_usage
,
0
);
argparse_describe
(
&
argparse
,
"
\n
Parameters:"
,
"
\n
See the file examples/parameter_example.yml for an "
"example of parameter file."
);
...
...
@@ -415,6 +412,10 @@ int main(int argc, char *argv[]) {
/* Initialise the hydro scheme */
hydro_props_init
(
&
hydro_properties
,
&
prog_const
,
&
us
,
params
);
/* Initialise the FOF properties */
bzero
(
&
fof_properties
,
sizeof
(
struct
fof_props
));
if
(
with_fof
)
fof_init
(
&
fof_properties
,
params
,
&
prog_const
,
&
us
);
/* Be verbose about what happens next */
if
(
myrank
==
0
)
message
(
"Reading ICs from file '%s'"
,
ICfileName
);
if
(
myrank
==
0
&&
cleanup_h
)
...
...
@@ -488,7 +489,7 @@ int main(int argc, char *argv[]) {
if
(
myrank
==
0
)
clocks_gettime
(
&
tic
);
space_init
(
&
s
,
params
,
&
cosmo
,
dim
,
parts
,
gparts
,
sparts
,
bparts
,
Ngas
,
Ngpart
,
Nspart
,
Nbpart
,
periodic
,
replicate
,
/*generate_gas_in_ics=*/
0
,
N_total
[
0
]
>
0
,
1
,
/*generate_gas_in_ics=*/
0
,
/*hydro=*/
N_total
[
0
]
>
0
,
/*gravity=*/
1
,
/*with_star_formation=*/
0
,
talking
,
/*dry_run=*/
0
);
...
...
@@ -538,24 +539,6 @@ int main(int argc, char *argv[]) {
fflush
(
stdout
);
}
/* Verify that each particle is in it's proper cell. */
if
(
talking
)
{
int
icount
=
0
;
space_map_cells_pre
(
&
s
,
0
,
&
map_cellcheck
,
&
icount
);
message
(
"map_cellcheck picked up %i parts."
,
icount
);
}
/* Verify the maximal depth of cells. */
if
(
talking
)
{
int
data
[
2
]
=
{
s
.
maxdepth
,
0
};
space_map_cells_pre
(
&
s
,
0
,
&
map_maxdepth
,
data
);
message
(
"nr of cells at depth %i is %i."
,
data
[
0
],
data
[
1
]);
}
/* Initialise the FOF properties */
bzero
(
&
fof_properties
,
sizeof
(
struct
fof_props
));
if
(
with_fof
)
fof_init
(
&
fof_properties
,
params
,
&
prog_const
,
&
us
);
/* Construct the engine policy */
int
engine_policies
=
ENGINE_POLICY
|
engine_policy_steal
;
engine_policies
|=
engine_policy_self_gravity
;
...
...
@@ -676,7 +659,6 @@ int main(int argc, char *argv[]) {
#endif
/* Clean everything */
if
(
with_verbose_timers
)
timers_close_file
();
cosmology_clean
(
&
cosmo
);
pm_mesh_clean
(
&
mesh
);
engine_clean
(
&
e
);
...
...
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