Skip to content

Commit

Permalink
Merge branch 'master' of github.com:studouglas/GEANT4-GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
studouglas committed Apr 19, 2016
2 parents d72216d + e5f2e26 commit 93b51eb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Binary file added Documentation/TestReport/Team8_TestReportMark.pdf
Binary file not shown.
Binary file modified Documentation/TestReport/TestReport.pdf
Binary file not shown.
24 changes: 23 additions & 1 deletion Documentation/TestReport/TestReport.tex
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ \section*{Definitions and Acronyms} % Matt
\end{tabularx}
\end{table}

\ds{Your table is in the wrong place for this heading. You might want to add some text in before the table (referencing it) to avoid an empty, floating heading.}

% =============================== Section =============================== % ------------------------- Rob
\section{Introduction}
Expand All @@ -156,6 +157,8 @@ \subsection{Scope of the Testing}
A basic knowledge of programming concepts and command-line tools is assumed, as well as familiarity with GEANT4.

\subsection{Organization}
\ds{Use refs for your section/figure/table numbering. That way they'll be auto-generated.}

In Section 4 we provide an introduction to this report. Section 5 describes the test cases which are carried out on each function. Section 6 describes system test cases that were carried out by our team. In section 7 traceability matrices to requirements and modules are documented. Section 8 provides a summary of changes made in response to the testing results.

\subsection{Usability Testing}
Expand Down Expand Up @@ -226,6 +229,8 @@ \subsection{Definition of Variables Used for Unit Testing}
\end{tabular}
\end{table}

\ds{Where do you define your tolerance?}

\subsection{void Init(istream \& aDataFile, G4int total, G4double ux, G4double uy)}
Initializes the data in the current vector with \texttt{total} data points from \texttt{aDataFile}. Each data
point is multiplied by factor \texttt{ux} for the x-value and \texttt{uy} for the y-value.
Expand Down Expand Up @@ -280,7 +285,8 @@ \subsection{G4ParticleHPVector \& operator = (const G4ParticleHPVector \& right)
\refstepcounter{TestCounter}\arabic{TestCounter}\label{OperatorEquals_0} & Current vector\\
\bottomrule
\end{tabular}
\end{table}
\end{table}

\subsubsection{Results}
\begin{table}[h]
\centering
Expand All @@ -293,6 +299,10 @@ \subsection{G4ParticleHPVector \& operator = (const G4ParticleHPVector \& right)
\bottomrule
\end{tabular}
\end{table}

\ds{The way this is written is very hard to understand. Can you explain it in more depth?
Or give a brief rundown of the system state, what the input to each parameter is, etc.?}

\subsubsection{Performance}
This method is not computationally heavy, so performance data was not included.

Expand Down Expand Up @@ -1086,6 +1096,12 @@ \subsection{G4double Get50percentBorder()}% Test Cases Done
\bottomrule
\end{tabular}
\end{table}

\ds{As an overall note: Please give each test case its own explicit explanation.
Seeing tables that say ``Test\#XX -- -- -- --" is not very intuitive or helpful.
Instead try something like ``Test\#XX (as a heading) then explain that
parameter1=-1, parameter2=xyz ..."
and explain the expected vs. actual output.}

\subsubsection{Performance}
\begin{figure}[H]
Expand All @@ -1094,6 +1110,8 @@ \subsection{G4double Get50percentBorder()}% Test Cases Done
\includegraphics[width=0.7\textwidth]{get50_bar.png}
\includegraphics[width=0.7\textwidth]{get50_line.png}
\end{figure}



% =============================== Section =============================== %
\section{System Tests}
Expand Down Expand Up @@ -1151,6 +1169,8 @@ \subsection{Summary of System Tests}
\end{table}
\end{center}

\ds{A boolean summary of whether the outputs were accurate (ie. ``Output is the same as CPU GEANT4" -- true/false could be useful instead of your current setup).}

\subsection{System Test - Water, 2000 events}
This test runs the Hadr04 example on both the GPU and the CPU. The code for the Hadr04 example is bundled with the GEANT4 installation.
\subsubsection{Accuracy}
Expand Down Expand Up @@ -1495,4 +1515,6 @@ \section{Changes after Testing}
Aside from the handling of edge cases with if guards, there was one more significant change required to get the unit tests to pass. An important control flow statement in \texttt{GetXSec(e,min)} was supposed to branch if the difference between two values was below a certain threshold. Our implementation was missing a call to get the absolute value for this difference, and as such was returning the wrong result in cases where the second value was larger than the first.\\

In terms of performance, some performance testing had been done prior to the development of the unit testing system. That profiling data led us to reimplement nearly every function on the GPU using a hybrid approach wherein the data values are stored in both GPU and CPU memory, are modified mainly on the GPU and then the version in CPU memory is updated only when required. This gave very large performance improvements, with the GPU code going from ~4.5X slower to ~1.2X slower for the Hadr04 example. Further performance tuning is planned for the future based on the results from individual unit tests.


\end{document}

0 comments on commit 93b51eb

Please sign in to comment.