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
eb7310b6
Commit
eb7310b6
authored
Sep 25, 2016
by
James Willis
Browse files
Print which host each MPI rank is running on when the verbosity level is set to 2.
parent
92192f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
eb7310b6
...
...
@@ -262,13 +262,22 @@ int main(int argc, char *argv[]) {
message
(
"Executing a dry run. No i/o or time integration will be performed."
);
/* Report CPU frequency.
*/
/* Report CPU frequency.*/
cpufreq
=
clocks_get_cpufreq
();
if
(
myrank
==
0
)
{
message
(
"Running on: %s"
,
hostname
());
message
(
"CPU frequency used for tick conversion: %llu Hz"
,
cpufreq
);
}
/* Report host name(s). */
if
(
myrank
==
0
)
{
message
(
"Rank 0 Running on: %s"
,
hostname
());
}
#ifdef WITH_MPI
else
if
(
verbose
>
1
)
{
message
(
"Rank %d running on: %s"
,
myrank
,
hostname
());
}
#endif
/* Do we choke on FP-exceptions ? */
if
(
with_fp_exceptions
)
{
feenableexcept
(
FE_DIVBYZERO
|
FE_INVALID
|
FE_OVERFLOW
);
...
...
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