Download presentation
Presentation is loading. Please wait.
Published byFerdinand Lang Modified over 8 years ago
1
Bug Elimination Ghislain Roy MAD-X Meeting 09 May 2014
2
REFPOS… Follow up of bug on sequence expansion fixed in summer 2013. Subsequence with REFPOS does not expand according to documented rules. Reported: email V. Kain 13/03/2014, TRAC# 257 Fixed: r4728 on 26/03/2014 Origin: no test for refpos. Solution: add test for refpos and adjust position accordingly.
3
if (p->p_sequ == NULL){ // simple element, not a subsequence p->share = top_sequ->share; add_to_node_list(p, 0, top_sequ->ex_nodes); } else { // subsequence if (p->p_sequ->refpos != NULL) { // REFPOS given for subsequence, ignore REFER of current sequence p = expand_node(p, top_sequ, p->p_sequ, p->position - nodesequ->ref_flag*p->p_sequ->length/2. ); } else { // no REFPOS given p = expand_node(p, top_sequ, p->p_sequ, p->position); }
4
Circular sequences In two instances, the sequences were assumed to be circular and seq_length was added to node_pos if node_pos was negative. Solution: remove test and addition statement. Two failed tests were corrected in MAD files by adding flatten statement before further sequence manipulations. Reported: ghislain during investigation of REFPOS bug. Not in TRAC.
5
THREADER… Trajectory or closed orbit threader reported as non-functional. Origin: threader was active during all steps of closed orbit search in subroutine tmclor, ie over many turns with accumulation of kicks turn after turn. Solution: switch off the threader option as soon as first turn is finished, ie after first call to tmfrst. Reported: priv. comm. Bernhard Holzer and J. Wenninger, 24 March 2014. TRAC# 260 Fixed: r4739 on April 7th 2014
6
!---- Iteration for closed orbit. iterate: do itra = 1, itmax !---- Track orbit and transfer matrix. call tmfrst(orbit0,orbit,fsec,ftrk,rt,tt,eflag,0,0,thr_on) if (eflag.ne.0) return ! 2014-Mar-28 20:41:21 ghislain: turn off the threader immediately after first iteration, ! ie first turn thr_on = 0 …
7
BEAM… BEAM, npart=1.e10; not only sets npart to 1.e10 but also resets CIRC and FREQ0 to zero. Origin: badly formed test in update_beam to extract CIRC from sequence length was always failing and CIRC and FREQ0 were reset to default zero values. Solution: removed attempt to extract CIRC from sequence and only update of CIRC and FREQ0 when one of the two is explicitly given Reported: email frs 16/10/2013, TRAC# 259 Fixed: rev. 4745 on April 9th 2014
8
// name contains the particle name (ie electron, proton…) if (nlc->inform[name_list_pos("circ", nlc)]) { circ = command_par_value("circ", comm); if (circ > zero) freq0 = (beta * clight) / (ten_p_6 * circ); } else if (nlc->inform[name_list_pos("freq0", nlc)]) { freq0 = command_par_value("freq0", comm); if (freq0 > zero) circ = (beta * clight) / (ten_p_6 * freq0); } else if ((pos = name_list_pos(name, sequences->list)) >= 0) { circ = sequence_length(sequences->sequs[pos]); freq0 = (beta * clight) / (ten_p_6 * circ); } … store_comm_par_value("npart", npart, current_beam); store_comm_par_value("bcurrent", bcurrent, current_beam); store_comm_par_value("freq0", freq0, current_beam); store_comm_par_value("circ", circ, current_beam); store_comm_par_value("beta", beta, current_beam); … if (nlc->inform[name_list_pos("circ", nlc)]) { circ = command_par_value("circ", comm); if (circ > zero) freq0 = (beta * clight) / (ten_p_6 * circ); // 2014-Apr-09 15:45:51 ghislain: update freq0 and circ only as necessary store_comm_par_value("freq0", freq0, current_beam); store_comm_par_value("circ", circ, current_beam); } else if (nlc->inform[name_list_pos("freq0", nlc)]) { freq0 = command_par_value("freq0", comm); if (freq0 > zero) circ = (beta * clight) / (ten_p_6 * freq0); // 2014-Apr-09 15:45:51 ghislain: update freq0 and circ only as necessary store_comm_par_value("freq0", freq0, current_beam); store_comm_par_value("circ", circ, current_beam); } … store_comm_par_value("npart", npart, current_beam); store_comm_par_value("bcurrent", bcurrent, current_beam); // store_comm_par_value("beta", beta, current_beam); …
9
PLOT axes Display of axis label works well for a single variable in a PLOT command but gives inconsistent results when multiple variables are plotted, sometimes not showing anything and sometimes showing a part of an obviously very long string. Origin: traced to a type mismatch between two subroutines Fixed: rev 4765 on 25th April
11
PLOT, interpolate Origin: INTERPOLATE option was not active for X, PX, Y, PY twiss table parameters. Instead cubic splines were used but only based on one variable. Eg: for plotting orbit, the constraint on slopes was not taken into account leading to « distorted » trajectories. Solution: add proper twiss parameter codes in interpolate table. Fixed: r4785 on May 5th Not the end of the story… problem with correctors…
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.