diff --git a/hlrs_karl_magnus_2025/GCS-Template-project-application.tex b/hlrs_karl_magnus_2025/GCS-Template-project-application.tex index 3344aaf..6efea5d 100644 --- a/hlrs_karl_magnus_2025/GCS-Template-project-application.tex +++ b/hlrs_karl_magnus_2025/GCS-Template-project-application.tex @@ -9,6 +9,7 @@ \usepackage{scrlayer-scrpage} \usepackage{siunitx} \pagestyle{scrheadings} +\usepackage{url} \clearpairofpagestyles \textwidth 16 cm @@ -139,7 +140,6 @@ These particles then interact with the neutral background gas, which changes the The time until convergence is not known. Therefore it is necessary to estimate it.\\ It is clear that the convergence rate is dominated by the slowest particles in the system. In our case this will always be the ions, due to their much higher mass and roughly thermal distribution. Typical velocities of the ions are about \SI{500}{\m\per\s}. It is expected that an ion has to be able to at least traverse the simulation domain before any convergence could be reached. Due to the interactions however, it is to be expected that a multiple of that time will be needed.\\ For our case this results in a time of \SI{60}{\mu\s} for a single traversal. We use a factor of 10 for our estimate of the time until convergence. This factor is somewhat justified by earlier, smaller simulations of the system, that also imply a time for convergence of about \SI{0.6}{\milli\s}. -\textcolor{magenta}{Describe the actual parameters?} \subsubsection{Sub-project 2} %Run 2: if Run 1 not converged simulate longer otherwise different parameter set @@ -153,7 +153,7 @@ Therefore we plan on cross-checking the results obtained from KARL with the one- The overall goal are the same as for the first sub-project, i.e. we want to obtain the densities and current distributions of the different particle species. \subsubsection{Sub-project 4} The KARL tool directly yields the properties of interest as output. Therefore there is little to no post-processing of the data needed. It does, however, need visualization.\\ -Additionally, after each run the solution needs to be checked for convergence to an equilibrium state. This will be done by calculating the evolution of the total charge from the density output of the respective simulation run.\\ +However, after each run the solution has to be checked if convergence to an equilibrium state was achieved. This will be done by calculating the evolution of the total charge from the density output of the respective simulation run.\\ The main output of the Vlad code is the phasespace distribution at different times. Therefore it is necessary to apply a post-processing step, which extracts the properties of interest (density and current) as well as visualizes it. \\ % @@ -201,13 +201,12 @@ This approach depicts the physical reality more closely than the original one si The code used to cross-check the simulations gained through the Monte-Carlo approach is a direct simulation of the Vlasov-Poisson system of equations using the Vlad code \cite{josi2025}. In this approach the phase-space of one particle species is fully discretized in the spatial and velocity dimensions. Storing the full six dimensional grid is not possible some reductions have to be made. The Vlad code is therefore only concerned with a single spatial and velocity dimension.\\ The simulation cycle consists of three steps. The first step is an update of the phase-space density using the Vlasov equation. Since the Vlasov equation simply is an advection equation in spatial and velocity component a simple up-wind scheme is used for the update step during each timestep.\\ The seconds step is to obtain the total charge density of the system. This is done by an integration of the phase-space density in velocity direction and a multiplication with the charge of the species. Finally all individual charge densities are summed.\\ -The third step is to solve the Poisson equation. This is done by using the PetSc library. (\textcolor{magenta}{citation?})\\ +The third step is to solve the Poisson equation. This is done by using the PetSc library \cite{petsc-web-page}.\\ Due to the integration across the velocity direction the code is only parallelized in the spatial direction, in order to minimize the need for communication across processes. The code is parallelized purely with MPI.\\ Since collision processes have a large influence on the particles distributions Vlad also implements some collision processes. These processes are electron impact ionization and recombination. Therefore in each phase-space bin the value of particles scattered into another bin are calculated after the standard update step. There is still ongoing work to include more processes. - \textcolor{magenta}{Formeln?} %-------------------------------------------------------- \bigskip -%\newpage +\newpage \section{Computer Resources} \rule{\textwidth}{0.4pt} \subsection{Code performance and workflow} @@ -270,16 +269,14 @@ Since collision processes have a large influence on the particles distributions \includegraphics[width=1\textwidth]{Figures/parallelization.pdf} \end{center} % probably need to explain somewhere what "standard KATRIN parameters" are... -\caption{\label{fig_scaling}Weak scaling graph. Simulated using standard KATRIN parameters with in- -creasing number of events. The load was kept constant on the CPU cores. It was recorded how long the simulation took from start to finish, including output. The result of a single CPU core is used for prognosis of the ideal scaling. The simulations were performed on the bwForCluster NEMO. \textcolor{magenta}{citation?}} +\caption{\label{fig_scaling}Weak scaling graph. Simulated using standard KATRIN parameters with increasing number of events. The load was kept constant on the CPU cores. It was recorded how long the simulation took from start to finish, including output. The result of a single CPU core is used for prognosis of the ideal scaling. The simulations were performed on the bwForCluster NEMO.} \end{figure} \begin{figure}[H] \begin{center} \includegraphics[width=.7\textwidth]{Figures/weak_scaling_plot.pdf} \end{center} -% probably need to explain somewhere what "standard KATRIN parameters" are... -\caption{\label{fig:scalingVlad}Weak scaling of the Vlad code. \textcolor{magenta}{What, where?}} +\caption{\label{fig:scalingVlad}Weak scaling of the Vlad code on HAWK using standard KATRIN parameters.} \end{figure} %\textit{(1 to 2 pages)}\\ @@ -292,7 +289,7 @@ Since a large number of timesteps is required simulation runs will have to be re In terms of output KARL is quite lightweight. While output could hypothetically be created after every timestep it is not needed or beneficial to do so. For KARL output only needs to be created to be able to restart a simulation and after the total number of timesteps is done simulating. This means only two or three output steps are sufficient per simulation run for KARL.\\ For the time-resolved version of KARL, the only change is the increased number of synchronization steps. However, the cost of the communication stays small compared to the cost of the actual simulation of the particles themselves.\\ Many arrays within the KARL code use the blitz++ library to use slicing as well as vector and array operations. Furthermore the input file is required to be in the JSON format, and the code uses the jansson library to parse the input file.\\ -Vlad is also parallelized using pure MPI. The output is again managed through HDF5. Additionally Vlad requires the PetSc library for the solution of the one dimensional Poisson equation in the parallelized environment. \textcolor{magenta}{other requirements of Vlad, memory etc?} +Vlad is also parallelized using pure MPI. The output is again managed through HDF5. Additionally Vlad requires the PetSc library for the solution of the one dimensional Poisson equation in the parallelized environment. % --------------------------- table for estimating computing time %\begin{itemize} %\item scaling: plot from normal paper @@ -409,7 +406,9 @@ TOTAL & & & & & & & $30 \times 10^6$\\ The production runs of the first and second sub-project with KARL are planned to consist of $\approx \num{2e8}$ timesteps each. The spatial resolution is going to be $N_r = 10$ in radial and $N_z = 30$ in longitudinal direction. The energy will be resolved with $N_E = 100$ logarithmically spaced bins and the pitch angle will only consist of $N_\mu = 5$ bins, since the distributions are expected to be quite isotropic.\\ The number of injected electrons from beta decay is going to be in the order of \num{1e4} particles per timestep and core, however the exact number has a minor effect since the number of particles from the density field is going to dominate the computational time. The goal for the number of particles drawn from the density per timestep, core and bin is 1, which is equivalent to \num{1.5e5} particles per timestep and core.\\ From short test simulations with that setup using 126 cores on NEMO2 we obtain about \num{8e4} particles per CPU-s or about \SI{2}{\s} per simulated timestep. In total we estimate the required computer time to be \num{14e6} CPU-h for a single sub-project. Due to walltime limits we will have to do restart previous runs in order to achieve the desired number of total timesteps.\\ -\textcolor{magenta}{Vlad estimate?} +For the Vlad code, it is necessary to know the density of the charged species in order to set the spatial and temporal resolution correctly. The spatial resolution has to at least resolve the Debye length and the timestep has to at least resolve the plasma frequency of the electrons. Both quantity depend on the density of the electrons, which is an unknown. Therefore we assume a large value of the density of $n_e = \SI{1e14}{\per\cubic\cm}$.\\ +With this value we require 32768 cells in the spatial direction. The velocity resolution has no such restriction. Therefore we take 500 cells in velocity direction. The amount of timesteps needed is \num{2e7} in order to simulate the time until projected convergence.\\ +Due to the relatively small problem size and the fact that it is only a means for cross checking the KARL simulations, a lower number of cores is necessary. Therefore we will only use 2064 cores. In total we estimate a value of 2 MCPU-h for the Vlad simulations. %------------------------------------------------- %\begin{itemize} @@ -424,7 +423,7 @@ From short test simulations with that setup using 126 cores on NEMO2 we obtain a %\end{itemize} %------------------------------------------------- - +\newpage \section{Resource Management and Work Schedule} \rule{\textwidth}{0.4pt} \subsection{Resource management} @@ -433,8 +432,7 @@ From short test simulations with that setup using 126 cores on NEMO2 we obtain a %\textit{(0.5 to 1 page)} Since the parameters of the problem are known the parameter files for the simulation are prepared in advance and need only minor adjustments with regards to the number of processes used for the specific simulation.\\ -After each run the output will be checked for convergence. This will be done by comparing two density distributions directly as well as by checking whether the total charge of the system is growing or not.\\ -\textcolor{magenta}{Vlad?} +After each run the output of KARL will be checked for convergence. This will be done by comparing two density distributions directly as well as by checking whether the total charge of the system is growing or not.\\ \subsection{Work schedule} %\textit{Provide tables and Gantt charts for a clear presentation of the work schedule, structured in sub-projects, if applicable.} @@ -448,7 +446,7 @@ Once the first sub-project has reached the desired amount of tiemsteps. The seco The second sub-project uses the same workflow as the first one. \subsubsection{Sub-project 3} -\textcolor{magenta}{Vlad?} +Once the first sub-project is finished the final density of the electrons is either known or can at least be estimated to a better degree. With this knowledge the parameter files for Vlad can be created and the simulation performed. \subsubsection{Sub-project 4} Post-processing will be done once a single sub-project is finished, in order to prepare the final data.\\ diff --git a/hlrs_karl_magnus_2025/references.bib b/hlrs_karl_magnus_2025/references.bib index c55146d..9a16248 100644 --- a/hlrs_karl_magnus_2025/references.bib +++ b/hlrs_karl_magnus_2025/references.bib @@ -125,3 +125,19 @@ author = {Masayuki Nakahata}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@Misc{petsc-web-page, + author = {Satish Balay and Shrirang Abhyankar and Mark~F. Adams and Steven Benson and Jed + Brown and Peter Brune and Kris Buschelman and Emil~M. Constantinescu and Lisandro + Dalcin and Alp Dener and Victor Eijkhout and Jacob Faibussowitsch and William~D. + Gropp and V\'{a}clav Hapla and Tobin Isaac and Pierre Jolivet and Dmitry Karpeev + and Dinesh Kaushik and Matthew~G. Knepley and Fande Kong and Scott Kruger and + Dave~A. May and Lois Curfman McInnes and Richard Tran Mills and Lawrence Mitchell + and Todd Munson and Jose~E. Roman and Karl Rupp and Patrick Sanan and Jason Sarich + and Barry~F. Smith and Stefano Zampini and Hong Zhang and Hong Zhang and Junchao + Zhang}, + title = {{PETS}c {W}eb page}, + url = {https://petsc.org/}, + howpublished = {\url{https://petsc.org/}}, + year = {2024} +} +