Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SOFI3D
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GPIAG-Software
SOFI3D
Commits
2c7d3af5
Commit
2c7d3af5
authored
Nov 17, 2016
by
Florian Wittkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed time measurement
parent
8b4f49df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
14 deletions
+29
-14
src/sofi3D.c
src/sofi3D.c
+29
-14
No files found.
src/sofi3D.c
View file @
2c7d3af5
...
...
@@ -121,11 +121,6 @@ int main(int argc, char **argv){
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
/* initialize clock for estimating runtime of program */
if
(
MYID
==
0
){
time1
=
MPI_Wtime
();
clock
();
}
/* print program name, version, author etc to stdout*/
if
(
MYID
==
0
)
info
(
stdout
);
...
...
@@ -768,13 +763,8 @@ int main(int argc, char **argv){
zb
[
0
]
=
1
;
zb
[
1
]
=
NZ
;
}
if
(
MYID
==
0
){
time2
=
MPI_Wtime
();
fprintf
(
FP
,
"
\n\n\n
**************************************************
\n
"
);
fprintf
(
FP
,
" *********** STARTING TIME STEPPING ***************
\n
"
);
fprintf
(
FP
,
" **************************************************
\n
"
);
fprintf
(
FP
,
" real time before starting time loop: %4.2f s.
\n
"
,
time2
-
time1
);
}
for
(
ishot
=
1
;
ishot
<=
nshots
;
ishot
++
){
...
...
@@ -829,6 +819,23 @@ int main(int argc, char **argv){
lsamp
=
NDTSHIFT
+
1
;
nlsamp
=
1
;
/* initialize clock for estimating runtime of program */
if
(
MYID
==
0
){
time1
=
MPI_Wtime
();
clock
();
}
if
(
MYID
==
0
){
time2
=
MPI_Wtime
();
fprintf
(
FP
,
"
\n\n\n
**************************************************
\n
"
);
fprintf
(
FP
,
" *********** STARTING TIME STEPPING ***************
\n
"
);
fprintf
(
FP
,
" **************************************************
\n
"
);
fprintf
(
FP
,
" real time before starting time loop: %4.2f s.
\n
"
,
time2
-
time1
);
}
for
(
nt
=
1
;
nt
<=
NT
;
nt
++
){
time_v_update
[
nt
]
=
0
.
0
;
...
...
@@ -978,6 +985,14 @@ int main(int argc, char **argv){
}
/* end of loop over timesteps */
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
if
(
MYID
==
0
){
fprintf
(
FP
,
"
\n
**Info from main (written by PE %d):
\n
"
,
MYID
);
time4
=
MPI_Wtime
();
fprintf
(
FP
,
" Total real time of the FD-Code: %4.2f seconds.
\n
"
,
time4
-
time1
);
}
fprintf
(
FP
,
"
\n\n
*********** Finish TIME STEPPING ****************
\n
"
);
fprintf
(
FP
,
" **************************************************
\n\n
"
);
...
...
@@ -1383,8 +1398,8 @@ int main(int argc, char **argv){
if
(
MYID
==
0
){
fprintf
(
FP
,
"
\n
**Info from main (written by PE %d):
\n
"
,
MYID
);
time4
=
MPI_Wtime
();
fprintf
(
FP
,
" Total real time of program: %4.2f seconds.
\n\n
"
,
time4
-
time1
);
time4
=
MPI_Wtime
();
fprintf
(
FP
,
" Total real time of program: %4.2f seconds.
\n\n
"
,
time4
-
time1
);
fprintf
(
FP
,
" ******************************************************
\n
"
);
fprintf
(
FP
,
" **************** SOFI3D has finished *****************
\n
"
);
fprintf
(
FP
,
" ******************************************************
\n\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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