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
25b1580f
Commit
25b1580f
authored
Nov 13, 2017
by
Matthieu Schaller
Browse files
Revert the reading of the parameter string to what it is in master.
parent
380f5a39
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
25b1580f
...
...
@@ -181,11 +181,8 @@ int main(int argc, char *argv[]) {
/* Parse the parameters */
int
c
;
char
parameters
[
200
]
=
"acCdDef:FgGhMn:P:sSt:Tv:y:Y:"
;
#ifdef SWIFT_DEBUG_CHECKS
strcat
(
parameters
,
"x"
);
#endif
while
((
c
=
getopt
(
argc
,
argv
,
parameters
))
!=
-
1
)
switch
(
c
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"acCdDef:FgGhMn:P:sSt:Tv:y:Y:"
))
!=
-
1
)
switch
(
c
)
{
case
'a'
:
#if defined(HAVE_SETAFFINITY) && defined(HAVE_LIBNUMA)
with_aff
=
1
;
...
...
@@ -206,7 +203,11 @@ int main(int argc, char *argv[]) {
with_drift_all
=
1
;
break
;
case
'e'
:
#ifdef HAVE_FE_ENABLE_EXCEPT
with_fp_exceptions
=
1
;
#else
error
(
"Need support for floating point exception on this platform"
);
#endif
break
;
case
'f'
:
if
(
sscanf
(
optarg
,
"%llu"
,
&
cpufreq
)
!=
1
)
{
...
...
@@ -382,11 +383,19 @@ int main(int argc, char *argv[]) {
/* Do we choke on FP-exceptions ? */
if
(
with_fp_exceptions
)
{
#ifdef HAVE_FE_ENABLE_EXCEPT
feenableexcept
(
FE_DIVBYZERO
|
FE_INVALID
|
FE_OVERFLOW
);
#endif
if
(
myrank
==
0
)
message
(
"WARNING: Floating point exceptions will be reported."
);
}
/* Do we have slow barriers? */
#ifndef HAVE_PTHREAD_BARRIERS
if
(
myrank
==
0
)
message
(
"WARNING: Non-optimal thread barriers are being used."
);
#endif
/* How large are the parts? */
if
(
myrank
==
0
)
{
message
(
"sizeof(part) is %4zi bytes."
,
sizeof
(
struct
part
));
...
...
@@ -693,9 +702,9 @@ int main(int argc, char *argv[]) {
/* Legend */
if
(
myrank
==
0
)
printf
(
"# %6s %14s %14s %1
0
s %1
0
s %1
0
s %16s [%s]
\n
"
,
"Step"
,
"Time"
,
printf
(
"# %6s %14s %14s %1
2
s %1
2
s %1
2
s %16s [%s]
%6s
\n
"
,
"Step"
,
"Time"
,
"Time-step"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
());
clocks_getunit
()
,
"Props"
);
/* File for the timers */
if
(
with_verbose_timers
)
timers_open_file
(
myrank
);
...
...
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