Page 1 of 2

&correct does not work

Posted: 13 Oct 2020, 06:02
by simone.dimitri
Dear Michael and everybody,
I am running an MBA lattice with the very latest version of Elegant.

Problem 1:
&correct does not produce outputs and the program stops without errors or warnings.
Only mode=trajectory + method=thread produces outputs (but correctors strengths are not saved).
Please notice that also with older lattice files, &correct seems to do nothing.

Problem 2:
If I add more and larger errors, I receive the message:
"particle acquired undefined slopes when integrating through kick multipole"
which, I understand, is signature of too large amplitudes, and has nothing to do with the definition of the multipoles.

Please find my files in attachment, with small errors.
Thank you in advance for your support. Cheers,
Simone

Re: &correct does not work

Posted: 14 Oct 2020, 15:49
by michael_borland
Simone,

The condition number for the response matrix inversion is 10^19, which will result in correctors running off to infinity.
Try adding

Code: Select all

minimum_SV_ratio[0] = 2*1e-4
to the &correct command.

Also, it will be much faster if you set

Code: Select all

use_response_from_computed_orbits = 0
-Michael

Re: &correct does not work

Posted: 16 Oct 2020, 01:55
by simone.dimitri
Thank you Michael for looking to this. I tried, but with no success.
I am still not totally convinced: all files I have, now present the same problem, and I am pretty sure they worked before I installed the very last release.
If you find the time, please also look to this linac lattice, for example. Again, the program stops at the computation of the correction matrix.
Might there be some new default parameter in &correct, which was set in a different manner in previous versions of Elegant? Still, I played with all of them anyway...

Re: &correct does not work

Posted: 19 Oct 2020, 16:53
by michael_borland
Simone,

I tried your input files and they worked as expected. A single step of correction was taken for x, then y.

I also tried with version 2019.4 and 2019.1, with the same results. It might be a platform-specific issue. I think an update was issued very recently for the latest Windows version, so perhaps that will help if you are using Windows.

--Michael

Re: &correct does not work

Posted: 20 Oct 2020, 11:02
by simone.dimitri
Correct Michael, &correct now works as expectd after installation of the very latest release of Elegant.
Many thanks for the check.
S.

Re: &correct does not work

Posted: 28 Oct 2020, 06:37
by simone.dimitri
Dear Michael,
another step forward. I would like to thread the beam first through the ring (&correct in trajectory mode and thread method), then refine the correction (&correct in orbit mode and global method). However, the thread mode does not save the corrector strengths, from which I would like to start my next correction step. Any hint to save the correctors' setting in thread mode? Thanks. S.

Re: &correct does not work

Posted: 28 Oct 2020, 14:06
by michael_borland
Simone,

You should be able to load the correctors from the parameter file for the previous stage, e.g.,

Code: Select all

&run_setup
  ...
   parameters = run1.param
&end
...
&correct
...
&end
...
&track
&end
The file run1.param will contain the steering strengths and every other numerical parameter of the lattice. The parameters of interest have names matching *KICK (e.g., HKICK, VKICK).

Code: Select all

&run_setup
 ...
&end

&load_parameters
 filename = run1.param
 include_item_pattern = "HKICK,VKICK,XKICK,YKICK,KICK"
&end
...
&correct
 prezero_correctors = 0
&end
...
Setting prezero_correctors=0 is essential so that elegant doesn't overwrite the corrector values that you loaded.

--Michael

Re: &correct does not work

Posted: 31 Mar 2021, 04:03
by Hwang, Ji-Gwang
Dear Michael

I have tried the posted example "run1.new and run2.ele" in Elegant version 2020.5 (Dec 11, 2020) as well as 2020.3 (Jul 30, 2020) but the &correct does not work on Windows PC.
It is terminated abnormally at the step of "computing correction matrix". Could you check the issue?

Best regards

Ji-Gwang Hwang

Re: &correct does not work

Posted: 21 Apr 2021, 16:15
by michael_borland
Ji-Gwang,

Please ensure that you have the latest version installed. I don't have any issues with this run.

--Michael

Re: &correct does not work

Posted: 20 Oct 2021, 14:43
by Benedikt.buesing
Hello all,

i have the same problem at the moment. I installed the newest version of elegant today

Code: Select all

Running elegant at Wed Oct 20 20:23:34 2021

This is elegant 2021.3.0, Sep 21 2021, by M. Borland, J. Calvey, M. Carla', N. C
armignani, AJ Dick, Z. Duan, M. Ehrlichman, L. Emery, W. Guo, R. Lindberg, V. Sa
jaev, R. Soliday, Y.-P. Sun, C.-X. Wang, Y. Wang, Y. Wu, and A. Xiao.
and if i run the run2.ele posted here before it ends with

Code: Select all

Found monitor BPM_PK_L4.7#1 (type MONI) at s=1.519136e+02
computing response matrix...
start   ET:     00:00:00 CP:    0.07 BIO:0 DIO:0 PF:0 MEM:0
done   ET:     00:00:00 CP:    0.08 BIO:0 DIO:0 PF:0 MEM:0
Computing correction matrix    ET:     00:00:00 CP:    0.08 BIO:0 DIO:0 PF:0 MEM
:0
but the output files are empty.
I am also using a windows computer, did anybody solved this problem or any idea what the problem might be?

Best regards,
Benedikt