Dear Michael,
thanks for your response and the explanation.
I tried your suggestion with FIDUCIAL="t,light" and yes, in that case the subsequent tracking satisfies the conditions from the optimization. To be on the safe side about the parameter "FIDUCIAL": does the case FIDUCIAL="t,light" mean, that the first cavity "starts to swing with the predefined phase", when a particle with speed of light would arrive the cavity?
Just to be sure to not misunderstand the fiducialization and timestamp effect in elegant: In my initial presented case (without FIDUCIAL="t,light"), I used eight cavities with eight different PHASE_REFERENCE values. In that case, the arrival time at cavity #2 changes as a function of the phase at cavity #1 since the particle velocity differs (self-evident) and therefore the global time at which cavity #2 "starts to swing with the predefined phase" (=arrival time of the electron bunch median at cavity #2) changes, and so on for the other cavities, correct?
In the first step of the optimization, elegant records the arrival time at each time-dependent element
But what if all cavities have the same PHASE_REFERENCE value? Do they not all start to swing at the same time (with their individual predefined phases) as soon as the electron bunch reaches the first cavity? Regardless of the phase of the first cavity? I think that is a tricky point. I.e., as long as one doesn't have time-influencing changes upstream the first cavity, one shouldn't see a difference, right?
So I tested another case with no specification for FIDUCIAL and all cavities have PHASE_REFERENCE=1. In that case I got the same big deviations like in my initial problem with eight different PHASE_REFERENCE values. But I did not expect that, since the issue you described ("elegant records the arrival time at each time-dependent element") should not occur now (if my described understanding is correct). Or is there still a function depending on the particle velocity and/or phase of cavity #1, even if all cavities have PHASE_REFERENCE=1 ? Is this another bug? I am not sure whether I understood the fiducialization/PHASE_REFERENCE function correctly.
Regarding this: does it make a difference to use the same time-dependent element several times or to use different defined elements with the same PHASE_REFERENCE, for example:
Code: Select all
A1SC01: RFTMEZ0, PHASE_REFERENCE=1, ...
beamline: line=(2*A1SC01)
vs
Code: Select all
A1SC01: RFTMEZ0, PHASE_REFERENCE=1, ...
A1SC02: RFTMEZ0, PHASE_REFERENCE=1, ...
beamline: line=(A1SC01,A1SC02)
?
My goal is to avoid a reference to speed of light particles. I am using RFTMEZ0 instead of RFCA in order to get the full influence of phase slippage since we have electrons with 5 MeV/c. When I use FIDUCIAL="t,light", do I still get a proper solution and my only problem then is to recalculate the phases from speed of light to the "slow" electrons, or is the phase slippage in that case not included?
Nevertheless, fixing the bug is the nicest solution, because then it will be easier to transfer the obtained optimal values to the real machine. Thanks in advance for fixing it.
-----------------------------------------------------------------------------------
There are a few more issues concerning FIDUCIAL:
- I can imagine the difference between FIDUCIAL="t,min" and FIDUCIAL="p,min".
But what is the difference between FIDUCIAL="t,first" and FIDUCIAL="p,first" or between FIDUCIAL="t,light" and FIDUCIAL="p,light"? And what is "first"? The first particle arriving or the first particle in the .bun file?
- I tried your suggestion and tried all FIDUCIAL options listed in the manual. Using elegant, all of the options {median|min|max|ave|first|light} are working fine. But using Pelegant, I found two problems (regardless of the number of threads (hereinafter for n=4)). I tried with
Windows 10 Education, elegant 2020.2.0, Microsoft MPI 9.0.12497.11
and
Debian GNU/Linux 9, elegant 34.4.1, HYDRA 3.2:
- Using FIDUCIAL="t,light" I get the error message
Code: Select all
Terminated by SIGSEGVProgram trace-back:
And the console is frozen. Aborting with Ctrl+C yields to the following message on Windows
Code: Select all
mpiexec aborting job...
job aborted:
[ranks] message
[0] process exited without calling finalize
[1-3] terminated
---- error analysis -----
[0] on DESKTOP-EGD1H4L
Pelegant ended prematurely and may have crashed. exit code 0
---- error analysis -----
and on Linux:
Code: Select all
^C[mpiexec@graka] Sending Ctrl-C to processes as requested
[mpiexec@graka] Press Ctrl-C again to force abort
simplexMin abort requested
simplexMin abort requested
simplexMin abort requested
simplexMin abort requested
^CCtrl-C caught... cleaning up processes
[proxy:0:0@graka] HYD_pmcd_pmip_control_cmd_cb (pm/pmiserv/pmip_cb.c:885): assert (!closed) failed
[proxy:0:0@graka] HYDT_dmxu_poll_wait_for_event (tools/demux/demux_poll.c:76): callback returned error status
[proxy:0:0@graka] main (pm/pmiserv/pmip.c:206): demux engine error waiting for event
[mpiexec@graka] HYDT_bscu_wait_for_completion (tools/bootstrap/utils/bscu_wait.c:76): one of the processes terminated badly; aborting
[mpiexec@graka] HYDT_bsci_wait_for_completion (tools/bootstrap/src/bsci_wait.c:23): launcher returned error waiting for completion
[mpiexec@graka] HYD_pmci_wait_for_completion (pm/pmiserv/pmiserv_pmci.c:218): launcher returned error waiting for completion
[mpiexec@graka] main (ui/mpich/mpiexec.c:344): process manager error waiting for completion
I am not sure if the error message are useful for you, but I usually see other messages when I abort Pelegant with Ctrl+C.
- Using FIDUCIAL="t,median" didn’t work. On Windows I got only
Code: Select all
job aborted:
[ranks] message
[0] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 2, comm rank 0
[1] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 2, comm rank 1
[2] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 2, comm rank 2
[3] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 2, comm rank 3
---- error analysis -----
[0-3] on DESKTOP-EGD1H4L
Pelegant aborted the job. abort code 2
---- error analysis -----
and ok on Linux I got the warning that "median" is not available for Pelegant:
Code: Select all
The median fiducial mode is not available in Pelegant.
application called MPI_Abort(MPI_COMM_WORLD, 2) - process 0
application called MPI_Abort(MPI_COMM_WORLD, 2) - process 1
application called MPI_Abort(MPI_COMM_WORLD, 2) - process 2
application called MPI_Abort(MPI_COMM_WORLD, 2) - process 3
But, if it is not available, what is the default setting for Pelegant if I do not specify FIDUCIAL, since "median" should be default according to the manual?
Please excuse my amount of questions. Things that once seemed clear to me suddenly raise big questions.
Thanks in advance and best regards,
Felix