Lattice Optimization Using Jupyter Notebook on HPC Clusters

Tracy accelerator simulation library [1] was originally developed for the Advanced Light Source (ALS) design studies [2] at LBNL in the late 1980’s. It was originally written in Pascal [3], later ported to C++, and then to C# [4]. It is still actively updated and currently used by the ALS Upgrade Project (ALS-U) [5] to design and to optimize the lattice. Recently, it has been reconstructed to provide ease of use and flexibility by leveraging the quickly growing Python language. This paper describes our effort of porting it to Jupyter Notebook[6] on our institutional High-Performance Computing (HPC) clusters [7]. PERFORMANCE AND PRODUCTIVITY The most CPU-intensive part of the ALS-U design study is the optimization in the high-dimensional parameter space using the multi-objective genetic algorithm (MOGA)[8] on HPC clusters by using Tracy++ [9]. It is critical to have natively compiled code to maximize the runtime performance. But this approach may not be userfriendly enough since many scientists are not comfortable to deal with the complex tool-chain and software dependencies to compile the code. Python made this easy by providing an interactive environment and excellent scientific library support. By making C++ and Python work together properly, we can get a balance of performance and productivity. Productivity will be further increased when Tracy++ is used in the Jupyter Notebook, an interactive and computational environment which has been well recognized in scientific and engineering fields. Other advantages include the contextual readability, reproducibility, and mobility. For example, astropy [10] for astronomy is already a part of the Anaconda distribution [11]. There are also Jupyter Notebooks available for accelerator physics [12]. Our effort is to port Tracy++ API to Python in an automated environment, using Jupyter Notebook running on HPC clusters that hosts a Jupyter HUB [13]. TRACY++ FOR PYTHON We started with porting the Tracy API to Python, then migrated it to the HPC cluster.