Implementation details

This commit is contained in:
Anthony Scemama 2024-04-02 11:54:42 +02:00
parent 90408541b5
commit 1505062cbb
1 changed files with 18 additions and 1 deletions

View File

@ -176,7 +176,7 @@ multiplications,\cite{form_w_abc} which are among the most efficient operations
executed on modern CPUs and
accelerators.\cite{ma_2011,haidar_2015,dinapoli_2014,springer_2018}
In the algorithm proposed by Rendell\cite{rendell_1991}, for each given triplet $(abc)$, the sub-tensors $W_{ijk}(abc)$ and $V_{ijk}(abc)$ are computed and immediately utilized to calculate their contribution to $E_{ijk}(abc)$. Here, we propose a similar approach but introduce a semi-stochastic algorithm to randomly select the triplets $(abc)$, circumventing the need to compute all contributions.
In the algorithm proposed by Rendell\cite{rendell_1991}, for each given triplet $(abc)$, the sub-tensors $W^{abc}$ and $V^{abc}$ are computed and immediately utilized to calculate their contribution to $E^{abc}$. Here, we propose a similar approach but introduce a semi-stochastic algorithm to randomly select the triplets $(abc)$, circumventing the need to compute all contributions.
%=================================================================%
\section{Semi-Stochastic Algorithm}
@ -206,6 +206,23 @@ In the algorithm proposed by Rendell\cite{rendell_1991}, for each given triplet
The algorithm was implemented in the \textsc{Quantum Package} software.
\cite{garniron_2019}
The stochastic algorithm is implemented using OpenMP tasks, where each task
consists in the computation of a single component $E^{abc}$.
The computation of the running average and statistical error is executed every second,
for printing or for exiting when the statistical error gets below a given threshold.
The number of samples $N^{abc}$ of each triplet $(abc)$ is initialized to $-1$, to identify
the contributions that have not been already computed.
An outer \emph{for} loop runs over the maximum number of iteration, equal to
$N_{abc}$, the number of different triplets $(abc)$.
Within a loop iteration, the index of the first non-computed triplet $(abc)$ is identified, and the task associated with its computation is sent to the task queue.
As this triplet has never been drawn, $N^{abc}$ is set to zero.
Then, a triplet $(abc)$ is drawn randomly.
If the $E^{abc}$ has not been computed (identified by $N^{abc}=-1$), the number of samples is set to zero and the task for the computation of this contribution is enqueued.
In any case, $N^{abc}$ is then incremented.
%a. Description of the computational framework and software used
%b. Discussion of any specific optimizations or parallelization techniques employed