Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock
Commits
4abaea1a
Commit
4abaea1a
authored
Feb 12, 2019
by
Leonardo Solis
Browse files
#52, improved stdout messages of kernels executed
parent
4722bb58
Changes
1
Hide whitespace changes
Inline
Side-by-side
host/src/performdocking.cpp
View file @
4abaea1a
...
...
@@ -611,7 +611,7 @@ filled with clock() */
kernel1_gxsize
=
blocksPerGridForEachEntity
*
threadsPerBlock
;
kernel1_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K
ernel1:
"
,
"gSize: "
,
kernel1_gxsize
,
"lSize: "
,
kernel1_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K
_INIT
"
,
"gSize: "
,
kernel1_gxsize
,
"lSize: "
,
kernel1_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel1
...
...
@@ -622,7 +622,7 @@ filled with clock() */
kernel2_gxsize
=
blocksPerGridForEachRun
*
threadsPerBlock
;
kernel2_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K
ernel2:
"
,
"gSize: "
,
kernel2_gxsize
,
"lSize: "
,
kernel2_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K
_EVAL
"
,
"gSize: "
,
kernel2_gxsize
,
"lSize: "
,
kernel2_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel2
...
...
@@ -664,7 +664,7 @@ filled with clock() */
kernel4_gxsize
=
blocksPerGridForEachEntity
*
threadsPerBlock
;
kernel4_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_G
ENETIC
_GENERATION
:
"
,
"gSize: "
,
kernel4_gxsize
,
"lSize: "
,
kernel4_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_G
A
_GENERATION"
,
"gSize: "
,
kernel4_gxsize
,
"lSize: "
,
kernel4_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel4
...
...
@@ -710,7 +710,7 @@ filled with clock() */
kernel3_gxsize
=
blocksPerGridForEachLSEntity
*
threadsPerBlock
;
kernel3_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_SOLIS
_
WETS
:
"
,
"gSize: "
,
kernel3_gxsize
,
"lSize: "
,
kernel3_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_
LS_
SOLISWETS"
,
"gSize: "
,
kernel3_gxsize
,
"lSize: "
,
kernel3_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel3
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"sd"
)
==
0
)
{
...
...
@@ -756,7 +756,7 @@ filled with clock() */
kernel5_gxsize
=
blocksPerGridForEachGradMinimizerEntity
*
threadsPerBlock
;
kernel5_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_GRAD_
MIN_SD:
"
,
"gSize: "
,
kernel5_gxsize
,
"lSize: "
,
kernel5_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_
LS_
GRAD_
SDESCENT
"
,
"gSize: "
,
kernel5_gxsize
,
"lSize: "
,
kernel5_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel5
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"fire"
)
==
0
)
{
...
...
@@ -801,7 +801,7 @@ filled with clock() */
kernel6_gxsize
=
blocksPerGridForEachGradMinimizerEntity
*
threadsPerBlock
;
kernel6_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_GRAD_
MIN_
FIRE
:
"
,
"gSize: "
,
kernel6_gxsize
,
"lSize: "
,
kernel6_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_
LS_
GRAD_FIRE"
,
"gSize: "
,
kernel6_gxsize
,
"lSize: "
,
kernel6_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel6
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"ad"
)
==
0
)
{
...
...
@@ -846,7 +846,7 @@ filled with clock() */
kernel7_gxsize
=
blocksPerGridForEachGradMinimizerEntity
*
threadsPerBlock
;
kernel7_lxsize
=
threadsPerBlock
;
#ifdef DOCK_DEBUG
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_GRAD_
MIN_AD:
"
,
"gSize: "
,
kernel7_gxsize
,
"lSize: "
,
kernel7_lxsize
);
fflush
(
stdout
);
printf
(
"%-25s %10s %8u %10s %4u
\n
"
,
"K_
LS_
GRAD_
ADADELTA
"
,
"gSize: "
,
kernel7_gxsize
,
"lSize: "
,
kernel7_lxsize
);
fflush
(
stdout
);
#endif
// End of Kernel7
}
...
...
@@ -854,21 +854,22 @@ filled with clock() */
// Kernel1
#ifdef DOCK_DEBUG
printf
(
"Start Kernel1 ... "
);
fflush
(
stdout
);
printf
(
"
\n
Execution starts:
\n\n
"
);
printf
(
"%-25s"
,
"
\t
K_INIT"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel1
,
kernel1_gxsize
,
kernel1_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
printf
(
" ... Finish
Kernel1
\n
"
);
fflush
(
stdout
);
printf
(
"
%15s"
,
"
... Finish
ed
\n
"
);
fflush
(
stdout
);
#endif
// End of Kernel1
// Kernel2
#ifdef DOCK_DEBUG
printf
(
"
Start Kernel2 ...
"
);
fflush
(
stdout
);
printf
(
"
%-25s"
,
"
\t
K_EVAL
"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel2
,
kernel2_gxsize
,
kernel2_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
printf
(
" ... Finish
Kernel2
\n
"
);
fflush
(
stdout
);
printf
(
"
%15s"
,
"
... Finish
ed
\n
"
);
fflush
(
stdout
);
#endif
// End of Kernel2
// ===============================================================================
...
...
@@ -900,7 +901,7 @@ filled with clock() */
{
#ifdef DOCK_DEBUG
ite_cnt
++
;
printf
(
"
\n
I
teration # %u
\n
"
,
ite_cnt
);
printf
(
"
\n
LGA i
teration # %u
\n
"
,
ite_cnt
);
fflush
(
stdout
);
#endif
...
...
@@ -919,7 +920,7 @@ filled with clock() */
// Kernel4
#ifdef DOCK_DEBUG
printf
(
"%-25s"
,
"K_G
ENETIC
_GENERATION
:
"
);
fflush
(
stdout
);
printf
(
"%-25s"
,
"
\t
K_G
A
_GENERATION"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel4
,
kernel4_gxsize
,
kernel4_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
...
...
@@ -931,7 +932,7 @@ filled with clock() */
if
(
strcmp
(
mypars
->
ls_method
,
"sw"
)
==
0
)
{
// Kernel3
#ifdef DOCK_DEBUG
printf
(
"%-25s"
,
"
K
_SOLIS
_
WETS
:
"
);
fflush
(
stdout
);
printf
(
"%-25s"
,
"
\t
K_LS
_SOLISWETS"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel3
,
kernel3_gxsize
,
kernel3_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
...
...
@@ -942,7 +943,7 @@ filled with clock() */
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"sd"
)
==
0
)
{
// Kernel5
#ifdef DOCK_DEBUG
printf
(
"%-25s"
,
"
K_GRAD_MIN_SD:
"
);
fflush
(
stdout
);
printf
(
"%-25s"
,
"
\t
K_LS_GRAD_SDESCENT
"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel5
,
kernel5_gxsize
,
kernel5_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
...
...
@@ -953,7 +954,7 @@ filled with clock() */
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"fire"
)
==
0
)
{
// Kernel6
#ifdef DOCK_DEBUG
printf
(
"%-25s"
,
"
K
_GRAD_
MIN_
FIRE
:
"
);
fflush
(
stdout
);
printf
(
"%-25s"
,
"
\t
K_LS
_GRAD_FIRE"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel6
,
kernel6_gxsize
,
kernel6_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
...
...
@@ -964,7 +965,7 @@ filled with clock() */
}
else
if
(
strcmp
(
mypars
->
ls_method
,
"ad"
)
==
0
)
{
// Kernel7
#ifdef DOCK_DEBUG
printf
(
"%-25s"
,
"
K_GRAD_MIN_AD:
"
);
fflush
(
stdout
);
printf
(
"%-25s"
,
"
\t
K_LS_GRAD_ADADELTA
"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel7
,
kernel7_gxsize
,
kernel7_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
...
...
@@ -982,11 +983,11 @@ filled with clock() */
// Kernel2
#ifdef DOCK_DEBUG
printf
(
"
Start Kernel2 ...
"
);
fflush
(
stdout
);
printf
(
"
%-25s"
,
"
\t
K_EVAL
"
);
fflush
(
stdout
);
#endif
runKernel1D
(
command_queue
,
kernel2
,
kernel2_gxsize
,
kernel2_lxsize
,
&
time_start_kernel
,
&
time_end_kernel
);
#ifdef DOCK_DEBUG
printf
(
" ... Finish
Kernel2
\n
"
);
fflush
(
stdout
);
printf
(
"
%15s"
,
"
... Finish
ed
\n
"
);
fflush
(
stdout
);
#endif
// End of Kernel2
// ===============================================================================
...
...
@@ -1072,7 +1073,7 @@ filled with clock() */
// ----------------------------------------------------------------------
#ifdef DOCK_DEBUG
printf
(
"Progress %.3f %%
\n
"
,
progress
);
printf
(
"
\t
Progress %.3f %%
\n
"
,
progress
);
fflush
(
stdout
);
#endif
}
// End of while-loop
...
...
Write
Preview
Supports
Markdown
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