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
2166fb0c
Commit
2166fb0c
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Don't allow runs with star particles over MPI
parent
ae21e481
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!310
Star particles and gparts links over MPI
,
!304
Star particle infrastructure
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/main.c
+11
-5
11 additions, 5 deletions
examples/main.c
with
11 additions
and
5 deletions
examples/main.c
+
11
−
5
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)
...
...
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