Skip to content
GitLab
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
2166fb0c
Commit
2166fb0c
authored
Jan 23, 2017
by
Matthieu Schaller
Browse files
Don't allow runs with star particles over MPI
parent
ae21e481
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
2166fb0c
...
...
@@ -274,6 +274,9 @@ int main(int argc, char *argv[]) {
/* Genesis 1.1: And then, there was time ! */
clocks_set_cpufreq
(
cpufreq
);
/* How vocal are we ? */
const
int
talking
=
(
verbose
==
1
&&
myrank
==
0
)
||
(
verbose
==
2
);
if
(
myrank
==
0
&&
dry_run
)
message
(
"Executing a dry run. No i/o or time integration will be performed."
);
...
...
@@ -286,13 +289,18 @@ int main(int argc, char *argv[]) {
/* Report host name(s). */
#ifdef WITH_MPI
if
(
myrank
==
0
||
verbose
>
1
)
{
if
(
talking
)
{
message
(
"Rank %d running on: %s"
,
myrank
,
hostname
());
}
#else
message
(
"Running on: %s"
,
hostname
());
#endif
#ifdef WITH_MPI
if
(
with_stars
)
error
(
"No support for stars over MPI for now. Buy Matthieu a drink first."
);
#endif
/* Do we have debugging checks ? */
#ifdef SWIFT_DEBUG_CHECKS
message
(
"WARNING: Debugging checks activated. Code will be slower !"
);
...
...
@@ -315,9 +323,6 @@ int main(int argc, char *argv[]) {
message
(
"sizeof(struct cell) is %4zi bytes."
,
sizeof
(
struct
cell
));
}
/* How vocal are we ? */
const
int
talking
=
(
verbose
==
1
&&
myrank
==
0
)
||
(
verbose
==
2
);
/* Read the parameter file */
struct
swift_params
*
params
=
malloc
(
sizeof
(
struct
swift_params
));
if
(
params
==
NULL
)
error
(
"Error allocating memory for the parameter file."
);
...
...
@@ -373,6 +378,7 @@ int main(int argc, char *argv[]) {
if
(
myrank
==
0
)
message
(
"Reading ICs from file '%s'"
,
ICfileName
);
fflush
(
stdout
);
/* Get ready to read particles of all kinds */
struct
part
*
parts
=
NULL
;
struct
gpart
*
gparts
=
NULL
;
struct
spart
*
sparts
=
NULL
;
...
...
@@ -415,7 +421,7 @@ int main(int argc, char *argv[]) {
if
(
gparts
[
k
].
type
==
swift_type_gas
)
error
(
"Linking problem"
);
}
#endif
/* Get the total number of particles across all nodes. */
long
long
N_total
[
3
]
=
{
0
,
0
,
0
};
#if defined(WITH_MPI)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment