Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Micropp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ggiuntol
Micropp
Commits
147f24a2
Commit
147f24a2
authored
Sep 25, 2019
by
Guido Giuntoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating Doc and Benchmark-sol-ass
parent
533ec358
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
34 deletions
+40
-34
doc/Sections/benchmarks.tex
doc/Sections/benchmarks.tex
+29
-29
doc/manual.tex
doc/manual.tex
+3
-0
test/benchmark-sol-ass.cpp
test/benchmark-sol-ass.cpp
+8
-5
No files found.
doc/Sections/benchmarks.tex
View file @
147f24a2
...
...
@@ -9,7 +9,7 @@ Jacobian matrix and the solver (CGPD).
Basically the benchmark executes a tipical Newton-Raphson iteration:
\begin{lstlisting}
\begin{lstlisting}
[language=c++, backgroundcolor=
\color
{
lightgray
}
]
double norm = assembly
_
rhs
_
acc(u, nullptr, b);
#ifdef
_
OPENACC
...
...
@@ -30,43 +30,43 @@ Basically the benchmark executes a tipical Newton-Raphson iteration:
norm = assembly
_
rhs
_
acc(u, nullptr, b);
\end{lstlisting}
To execute this benchmark:
\begin{lstlisting}
[language=Bash,backgroundcolor=
\color
{
lightgray
}
]
./benchmark-sol-ass
\end{lstlisting}
\begin{figure}
[!htbp]
\centering
\begin{tikzpicture}
[]
\pgfplotsset
{
every tick label/.append style=
{
font=
\small
}}
\pgfplotstableread
{
data/benchmark-sol-ass-macintosh.dat
}{
\times
}
\begin{axis}
[
%
grid=major,
%
y unit=s,
%
legend pos=north west,
%
legend cell align={left},
%
ylabel=Computing Time,
% xlabel=Micro-r
esolution,
%
x unit=\# Elements,
% ymin = 0
,
% ymax = 600
,
% xtick = {0,20,40,60,80,100}
,
% xticklabels = {0,20\tst,40\tst,60\tst,80\tst,100\tst
},
% ytick = {0,200,400,600,800
},
grid=major,
y unit=s,
legend pos=north west,
legend cell align=
{
left
}
,
ylabel=Computing Time,
xlabel=Micro-Scale Mesh R
esolution,
x unit=
\#
Elements,
scaled y ticks=false
,
xmin=-1
,
ymin=-1
,
xtick =
{
0,20,40,60,80,100
}
,
xticklabels =
{
0,20
\tst
,40
\tst
,60
\tst
,80
\tst
,100
\tst
}
,
]
\addplot
[color=blue,mark=*,line width = 0.5mm] table [x index=
{
0
}
, y index=
{
1
}
]
{
\times
}
;
\addplot
[color=green,mark=*,line width = 0.5mm] table [x index=
{
0
}
, y index=
{
2
}
]
{
\times
}
;
% %{\times} [yshift=9pt]
% %node[pos=0.0,yshift=10pt] {36\%}
% %node[pos=0.105,yshift=11pt] {68\%}
% %node[pos=1.0] {79\%};
% %\addplot [color=blue ,mark=*,line width = 0.5mm] table [x={n1}, y expr=\thisrowno{2}*1.0e-6]
% %{\times} [yshift=9pt]
% %node[pos=0.0] {64\%}
% %node[pos=0.253,yshift=5pt] {32\%}
% %node[pos=1.0] {21\%};
% %\legend{Jacobian \& Residue Assembly}
\addplot
[color=blue,mark=*,line width = 0.5mm] table [x index=
{
0
}
, y
expr=
\thisrowno
{
1
}
*1.0e-3]
{
\times
}
;
\addplot
[color=green,mark=*,line width = 0.5mm] table [x index=
{
0
}
, y
expr=
\thisrowno
{
2
}
*1.0e-3]
{
\times
}
;
\legend
{
Jacobian
\&
Residue Assembly, Solver
}
\end{axis}
\end{tikzpicture}
% \caption{\label{fig:ass_vs_sol}
% Computing time used for the assembly of the Jacobian Matrix and the Residue vector and the solver
% algorithm of the Micropp code to perform the micro-scale FE calculation.
% }
\caption
{
\label
{
fig:ass
_
vs
_
sol
}
Computing time used for the assembly of the Jacobian Matrix and the Residue vector and
the solver algorithm of the Micropp code to perform the micro-scale FE
calculation in an Intel Core i7-3520M CPU 2.90GHz.
}
\end{figure}
\subsection
{
\texttt
{
benchmarks-cpu-gpu
}}
...
...
doc/manual.tex
View file @
147f24a2
...
...
@@ -16,6 +16,7 @@
\usepackage
{
xspace
}
\usepackage
{
listings
}
\usepackage
{
color
}
\usepackage
{
framed
}
\definecolor
{
dkgreen
}{
rgb
}{
0,0.6,0
}
\definecolor
{
gray
}{
rgb
}{
0.5,0.5,0.5
}
...
...
@@ -39,6 +40,8 @@ tabsize=4
%columns=flexible,
\hyphenation
{
op-tical net-works semi-conduc-tor
}
\newcommand
{
\ts
}{
\textsuperscript\xspace
}
\newcommand
{
\tst
}{
\textsuperscript
{
3
}
\xspace
}
\begin{document}
...
...
test/benchmark-sol-ass.cpp
View file @
147f24a2
...
...
@@ -103,16 +103,19 @@ class test_t : public micropp<3> {
auto
solver
=
duration_cast
<
milliseconds
>
(
time_6
-
time_5
);
auto
ass_tot
=
ass_res
.
count
()
+
ass_mat
.
count
();
auto
total
=
solver
.
count
()
+
ass_tot
;
double
percentage_ass
=
(
100.0
*
ass_tot
)
/
total
;
double
percentage_sol
=
(
100.0
*
solver
.
count
())
/
total
;
cout
<<
"ass_res : "
<<
ass_res
.
count
()
<<
" ms"
<<
endl
;
cout
<<
"ass_mat : "
<<
ass_mat
.
count
()
<<
" ms"
<<
endl
;
cout
<<
"ass_tot : "
<<
ass_
res
.
count
()
+
ass_mat
.
count
()
<<
" ms"
<<
endl
;
cout
<<
"ass_tot : "
<<
ass_
tot
<<
" ms"
<<
endl
;
cout
<<
"solver : "
<<
solver
.
count
()
<<
" ms"
<<
endl
;
auto
total
=
solver
.
count
()
+
ass_res
.
count
()
+
ass_mat
.
count
();
double
percentage_ass
=
(
double
)(
100
*
ass_res
.
count
()
+
ass_mat
.
count
())
/
total
;
double
percentage_sol
=
(
double
)(
100
*
solver
.
count
())
/
total
;
cout
<<
"ass : "
<<
percentage_ass
<<
" \% "
<<
"sol : "
<<
percentage_sol
<<
" \%"
<<
endl
;
cout
<<
"|r| : "
<<
norm
<<
endl
;
file
<<
nx
-
1
<<
"
\t
"
...
...
@@ -150,7 +153,7 @@ int main (int argc, char *argv[])
ofstream
file
;
file
.
open
(
"benchmark-sol-ass.dat"
);
file
<<
"N time_ass time_sol ass\% sol\%"
<<
endl
;
file
<<
"
#
N time_ass time_sol ass\% sol\%"
<<
endl
;
for
(
int
i
=
0
;
i
<
n_cases
;
++
i
)
{
mic_params
.
size
[
0
]
=
n
[
i
];
...
...
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