From d09c5dd18384fb9bcfb1b993a9bbf76dd9c4ba67 Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 23 Nov 2020 17:27:18 +0100 Subject: [PATCH 1/8] This hack should fix it. --- src/mad_plot.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mad_plot.c b/src/mad_plot.c index b1c6e70c2..8f2fa12b7 100644 --- a/src/mad_plot.c +++ b/src/mad_plot.c @@ -133,6 +133,7 @@ exec_plot(struct in_cmd* cmd) struct table* p_table = NULL; const char *table_name = NULL, *file_name = NULL; char *last_twiss_table, *trackfile; + struct command* tmp_command; char track_file_name[NAME_L], ps_file_name[NAME_L]; char plot_title[TITLE_SIZE], version[TITLE_SIZE]; FILE *gpu; @@ -142,7 +143,13 @@ exec_plot(struct in_cmd* cmd) /* use correct beam for sequence to be plotted - HG 031127 */ struct command* keep_beam = current_beam; - if (attach_beam(current_sequ) == 0) + tmp_command = clone_command(this_cmd->clone); + if (attach_beam(current_sequ) == 0){ + char mychar [100] = "resbeam; neverusedsequencename632:sequence, l=10; q1:quadrupole, at=1; endsequence;"; + pro_input(mychar); + this_cmd->clone = clone_command(tmp_command); + } + if (attach_beam(current_sequ) == 0) fatal_error("PLOT - sequence without beam:", current_sequ->name); /* end part1 of HG 031127 */ From b3dbb40dbbf633b59b0122068061c61b57360bbc Mon Sep 17 00:00:00 2001 From: tpersson Date: Tue, 24 Nov 2020 16:47:49 +0100 Subject: [PATCH 2/8] Removing the check. --- src/mad_elem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mad_elem.c b/src/mad_elem.c index 1bfae9d1d..4160facb5 100644 --- a/src/mad_elem.c +++ b/src/mad_elem.c @@ -187,7 +187,7 @@ enter_elm_reference(struct in_cmd* cmd, struct element* el, int flag, int isupda current_node->from_name = permbuff(from); nupdates = 2; } - if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates); + //if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates); } static int From 562529f464fe4adbc9fb3246412feaf3546b80ed Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 12:04:43 +0100 Subject: [PATCH 3/8] Fixing the documentation for UPDATE in track. --- doc/latexuguide/thintrack.tex | 2 ++ src/mad_elem.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/latexuguide/thintrack.tex b/doc/latexuguide/thintrack.tex index 6b90dac52..7f0f47f2f 100644 --- a/doc/latexuguide/thintrack.tex +++ b/doc/latexuguide/thintrack.tex @@ -265,6 +265,8 @@ \section{TRACK} \ttitem{UPDATE} flag to trigger parameter update per turn. \\ (Default:~false) \\ + \textbf{Note} that \ttitem{tr\$macro} needs to be defined even if only the access + to the turn number \texttt{tr\$turni} is used. Specifying \texttt{UPDATE=true} gives access to the following additions: \begin{madlist} \ttitem{tr\$turni} this special variable contains the turn number; diff --git a/src/mad_elem.c b/src/mad_elem.c index 9028a9423..62533f9bb 100644 --- a/src/mad_elem.c +++ b/src/mad_elem.c @@ -187,7 +187,7 @@ enter_elm_reference(struct in_cmd* cmd, struct element* el, int flag, int isupda current_node->from_name = permbuff(from); nupdates = 2; } - //if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates); + if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates); } static int From cf414e70ae14ce0a151d2852b8fc5e1dbf1e3de4 Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 13:19:23 +0100 Subject: [PATCH 4/8] Include an update. --- .github/workflows/make.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index a525bb064..2455ba27b 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -41,6 +41,7 @@ jobs: - name: Install dependencies run: | set -ex + sudo apt-get update sudo apt-get install -qy \ libblas-dev \ liblapack-dev \ From 048b2e2a05127ac514516a2c84d011c323c5384a Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 13:35:11 +0100 Subject: [PATCH 5/8] Updating also for cmake --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a8083d635..ca778a79e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -131,6 +131,7 @@ jobs: - name: Install MAD-X build dependencies run: | + sudo apt-get update sudo apt-get install -qy \ libblas-dev \ liblapack-dev \ From 1f77b17f3d35113b515ea4a5c95e237358f1adc4 Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 13:58:52 +0100 Subject: [PATCH 6/8] Another update. --- .github/workflows/manylinux.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manylinux.yml b/.github/workflows/manylinux.yml index 241bdbdee..6041e0fcc 100644 --- a/.github/workflows/manylinux.yml +++ b/.github/workflows/manylinux.yml @@ -87,7 +87,9 @@ jobs: ln -sf bin/numdiff$ARCH . - name: Install runtime dependencies - run: sudo apt-get install -qy gnuplot + run: + sudo apt-get update + sudo apt-get install -qy gnuplot - name: Run tests # Skip 32bit build - it's broken and mind-boggelingly slow (>>2h)! From 152f36f133fc55fefb04fb09a969e5217dd92cf1 Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 15:00:55 +0100 Subject: [PATCH 7/8] into two lines. --- .github/workflows/manylinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manylinux.yml b/.github/workflows/manylinux.yml index 6041e0fcc..c8a3a0b28 100644 --- a/.github/workflows/manylinux.yml +++ b/.github/workflows/manylinux.yml @@ -88,7 +88,7 @@ jobs: - name: Install runtime dependencies run: - sudo apt-get update + sudo apt-get update \ sudo apt-get install -qy gnuplot - name: Run tests From 82598f7e9d80ca9a9a2dbedb01061a301b75e141 Mon Sep 17 00:00:00 2001 From: tpersson Date: Mon, 4 Jan 2021 15:18:19 +0100 Subject: [PATCH 8/8] Another fix for the lines.. --- .github/workflows/manylinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manylinux.yml b/.github/workflows/manylinux.yml index c8a3a0b28..0cd3aac37 100644 --- a/.github/workflows/manylinux.yml +++ b/.github/workflows/manylinux.yml @@ -87,7 +87,7 @@ jobs: ln -sf bin/numdiff$ARCH . - name: Install runtime dependencies - run: + run: | sudo apt-get update \ sudo apt-get install -qy gnuplot