Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 16b3964c authored by albajacas_a's avatar albajacas_a
Browse files

Resolve "There is no test for MultiGauss distribution"

parent e4278128
No related branches found
No related tags found
No related merge requests found
Showing
with 638 additions and 0 deletions
......@@ -55,6 +55,7 @@ RegressionTests/Degrader-2/Degrader-2.h5
RegressionTests/Distribution-Binomial-1/Distribution-Binomial-1.h5
RegressionTests/Distribution-Gauss-1/Distribution-Gauss-1.h5
RegressionTests/Distribution-Gauss-2/Distribution-Gauss-2.h5
RegressionTests/Distribution-MultiGauss/Distribution-MultiGauss.h5
RegressionTests/EGunCTF3-1/EGunCTF3-1.h5
RegressionTests/EGunCTF3-2/EGunCTF3-2.h5
RegressionTests/Elliptic-1/ELCO.h5
......
OPTION, PSDUMPFREQ = 100000000;
OPTION, STATDUMPFREQ = 1000;
OPTION, BOUNDPDESTROYFQ=10; // Delete lost particles, if any
OPTION, VERSION=10900;
REAL REPARTFREQ=1000000;
Title, string="UNDULATOR";
//----------------------------------------------------------------------------
//Global Parameters
REAL rf_freq = 1.0; //RF frequency. (Hz)
REAL n_particles = 1e6; //Number of particles in simulation.
REAL beam_bunch_charge = .3e-09; //Charge of bunch. (C)
//Initial Momentum Calculation
REAL gamma = 43e-3 / EMASS; // Energy in GeV
REAL beta = sqrt(1-(1/gamma^2));
REAL P0 = gamma*beta*EMASS; //inital z momentum
//Printing initial energy and momentum to terminal output.
value , {gamma, P0};
// Drift in the beginning
DR1: DRIFT, L = .1, ELEMEDGE = 0.0;
DRIVE: Line = (DR1);
//----------------------------------------------------------------------------
// INITIAL DISTRIBUTION
Dist: DISTRIBUTION, TYPE = MULTIGAUSS,
SIGMAR = 1e-3,
SIGMAZ = 1e-4 / 2.355, // FWHM = 2.355 * sigma
CUTOFFLONG = 4.0, // In units of SIGZ
SEPPEAKS = 1.2e-4,
NPEAKS = 4;
//----------------------------------------------------------------------------
// Define Field solvers
// The mesh sizes should be a factor of 2
// for most efficient space charge calculation.
FS_SC: Fieldsolver, FSTYPE = FFT,
MX = 8, MY = 8, MT = 8, // SC grid size is 8^3
PARFFTX = true,
PARFFTY = true,
PARFFTT = true,
BCFFTX = open,
BCFFTY = open,
BCFFTT = open,
BBOXINCR = 1,
GREENSF = INTEGRATED;
//----------------------------------------------------------------------------
// Electron Beam Definition
BEAM1: BEAM, PARTICLE = ELECTRON, GAMMA = gamma, NPART = n_particles,
BFREQ = 1, BCURRENT = beam_bunch_charge * 1e6 , CHARGE = -1;
//----------------------------------------------------------------------------
// Simulate the beamline using TRACK and RUN.
TRACK, LINE = DRIVE, BEAM = BEAM1, MAXSTEPS = 1000000, DT = 1E-11, ZSTOP= 0.5;
RUN, METHOD = "PARALLEL-T", BEAM = BEAM1,
FIELDSOLVER = FS_SC, DISTRIBUTION = Dist;
ENDTRACK;
Quit;
#!/bin/bash
mpirun -np 4 $OPAL_EXE_PATH/opal Distribution-MultiGauss.in --commlib mpi --info 3 --warn 0 "$@" 2>&1
"Distribution-MultiGauss"
stat "rms_x" last 1E-7 #this is a comment
stat "rms_y" last 1E-7 #this is a comment
stat "rms_s" last 1E-7 #this is a comment
\ No newline at end of file
SDDS1
&description
text="Processor statistics 'Distribution-MultiGauss.in' 08/09/202011:35:04",
contents="lbal parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name="processor-0",
type=long,
units=1,
description="2 Number of particles of processor 0"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPAL 2.3.0 git rev. #40634beaad6e3b782bed353b206083821fbae5f4
opal-t
1.669999999999996e+00 1000000
156d1a9a1c4bba17e14dd80c9d61cbaa Distribution-MultiGauss.lbal
[merlin-l-001][[15151,1],0][/var/tmp/caubet_m/openmpi-3.1.6_slurm/src/opal/mca/btl/openib/btl_openib_component.c:1671:init_one_device] error obtaining device attributes for mlx5_0 errno says Protocol not supported
--------------------------------------------------------------------------
WARNING: There was an error initializing an OpenFabrics device.
Local host: merlin-l-001
Local device: mlx5_0
--------------------------------------------------------------------------
Ippl> CommMPI: Parent process waiting for children ...
Ippl> CommMPI: Initialization complete.
> ____ _____ ___
> / __ \| __ \ /\ | |
> | | | | |__) / \ | |
> | | | | ___/ /\ \ | |
> | |__| | | / ____ \| |____
> \____/|_| /_/ \_\______|
OPAL>
OPAL> This is OPAL (Object Oriented Parallel Accelerator Library) Version 2.3.0
OPAL> git rev. 40634beaad6e3b782bed353b206083821fbae5f4
OPAL>
OPAL>
OPAL> (c) PSI, http://amas.web.psi.ch
OPAL>
OPAL>
OPAL> The optimiser (former opt-Pilot) is integrated
OPAL>
OPAL> Please send cookies, goodies or other motivations (wine and beer ... )
OPAL> to the OPAL developers opal@lists.psi.ch
OPAL>
OPAL> Time: 11:33:58 date: 08/09/2020
OPAL>
OPAL> Couldn't find startup file "/psi/home/albajacas_a/init.opal".
OPAL> Note: this is not mandatory for an OPAL simulation!
OPAL>
OPAL> * Reading input stream "Distribution-MultiGauss.in".
OPAL>
OPAL> value: {GAMMA,P0} = {84.1489, 0.042997}
OPAL>
OPAL> * **********************************************************************************
OPAL> * Selected Tracking Method == PARALLEL-T, NEW TRACK
OPAL> * **********************************************************************************
Ippl> Creating new file for data: Distribution-MultiGauss.stat
Ippl> Creating new file for data: Distribution-MultiGauss.lbal
OPAL>
OPAL> * ************* D I S T R I B U T I O N ********************************************
OPAL> *
OPAL> * Number of particles: 1000000
OPAL> *
OPAL> * Distribution type: MULTIGAUSS
OPAL> *
OPAL> * SIGMAX = 1.000000e-03 [m]
OPAL> * SIGMAY = 1.000000e-03 [m]
OPAL> * SIGMAZ = 4.246285e-05 [m]
OPAL> * CUTOFFLONG = 4.000000e+00 [units of SIGMAZ]
OPAL> * SEPPEAKS = 1.200000e-04 [m]
OPAL> * NPEAKS = 4
OPAL> * SIGMAPX = 0.000000e+00 [Beta Gamma]
OPAL> * SIGMAPY = 0.000000e+00 [Beta Gamma]
OPAL> * SIGMAPZ = 0.000000e+00 [Beta Gamma]
OPAL> * CUTOFFPX = 3.000000e+00 [units of SIGMAPX]
OPAL> * CUTOFFPY = 3.000000e+00 [units of SIGMAPY]
OPAL> * CUTOFFPZ = 3.000000e+00 [units of SIGMAPZ]
OPAL> *
OPAL> * Distribution is injected.
OPAL> *
OPAL> * **********************************************************************************
OPAL>
OPAL> * ************* B E A M ************************************************************
OPAL> * BEAM BEAM1
OPAL> * PARTICLE ELECTRON
OPAL> * CURRENT 3.000000e-04 A
OPAL> * FREQUENCY 1.000000e+00 MHz
OPAL> * CHARGE -e * 1.000000e+00
OPAL> * REST MASS 5.109990e-04 GeV
OPAL> * MOMENTUM 4.299696e-02
OPAL> * NPART 1.000000e+06
OPAL> * **********************************************************************************
OPAL>
OPAL> * ************* F I E L D S O L V E R **********************************************
OPAL> * FIELDSOLVER FS_SC
OPAL> * TYPE FFT
OPAL> * N-PROCESSORS 1
OPAL> * MX 8.000000e+00
OPAL> * MY 8.000000e+00
OPAL> * MT 8.000000e+00
OPAL> * BBOXINCR 1.000000e+00
OPAL> * GRRENSF INTEGRATED
OPAL> * XDIM parallel
OPAL> * YDIM parallel
OPAL> * Z(T)DIM parallel
OPAL>
OPAL> * **********************************************************************************
OPAL>
OPAL>
OPAL> Size of map 2 sections
OPAL> Key: (0.000000 - 0.098925) number of overlapping elements 1
OPAL> DR1
OPAL> Key: (0.098925 - 0.500688) number of overlapping elements 0
OPAL>
Ippl> Creating new file for data: data/Distribution-MultiGauss_ElementPositions.sdds
OPAL>
OPAL> * ************** B U N C H *********************************************************
OPAL> * NP = 1000000
OPAL> * Qtot = 300.000 [pC] Qi = 0.300 [fC]
OPAL> * Ekin = 42.489 [MeV] dEkin = 0.000 [eV]
OPAL> * rmax = ( 1.00084 , 1.00044 , 0.34712 ) [mm]
OPAL> * rmin = ( -998.90638 , -999.14089 , -344.18927 ) [um]
OPAL> * rms beam size = ( 500.05490 , 500.07846 , 140.86421 ) [um]
OPAL> * rms momenta = ( 0.00000e+00 , 0.00000e+00 , 0.00000e+00 ) [beta gamma]
OPAL> * mean position = ( -0.00000 , 0.00000 , 0.00000 ) [um]
OPAL> * mean momenta = ( 0.00000e+00 , 0.00000e+00 , 8.41430e+01 ) [beta gamma]
OPAL> * rms emittance = ( 0.00000e+00 , 0.00000e+00 , 0.00000e+00 ) (not normalized)
OPAL> * rms correlation = ( 0.00000e+00 , 0.00000e+00 , -0.00000e+00 )
OPAL> * hr = ( 291.39157 , 291.36745 , 100.73340 ) [um]
OPAL> * dh = 1.00000e+00 [%]
OPAL> * t = 0.000 [fs] dT = 10.000 [ps]
OPAL> * spos = 0.000 [um]
OPAL> * **********************************************************************************
OPAL>
OPAL> Track start at: 11:34:00, t= 0.000 [fs]; zstart at: 0.000 [um]
OPAL> Executing ParallelTTracker, initial dt= 10.000 [ps];
OPAL> max integration steps 1000000, next step= 0
OPAL >
OPAL > * ************** B U N C H *********************************************************
OPAL > * NP = 1000000
OPAL > * Qtot = 300.000 [pC] Qi = 0.300 [fC]
OPAL > * Ekin = 42.489 [MeV] dEkin = 5.836 [keV]
OPAL > * rmax = ( 1.00360 , 1.00331 , 0.34712 ) [mm]
OPAL > * rmin = ( -1.00152 , -1.00200 , -0.34420 ) [mm]
OPAL > * rms beam size = ( 501.56662 , 501.59027 , 140.86897 ) [um]
OPAL > * rms momenta = ( 5.24333e-04 , 5.24356e-04 , 1.14208e-02 ) [beta gamma]
OPAL > * mean position = ( 0.00038 , 0.00007 , -0.00000 ) [um]
OPAL > * mean momenta = ( 1.28256e-07 , 2.31791e-08 , 8.41430e+01 ) [beta gamma]
OPAL > * rms emittance = ( 7.44989e-10 , 7.44898e-10 , 1.79828e-09 ) (not normalized)
OPAL > * rms correlation = ( 9.71177e-01 , 9.71190e-01 , 9.95567e-01 )
OPAL > * hr = ( 292.17051 , 292.19932 , 100.73520 ) [um]
OPAL > * dh = 1.00000e+00 [%]
OPAL > * t = 1.670 [ns] dT = 10.000 [ps]
OPAL > * spos = 500.000 [mm]
OPAL > * **********************************************************************************
OPAL >
OPAL> done executing ParallelTTracker at 11:35:05
OPAL> * End of input stream "Distribution-MultiGauss.in".
Timings> -----------------------------------------------------------------
Timings> Timing results for 1 nodes:
Timings> -----------------------------------------------------------------
Timings> mainTimer........... Wall tot = 66.428, CPU tot = 66.32
Timings>
Timings> Binaryrepart........ Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Boundingbox......... Wall max = 1.59274, CPU max = 1.54
Timings> Wall avg = 1.59274, CPU avg = 1.54
Timings> Wall min = 1.59274, CPU min = 1.54
Timings>
Timings> Boundingbox-bounds.. Wall max = 0.62952, CPU max = 0.52
Timings> Wall avg = 0.62952, CPU avg = 0.52
Timings> Wall min = 0.62952, CPU min = 0.52
Timings>
Timings> Boundingbox-update.. Wall max = 0.959706, CPU max = 1.02
Timings> Wall avg = 0.959706, CPU avg = 1.02
Timings> Wall min = 0.959706, CPU min = 1.02
Timings>
Timings> Compute Statistics.. Wall max = 6.1594, CPU max = 6.08
Timings> Wall avg = 6.1594, CPU avg = 6.08
Timings> Wall min = 6.1594, CPU min = 6.08
Timings>
Timings> ComputePotential.... Wall max = 0.0806861, CPU max = 0.07
Timings> Wall avg = 0.0806861, CPU avg = 0.07
Timings> Wall min = 0.0806861, CPU min = 0.07
Timings>
Timings> Create Distr........ Wall max = 1.26068, CPU max = 1.25
Timings> Wall avg = 1.26068, CPU avg = 1.25
Timings> Wall min = 1.26068, CPU min = 1.25
Timings>
Timings> External field eval. Wall max = 1.7929, CPU max = 1.95
Timings> Wall avg = 1.7929, CPU avg = 1.95
Timings> Wall min = 1.7929, CPU min = 1.95
Timings>
Timings> Fast inside test.... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Histogram........... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Initialize geometry. Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Inside test......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Load Distr.......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Particle Inside..... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Ray tracing......... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> SelfField total..... Wall max = 35.8603, CPU max = 35.77
Timings> Wall avg = 35.8603, CPU avg = 35.77
Timings> Wall min = 35.8603, CPU min = 35.77
Timings>
Timings> SF: GreensFTotal.... Wall max = 0.0565687, CPU max = 0.06
Timings> Wall avg = 0.0565687, CPU avg = 0.06
Timings> Wall min = 0.0565687, CPU min = 0.06
Timings>
Timings> TIntegration1....... Wall max = 2.95651, CPU max = 2.89
Timings> Wall avg = 2.95651, CPU avg = 2.89
Timings> Wall min = 2.95651, CPU min = 2.89
Timings>
Timings> TIntegration2....... Wall max = 8.21723, CPU max = 8.06
Timings> Wall avg = 8.21723, CPU avg = 8.06
Timings> Wall min = 8.21723, CPU min = 8.06
Timings>
Timings> WakeField........... Wall max = 0, CPU max = 0
Timings> Wall avg = 0, CPU avg = 0
Timings> Wall min = 0, CPU min = 0
Timings>
Timings> Write H5-File....... Wall max = 0.112137, CPU max = 0.09
Timings> Wall avg = 0.112137, CPU avg = 0.09
Timings> Wall min = 0.112137, CPU min = 0.09
Timings>
Timings> Write Stat.......... Wall max = 0.00403603, CPU max = 0
Timings> Wall avg = 0.00403603, CPU avg = 0
Timings> Wall min = 0.00403603, CPU min = 0
Timings>
Timings> -----------------------------------------------------------------
\ No newline at end of file
7550f8deef74c6221d1ed7903557d834 Distribution-MultiGauss.out
SDDS1
&description
text="Statistics data 'Distribution-MultiGauss.in' 08/09/2020 11:35:04",
contents="stat parameters"
&end
&parameter
name=processors,
type=long,
description="Number of Cores used"
&end
&parameter
name=revision,
type=string,
description="git revision of opal"
&end
&parameter
name=flavor,
type=string,
description="OPAL flavor that wrote file"
&end
&column
name=t,
type=double,
units=ns,
description="1 Time"
&end
&column
name=s,
type=double,
units=m,
description="2 Path length"
&end
&column
name=numParticles,
type=long,
units=1,
description="3 Number of Macro Particles"
&end
&column
name=charge,
type=double,
units=1,
description="4 Bunch Charge"
&end
&column
name=energy,
type=double,
units=MeV,
description="5 Mean Bunch Energy"
&end
&column
name=rms_x,
type=double,
units=m,
description="6 RMS Beamsize in x"
&end
&column
name=rms_y,
type=double,
units=m,
description="7 RMS Beamsize in y"
&end
&column
name=rms_s,
type=double,
units=m,
description="8 RMS Beamsize in s"
&end
&column
name=rms_px,
type=double,
units=1,
description="9 RMS Normalized Momenta in x"
&end
&column
name=rms_py,
type=double,
units=1,
description="10 RMS Normalized Momenta in y"
&end
&column
name=rms_ps,
type=double,
units=1,
description="11 RMS Normalized Momenta in s"
&end
&column
name=emit_x,
type=double,
units=m,
description="12 Normalized Emittance x"
&end
&column
name=emit_y,
type=double,
units=m,
description="13 Normalized Emittance y"
&end
&column
name=emit_s,
type=double,
units=m,
description="14 Normalized Emittance s"
&end
&column
name=mean_x,
type=double,
units=m,
description="15 Mean Beam Position in x"
&end
&column
name=mean_y,
type=double,
units=m,
description="16 Mean Beam Position in y"
&end
&column
name=mean_s,
type=double,
units=m,
description="17 Mean Beam Position in s"
&end
&column
name=ref_x,
type=double,
units=m,
description="18 x coordinate of reference particle in lab cs"
&end
&column
name=ref_y,
type=double,
units=m,
description="19 y coordinate of reference particle in lab cs"
&end
&column
name=ref_z,
type=double,
units=m,
description="20 z coordinate of reference particle in lab cs"
&end
&column
name=ref_px,
type=double,
units=1,
description="21 x momentum of reference particle in lab cs"
&end
&column
name=ref_py,
type=double,
units=1,
description="22 y momentum of reference particle in lab cs"
&end
&column
name=ref_pz,
type=double,
units=1,
description="23 z momentum of reference particle in lab cs"
&end
&column
name=max_x,
type=double,
units=m,
description="24 Max Beamsize in x"
&end
&column
name=max_y,
type=double,
units=m,
description="25 Max Beamsize in y"
&end
&column
name=max_s,
type=double,
units=m,
description="26 Max Beamsize in s"
&end
&column
name=xpx,
type=double,
units=1,
description="27 Correlation xpx"
&end
&column
name=ypy,
type=double,
units=1,
description="28 Correlation ypy"
&end
&column
name=zpz,
type=double,
units=1,
description="29 Correlation zpz"
&end
&column
name=Dx,
type=double,
units=m,
description="30 Dispersion in x"
&end
&column
name=DDx,
type=double,
units=1,
description="31 Derivative of dispersion in x"
&end
&column
name=Dy,
type=double,
units=m,
description="32 Dispersion in y"
&end
&column
name=DDy,
type=double,
units=1,
description="33 Derivative of dispersion in y"
&end
&column
name=Bx_ref,
type=double,
units=T,
description="34 Bx-Field component of ref particle"
&end
&column
name=By_ref,
type=double,
units=T,
description="35 By-Field component of ref particle"
&end
&column
name=Bz_ref,
type=double,
units=T,
description="36 Bz-Field component of ref particle"
&end
&column
name=Ex_ref,
type=double,
units=MV/m,
description="37 Ex-Field component of ref particle"
&end
&column
name=Ey_ref,
type=double,
units=MV/m,
description="38 Ey-Field component of ref particle"
&end
&column
name=Ez_ref,
type=double,
units=MV/m,
description="39 Ez-Field component of ref particle"
&end
&column
name=dE,
type=double,
units=MeV,
description="40 energy spread of the beam"
&end
&column
name=dt,
type=double,
units=ns,
description="41 time step size"
&end
&column
name=partsOutside,
type=double,
units=1,
description="42 outside n*sigma of the beam"
&end
&data
mode=ascii,
no_row_counts=1
&end
1
OPAL 2.3.0 git rev. #40634beaad6e3b782bed353b206083821fbae5f4
opal-t
1.669999999999996e+00 5.006180519134570e-01 1000000 -2.999999999960692e-10 4.248901147146854e+01 5.015703566855674e-04 5.015940108374535e-04 1.408689831825089e-04 5.243331748280753e-04 5.243562669084204e-04 1.142075097101782e-02 6.268560817656018e-08 6.267793818411121e-08 1.513125808895554e-07 3.822314429223886e-10 6.915133334456825e-11 -1.804217969891483e-12 0.000000000000000e+00 0.000000000000000e+00 5.006180519134570e-01 0.000000000000000e+00 0.000000000000000e+00 8.414295883499398e+01 1.003602232121907e-03 1.003319399313483e-03 3.471242506126186e-04 9.711775060297045e-01 9.711899967955003e-01 9.955673483234164e-01 3.313916675289808e-08 1.079223987587600e-05 2.985983911975861e-09 1.951383895632064e-06 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 5.835579654129191e-03 1.000000000000000e-02 0
c345bee2cf44597099678007139066f0 Distribution-MultiGauss.stat
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment