optPilot Introduction
Large-scale multi- objective design optimization enables the automated identification of working points in high dimensional search and decision spaces. The design, commission, and operation of an accelerator facility is an excellent example of such a non-trivial problem.
Such a task involves significant computer modeling using accelerator simulation codes such as PSI’s OPAL (Object Oriented Parallel Accelerator Library) framework. Despite the fact that these codes are parallel, typical simulation parameters (e.g. a small number of macroparticles and mesh size) for individual runs, limit their scalability to several hundred or a few thousand processors. This represents a strong impediment in view of the petascale regime, therefore parallelisation on multiple levels, e.g. running multiple parallel sim- ulations in parallel, becomes a necessity. On the other hand, introducing a low-dimensional scalable model enables multi-resolution simulation runs.
optPilot is a general-purpose framework for simulation-based multi-objective optimization methods that allows the automatic investigation of optimal sets of parameters. The implementation is based on a master/slave paradigm, employing several masters and groups of workers to prevent communication hotspots at master processes. In addition, we exploit information about the underlying network topology when placing master processes and assigning roles. Solution states are exchanged between masters in a rumor routing fashion on a social network graph using one-sided communication. Using evolutionary algorithms and OPAL simulations as optimizer and for- ward solver in our framework, we demonstrate the feasibility and scalability of our approach on real applications in the domain of particle accelerators.
optPilot Documentation & Help
- PhD Thesis of Y. Ineichen
- arXiv:1302.2889
- Please use the OPAL mailing list opal@ … (opal AT lists.psi.ch) to discuss problems and issues. Add yourself to the mailing list
- A very short introduction to MOO moo-intro.pdf
FODO Example
Setup your environment on merlin:
export PATH=~adelmann/amas/bin:$PATH
The set of input files are located here: fodo.tgz
This is a very simple example of a food cell. We want to achieve in both the x and y plane a desired beam size.
OPTION, VERSION=10600;
REAL SOL = 2.9979246E8;
REAL Pcen = 100.0E6;
REAL BRho = Pcen/SOL;
REAL QK1 = 6.2519;
REAL QSTR = QK1*BRho/2.0;
REAL qb=77.0e-12;
REAL bfreq=1300.0E6;
REAL bcurrent=qb*bfreq;
QDX1: QUADRUPOLE, ELEMEDGE=0.0, L=0.10, K1=17.7 * BRho / 2;
QFX1: QUADRUPOLE, ELEMEDGE=0.91, L=0.20, K1=-17.5 * BRho / 2;
QDX2: QUADRUPOLE, ELEMEDGE=1.92, L=0.10, K1=17.5 * BRho / 2;
FODO_Full: LINE = (QDX1, QFX1, QDX2);
// SC calculations on:
Fs1:FIELDSOLVER, NONE = FFT, MX = 8, MY = 8, MT = 8,
PARFFTX = true, PARFFTY = true, PARFFTT = true,
BCFFTX = open, BCFFTY = open, BCFFTT = open,
BBOXINCR = 1, GREENSF = INTEGRATED;
Dist1:DISTRIBUTION, DISTRIBUTION=GAUSS,
sigmax=3E-3, sigmapx=1E-5,
sigmay=3E-3, sigmapy=1E-5,
sigmat=3E-3, sigmapt=1E-5, CORRX=0, CORRY=0, CORRT=0;
beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = 5000, BFREQ = bfreq,
BCURRENT = bcurrent, CHARGE = -1;
SELECT, LINE=FODO_Full;
TRACK, LINE=FODO_Full, BEAM=beam1, MAXSTEPS={6e5}, DT={1e-12}, ZSTOP={2.02};
RUN, METHOD = "PARALLEL-T", BEAM = beam1, FIELDSOLVER = Fs1, DISTRIBUTION = Dist1;
ENDTRACK;
QUIT;
With some random initial conditions we get the following solution
visualize_pf.py --objectives=%drmsx,%drmsy,%QDX1_K1 --path=results-fodo-new --generation=500_fodo.dat_0
Now adding optimiser statements:
// ---- OPTIMIZER SECTION -------
//dv0: DVAR, VARIABLE="QDX1_K1", LOWERBOUND="0", UPPERBOUND="35";
//dv1: DVAR, VARIABLE="QDX2_K1", LOWERBOUND="0", UPPERBOUND="35";
//dv2: DVAR, VARIABLE="QFX1_K1", LOWERBOUND="-35", UPPERBOUND="0";
//dvars: DVARS=(dv0,dv1,dv2);
//drmsx:OBJECTIVE,EXPR="fabs(sameSDDSVariableAt("rms_x",2.00) - 0.0000977)";
//drmsy:OBJECTIVE,EXPR="fabs(sameSDDSVariableAt("rms_y",2.00) - 0.0001833)";
//objs: OBJECTIVES=(drmsx,drmsy);
//constrs: CONSTRAINTS = ();
//opt: OPTIMIZE, OBJECTIVES = objs, DVARS = dvars, CONSTRAINTS = constrs;
Now look at the initial pareto front:
And the final Pareto front after 1000 generations:
optPilot for Developers: Coding Style and Conventions
- Coding Style and Conventions
- Download sources here use
ssh
when having git access orhtm
l for anonymous clone. - For PSI user go here to find out how to build on Merlin.