Skip to content

Commit f4ff6e6

Browse files
authored
Merge pull request #458 from MethodicalAcceleratorDesign/dev
sync master with dev
2 parents 58e4d3f + 3252733 commit f4ff6e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1337
-989
lines changed

bin

Submodule bin updated from 170b078 to 3b8ebb5

examples/ex-hllhc-fxxxx/ex-hllhc-fxxxx.mad

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ local function get_rdt(lhc, X0, rdt)
8989
collectgarbage() ; collectgarbage()
9090
local t0, m0 = os.clock(), collectgarbage("count")
9191

92-
local mtbl, mflw = twiss {sequence=lhc, X0=X0, trkrdt=rdt, info=2}
92+
local mtbl, mflw = twiss {sequence=lhc, X0=X0, trkrdt=rdt}
9393

9494
collectgarbage() ; collectgarbage()
9595
local t1, m1 = os.clock(), collectgarbage("count")
@@ -166,20 +166,14 @@ end
166166

167167
-- list of RDTs
168168

169-
local rdts = {
170-
"f40000000",
171-
"f40000010",
172-
"f40000020",
173-
"f40000001",
174-
"f40000002",
175-
"f40000011",
176-
}
177-
--[[
178169
local rdts = {
179170
"f4000",
180171
"f3100",
181172
"f2020",
182173
"f1120",
174+
}
175+
--[[
176+
local rdts = {
183177

184178
"f4000001",
185179
"f3100001",
@@ -190,6 +184,13 @@ local rdts = {
190184
"f31000001",
191185
"f20200001",
192186
"f11200001",
187+
188+
"f40000000",
189+
"f40000010",
190+
"f40000020",
191+
"f40000001",
192+
"f40000002",
193+
"f40000011",
193194
}
194195
--]]
195196

@@ -207,15 +208,15 @@ printf("** %s **\n", lhc.name)
207208
local knb = knbs[lhc.name]
208209

209210
-- create phase space damap at 5th order
210-
local X0 = damap{nv=6, mo=6, np=2, po=2, pn=knb}
211+
local X0 = damap{nv=6, mo=4}--, np=2, po=2, pn=knb}
211212

212-
MADX[knb[1]] = MADX[knb[1]] + X0[knb[1]]
213-
MADX[knb[2]] = MADX[knb[2]] + X0[knb[2]]
213+
--MADX[knb[1]] = MADX[knb[1]] + X0[knb[1]]
214+
--MADX[knb[2]] = MADX[knb[2]] + X0[knb[2]]
214215

215216
local mtbl = get_rdt(lhc, X0, rdts)
216217

217-
MADX[knb[1]] = X0[knb[1]]:get0()
218-
MADX[knb[2]] = X0[knb[2]]:get0()
218+
--MADX[knb[1]] = X0[knb[1]]:get0()
219+
--MADX[knb[2]] = X0[knb[2]]:get0()
219220

220221
-- RDTs at the end
221222
io.write("** RDTs@end\n")

examples/ex-lhc-f2002/ex-lhc-f2002.mad

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ match {
473473

474474
variables = vars,
475475
equalities = equs,
476-
objective = { bisec=3, rcond=1e-10, jstra=2 },
476+
objective = { bisec=3, rcond=1e-10, jstra=2, method="LD_MMA" },
477477
maxcall=250, info=4, -- debug=4
478478
}
479479

examples/ex-lhc-f2002/ex-lhc-f2002_paper.mad

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ local X0
322322
local function get_nf()
323323
local _, mflw = track {sequence=lhc, save=false, X0=X0}
324324
-- mflw[1]:get0():print("Orbit", 'line') -- uncomment to check orbit
325-
return normal(mflw[1]):analyse();
325+
return normal(mflw[1]):analyse('all');
326326
end
327327

328328
-- create phase space damap at 4th order

lib/README.lapack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: lapack 3.11.0
1+
Package: lapack 3.12.1
22

33
URL:
44
http://netlib.org/lapack

lib/README.libs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
LUAJIT 2.1, LPEG 1.0, LAPACK 3.8, FFTW 3.3, NFFT 3.5, NLOPT 2.6
1+
LUAJIT 2.1, LPEG 1.0, LAPACK 3.12, FFTW 3.3, NFFT 3.5, NLOPT 2.7
22

33
[see also README.libname for details]
44

5-
LUAJIT 2.1-beta3: lib/luajit
5+
LUAJIT 2.1.Rolling: lib/luajit
66
http://luajit.org
77

8-
LFS 1.7: lib/lfs
9-
https://keplerproject.github.io/luafilesystem/
8+
LFS 1.8: lib/lfs
9+
https://github.com/lunarmodules/luafilesystem
1010

11-
LPEG 1.0.2: lib/lpeg
11+
LPEG 1.1.0: lib/lpeg
1212
http://www.inf.puc-rio.br/~roberto/lpeg
1313

14-
LAPACK 3.8.0: lib/lapack
14+
LAPACK 3.12.1: lib/lapack
1515
http://www.netlib.org/lapack/
1616

1717
FFTW 3.3.8: lib/fftw3
1818
http://www.fftw.org
1919

20-
NFFT 3.5.1: lib/nfft3
20+
NFFT 3.5.3: lib/nfft3
2121
http://www.nfft.org
2222

23-
NLOPT 2.6.1: lib/nlopt
23+
NLOPT 2.7.1: lib/nlopt
2424
http://ab-initio.mit.edu/wiki/index.php/NLopt
2525

2626
TODO:

lib/README.lpeg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: lpeg-1.0.2
1+
Package: lpeg-1.1
22

33
Integrated into MAD github (i.e. git pull).
44

@@ -8,10 +8,10 @@ URL:
88
Retrieve:
99
cd lib
1010
+ get tarball from http://www.inf.puc-rio.br/~roberto/lpeg
11-
: wget http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz
11+
: wget http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz
1212
+ extract/uncompress tarball
13-
: tar xvzf lpeg-1.0.2.tar.gz
14-
ln -s lpeg-1.0.2 lpeg
13+
: tar xvzf lpeg-1.1.0.tar.gz
14+
ln -s lpeg-1.1.0 lpeg
1515

1616
Build:
1717
cd lpeg

lib/README.luajit

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: luajit 2.1-beta3
1+
Package: luajit 2.1-beta3 LuaJIT 2.1.1739192907
22

33
URL:
44
http://luajit.org
@@ -9,30 +9,28 @@ Retrieve:
99
cd luajit ; git checkout mad-patch ; git pull
1010
(should be Already up-to-date.)
1111

12-
Sync MAD fork:
12+
Sync LuaJIT fork:
1313
GitHub sync v2.1
1414
git checkout v2.1
1515
git pull
1616
git checkout mad-patch
1717
git merge v2.1
1818

1919
Build: retrieve | prepare | update
20-
[macosx] export MACOSX_DEPLOYMENT_TARGET=10.8
20+
[macosx] export MACOSX_DEPLOYMENT_TARGET=11
2121
make clean
2222
make amalg PREFIX=`pwd`
2323
make install PREFIX=`pwd`
24-
[unixes] mv bin/luajit-2.1.0-beta3 bin/luajit
2524
[macosx] cp src/libluajit.a ../../bin/macosx
2625
[linux] cp src/libluajit.a ../../bin/linux
27-
[msys64] mv bin/luajit-2.1.0-beta3.exe bin/luajit.exe
28-
" mkdir -p bin/lua
29-
" cp -a src/lua51.dll bin/
30-
" cp -a share/luajit-2.1.0-beta3/jit bin/lua/
31-
" cd src ; make libluajit.a ; cp libluajit.a ../../../bin/windows
26+
[msys64] mkdir -p bin/lua
27+
" cp -a src/lua51.dll bin/
28+
" cp -a share/luajit-2.1.Rolling/jit bin/lua/
29+
" cd src ; make libluajit.a ; cp libluajit.a ../../../bin/windows
3230

3331
Line for macosx (example):
3432
make clean ; make -j9 amalg PREFIX=`pwd` ; make install PREFIX=`pwd` ; \
35-
mv bin/luajit-2.1.0-beta3 bin/luajit ; cp src/libluajit.a ../../bin/macosx
33+
cp src/libluajit.a ../../bin/macosx
3634

3735
Update of lua modules in MAD src/:
3836
rm diff.out ; \

lib/README.nfft3

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Package: nfft 3.5.1
1+
Package: nfft 3.5.3
22

33
URL:
44
http://www.nfft.org
@@ -8,10 +8,10 @@ Depends: fftw3
88
Retrieve:
99
cd lib
1010
+ get tarball from http://www.nfft.org/download.php
11-
: wget http://www.nfft.org/download/nfft-3.5.1.tar.gz
11+
: wget http://www.nfft.org/download/nfft-3.5.3.tar.gz
1212
+ extract/uncompress tarball
13-
: tar xvzf nfft-3.5.1.tar.gz
14-
: ln -s nfft-3.5.1 nfft3
13+
: tar xvzf nfft-3.5.3.tar.gz
14+
: ln -s nfft-3.5.3 nfft3
1515

1616
from git (need libtoolize and autoreconf):
1717
http://github.com/NFFT/nfft

src/help/madh_json.mad

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--[=[
2+
o-----------------------------------------------------------------------------o
3+
|
4+
| Json module (help)
5+
|
6+
| Methodical Accelerator Design - Copyright (c) 2016+
7+
| Support: http://cern.ch/mad - mad at cern.ch
8+
| Authors: L. Deniau, laurent.deniau at cern.ch
9+
| Contrib: -
10+
|
11+
o-----------------------------------------------------------------------------o
12+
| You can redistribute this file and/or modify it under the terms of the GNU
13+
| General Public License GPLv3 (or later), as published by the Free Software
14+
| Foundation. This file is distributed in the hope that it will be useful, but
15+
| WITHOUT ANY WARRANTY OF ANY KIND. See http://gnu.org/licenses for details.
16+
o-----------------------------------------------------------------------------o
17+
]=]
18+
19+
local __help = {}
20+
21+
-- help -----------------------------------------------------------------------o
22+
23+
__help.json = [=[
24+
NAME
25+
json -- json encode and decode
26+
27+
SYNOPSIS
28+
29+
DESCRIPTION
30+
see https://github.com/rxi/json.lua
31+
32+
EXAMPLES
33+
34+
SEE ALSO
35+
]=]
36+
37+
-- end ------------------------------------------------------------------------o
38+
return __help

src/ljit_bc.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
----------------------------------------------------------------------------
22
-- LuaJIT bytecode listing module.
33
--
4-
-- Copyright (C) 2005-2022 Mike Pall. All rights reserved.
4+
-- Copyright (C) 2005-2025 Mike Pall. All rights reserved.
55
-- Released under the MIT license. See Copyright Notice in luajit.h
66
----------------------------------------------------------------------------
77
--
@@ -41,7 +41,6 @@
4141

4242
-- Cache some library functions and objects.
4343
local jit = require("jit")
44-
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
4544
local jutil = require("jit.util")
4645
local vmdef = require("ljit_vmdef")
4746
local bit = require("bit")

0 commit comments

Comments
 (0)