[Go to BBS]
All articles in a thread
SubjectSAD New branch "k64-1-6"
Article No1026
Date: 2012/07/17(Tue) 16:29:38
ContributorK. Oide
Dear Users,

1. A new branch "k64-1-6" has been created to install a new allocation of objects. It will be more 64-bit savvy and more efficient in the space and time. It needs more debug, especially for EPICS-related things which are not easily debugged. A rough description is in src/inc/k64.readme:

- Any obeject specifier is embedded in the NaN space of IEEE real*8 format:

(integer8) kobj = (integer8) ktype + (integer8) kaddr;

where ktype is the type of object, with bit patterns defined in TFCODE.inc:

integer*8 ktfoper,ktflist,ktfstring,ktfsymbol,ktfpat,ktfobj,
$ ktfmask,ktamask,ktrmask,ktfnull,ktfnr,ktfref,ktfother,
$ ktomask
parameter (
$ ktfnull =int8(z'0000000000000000'),
$ ktfother =int8(z'0006000000000000'),
$ ktfnr =int8(z'0008000000000000'),
$ ktfoper =int8(z'0008000000000000'),
$ ktfref =int8(z'000e000000000000'),
$ ktfobj =int8(z'8008000000000000'),
$ ktflist =int8(z'8008000000000000'),
$ ktfpat =int8(z'800a000000000000'),
$ ktfstring=int8(z'800c000000000000'),
$ ktfsymbol=int8(z'800e000000000000'),
$ ktfmask =int8(z'fffe000000000000'),
$ ktomask =int8(z'fff8000000000000'),
$ ktrmask =int8(z'7ff8000000000000'),
$ ktamask =int8(z'0001ffffffffffff'))

- kaddr is the address ,ie. the object is stored at klist(kaddr). If ktype is an
operator (ktfoper), kaddr means the code of operator.

- A real*8 number x has a pattern iand(ktrmask, x) .ne. ktfnr .

- A list a is stored at klist(ka = ktfaddr(k)) as:

ilist(2,ka-1): Length[a], 32 bit.
klist(ka) : head, a[[0]]
klist(ka+1) : a[[1]]
klist(ka+2) : a[[2]]
....

- Sad's stack is allocated in a space ktastk, within 32 bit index.

- Lengths of list and string is less than 2**31.

- There are a few functions defined in TFSF.inc to handle the patterns.

SubjectRe: SAD New branch "k64-1-6"
Article No1027
Date: 2012/07/20(Fri) 09:00:10
ContributorK. Oide
Dear Users,

1. The bit patterns of the types are corrected to map to NaN. The pervious ones were mapping to subnormals, not NaN.

SubjectRe^2: SAD New branch "k64-1-6"
Article No1030
Date: 2012/07/20(Fri) 12:51:28
ContributorK. Oide
Dear Users,

1. Changes are summarized in src/inc/changelog.

SubjectRe: SAD New branch "k64-1-6"
Article No1037
Date: 2012/07/31(Tue) 11:33:24
Contributork. Oide
The compiler options in sad.conf in my case are as following:

SYS_FC_ABIOPT= -Wall -m64
_USE_GFORTRAN= YES
_USE_G95= NO
COMPILER=GNU
SYS_CC_ABIOPT= -Wall -std=gnu11 -m64
_SYS_COPT_GCC= -Wall -std=gnu11
CC=gcc-mp-4.7
FC=gfortran-mp-4.7

FOPT= -g -O3 -fno-second-underscore -fdollar-ok -fargument-alias -frecursive -fbackslash -std=legacy -fall-intrinsics -mtune=native -march=native -Wall -m64 -fno-range-check -fbacktrace -falign-functions=64 -falign-jumps -falign-loops -falign-labels
COPT= -g -O3 -Wall -std=gnu11 -m64

SubjectRe^2: SAD New branch "k64-1-6"
Article No1038
Date: 2012/07/31(Tue) 14:18:38
ContributorAkio Morita
My minimum sad.conf on FreeBSD/amd64(afsad*)

USE_GCC=4.8.0
FOPT+=-fno-range-check

SubjectRe^3: SAD New branch "k64-1-6"
Article No1039
Date: 2012/08/01(Wed) 20:05:36
ContributorS. Yoshimoto
My minimum sad.conf on OS X 10.8 (Mountain Lion)

USE_GCC=4.8.0
FOPT+=-fno-range-check -frecursive
COPT+=-Wno-variadic-macros

SubjectRe: SAD New branch "k64-1-6" Unicode support
Article No1042
Date: 2012/08/15(Wed) 04:49:16
Contributork. Oide
Dear Users,

1. The next version 1.0.10.6.1k64 will support the "KG sequence" such as "`fb`n`dx" using translation to Unicodes in the case of Xft.Some recent annoying behavior in Canvas, etc. will be solved, hopefully. As this change was made for the k64-1-6 branch, merging into the main branch may take for a while.

SubjectUpdate: Merging to main branch will come soon.
Article No1050
Date: 2012/09/06(Thu) 13:27:11
ContributorK. Oide
Dear Users,

As debugging of k64 has been done including EPICS, it will be merged to the main branch, probably in the next week. Of course nothing can be perfect anyway but it may be more efficient to debug involving more users....

Recent changes are listed below (src/inc/changelog):

7/19/2012
- Changed the way of embedding into NaN. Actually he previous one was wrongly mapped to subnormals, not to NaN.
- Scoping of the local symbol of With is modified to handle nested With's.
- Scoping of the argument of Function is modifyed to handle nested Function's.

7/20/2012
- Notation a&b is now interpreted as Function[a, b];

7/212012
- A bug in tfvars was corrected.
- Scoping is restricted only for local symbols of With and Fnction,
not for arguments of a function and module local variables.
- Some of NaN's generated by arithmetics may conflict with objects. Arithmetics may generate different patterns for NaN.

7/22/2012
- Mapping was again changed to handle NaN as a Real.
- Some internal symbols such as iaxfailed ($Failed) are treated as obejcts kxfailed.
- MemoryCheck is modified to check contexts.
- Wrong coding to generate Out was corrected.
- tfcomposeoper is changed to take care of a@b ... I wonder why it has been ignored...
- Now it looks to be able to run bench2.sad .

7/23/2012
- Scoping for With has been modified again.
- Generation of NaN in qbend is suppressed.
- value setting of elemnts in FFS has been re-enabled.

7/24/2012
- A bug in itforderl is corrrected to handle real lists properly.
- tfdapert is corrected to take damp ... why did it return to the old one without damp?
- resetting kerror is unified to tfreseterror.
- And[], Or[] with 0 arguments.
- A bug in FitValue for two points was corrected.
- A minimum value, 1e-12, is set for Tolerance of LinearSolve.
- A few places where tfree is called with int4 arg were corrected.
- ktrsvaloc is introduced to allocate permanent objects such as name table, etc.

7/25/2012
- Inverse renormalizes the matrix to correct the invalance of rows and columns.
- A small tweak in tfsortl to eliminate ktaloc.

7/30/2012
- Removed undefined variables in many .f sources.

8/2/2012
- Removed italoc from some routines.
- Introduced ktalocr, etc. to allocate perpament object from reserved area.

8/3/2012
- A bug in XListFonts was corrected.

8/5/2012
- Patched a hall found in tfree for a segment with size less than 7.
- A bug in calculating power of a negative number was fixed.

8/7/2012
- The behavior of Return in Do was corrected (return to upper function call).

8/12/2012
- A bug in USE (tfbeamlife.f) was corrected.

8/14/2012
- tfquotestring had a problem of string substitution.

8/15/2012
- Use unicode for Xft. tfTclArg does the translation from "KG" sequence.
- Overline (bovl) in tkFont.c has been inhibited, as it causes an error with TkCanvText & Xft.

8/16/2012
- initial value of drawX in Tk_KGDrawTextLayout is set to 0 to avide an error in TkCanvText.

8/17/2012
- The wake support has been corrected. It now works, hopefully.
- The length of pat is reduced to 9 from 10.

8/18/2012
- Removed unnnecessary ktfcopy in tfmodule.f.
- irtc is changed to -1 for too long string while printing to an actual file in flushstringbuf.
- Removed 'rc' functions to use recursve declatrations.
- Corrected some integer*4 in itfaloc.
- Use lmalloc8 instead of mfalloc in talocp.

8/19/2012
- Removed a few unused routines.
- Fixed bugs related to CODPLOT/EMIT.
- Implicit none for tffsa.

8/21/2012
- Change jtastk to itastk in tfeval.
- removed more unused variables.

8/23/2012
- A new function Attributes has been installed.
- itfunaloc unified the symbol and function definition table.
- An attribute OrderLess has been introduced for general functions.

8/25/2012
- ktaloc has been simplified using a boundary area after an allocated page.
- KBMainFrame's messages to use Message.
- Bugs in While, Cases, tfearray have been corrected.
- removed transfer intrinsic further.

8/26/2012
- corrected remained 'ntf' keywords in tfefun3ep, tfsameq, tfwrite, tspac
- corrected a bug in cascaded Power.
- reduced compiler warnings for implicit type conversions.
- PlotInterpolate was modified to handle MaxBend properly.
- itfextendstringbuf goes to integer*8

8/28/2012
- corrected the evaluation of Symbol overridden by Block and Table, etc.

8/29/2012
- Protect, Immediate, Numerical are moved to Attributes.
- convert a few commons to MODULE.
- inc/MACPARAM.inc has been created, separated from MACCBK.inc

8/30/2012
- change the way to access icGLR. icGLI becomes nonaccessible.
- Module checks the equal number of local symbols and their values in the list assignment.

9/1/2012
- TFSTK.inc moved to tfstk.f as a MODULE.
- tfconstqk uses ktfconstantq, looking attribute Constant.
- TFCBK.inc also moved into tfstk.f as a MODULE.
- defined type sad_symbol and sad_string.
- apply some array operations.

9/3/2012
- A bug in Twiss, calculating fraction of a component.
- ktfcopy1 has moved to TFSF.inc
- ktftype has been introduced in TFSF.inc

9/4/2012
- itfdownleve has been simplified
- corrected a bug in opcodehash to always initialize.
- corrected a bug in qfraccomp (created on 9/1).
- TFMEM.inc moved to MODULE tfmem.
- fixed a bug in replacesymbolstk since 9/1.

9/5/2012
- fixed bugs in CaSearch, CaSearch2, tfepicsconstabcb, etc.
- a new MODULE casym has been introduced.
- argument kh of tfdeval can be int8(0) if it is the defined symbol itself.

9/6/2012
- continued to fix bugs related to EPICS.

SubjectLength zero general list errata in k64
Article No1052
Date: 2012/09/11(Tue) 15:13:12
ContributorAkio Morita
Alternatives[]の評価値が、Real[-27]を返します

SubjectRe: Length zero general list errata in k64
Article No1056
Date: 2012/09/17(Mon) 09:02:48
ContributorK. Oide
対応しました(不達成動詞)。

> Alternatives[]の評価値が、Real[-27]を返します

SubjectProblem with GetMAIN and USE.
Article No1051
Date: 2012/09/09(Sun) 12:31:07
ContributorK. Oide
Dear Users,

1. The next version in k64 will fix a problem to cause an unpredictable error when GetMAIN redefines the same beam line which is currently used by FFS.

SubjectUpdate: V1.0.10.6.2.10k64
Article No1057
Date: 2012/09/27(Thu) 08:34:12
ContributorK. Oide
Dear Users,

1. The following changes have been made since Sept 6, 2012. You may see src/inc/changelog.

9/6/2012
- continued to fix bugs related to EPICS.
- added Element$P to cache Element.
- support CONVCASE in Element and LINE.

9/8/2012
- evalwitharg was changed to avoid crelistm, ktaloc.
- converted some computed go to's into select cases.
- restructured tfseval.
- fixed MaxBend in Plot to go an infinite loop.

9/9/2012
- modified tffindroot to avoid irregular NaN, etc.
- fixed an issue of GetMAIN to destruct the currently used LINE.
- replaced TFFSLOCAL.inc and TFFITCODE.inc by MODULEs ffslocal and tffitcode..

9/11/2012
- cvs update -jSAD_1_0_10_5_5a32 -jSAD_1_0_10_5_5a34
* Synchronize build framework with r4007
+ Drop GCC support for 4.2.x or prior
+ Drop HP-UX, OSF1 support
* Synchronize patch kit
+ Update libtai patch kit for ISO C99
+ Support Tcl/Tk 8.5.11 and 8.5.12
* Synchronize builtin extensions
+ Follow build framework update
+ Fix compiler warnings
* Remove backslash escape extension dependency
+ Remove backslash escape
+ Replace control character to C_* variable of ISO_C_BINDING module
- introduced derived types sad_symdef, sad_fun, sad_pat to rewrite using c/fortran pointers.

9/12/2012
- cvs update -jSAD_1_0_10_5_5a34 -jSAD_1_0_10_5_5a35
* Replace lnblnk with ISO Fortran standard len_trim
- cvs update -jSAD_1_0_10_5_5a35 -jSAD_1_0_10_5_5a36
* Remove RCS Header tags
- cvs update -jSAD_1_0_10_5_5a36 -jSAD_1_0_10_5_5a37
* Update document/configuration sample
* Introduce OPT_COPT

9/13/2012
- introduced new derived types sad_namtbl and some pointer handling functions ksad_loc, isad_loc,
namtbl_loc, pat_loc, sym_loc, and symdef_loc.

9/15/2012
- introduced derived types sad_deftbl and sad_defhash with subroutines deftbl_loc, sym_symdef, defhash_loc.
- sym%loc now points to ksad_locloc(symdef%next).
- modified loc functions to remove offset of the arguments.
- replace MACCBK.inc with a MODULE maccbk, removing equivalences.

9/16/2012
- rewrite ffsv to separte initialization of pointers.
- some m- and p-files are cancatenated into mbpm.f and palgn.f, respectively.
- fixed some mistakes in tfDynamicLink_.c
- introduced a new type sad_list and a function list_loc.
- fixed a bug in orderless matching.

9/17/2012
- Alternatives now returns proper results when # of arguments < 2.
- More conversions to sad_list type.

9/18/2012
- cvs update -jSAD_1_0_10_5_5a37 -jSAD_1_0_10_5_5a38
* Cleanup Tck/Tk patchkit

9/19/2012
- A bug in tfcleardef to confuse 'def' and 'dtbl' was corrected.

9/20/2012
- introduced a new type sad_strbuf with a new module strbuf to include routines for stringbuf.
- fixed a bug in FromCharacterCode to destruct the stack contents.

9/21/2012
- fixed a bug to make argument symbols unsolved in some cases of function evaluation.
- substrings are evaluated immediately if possible.
- fixed a bug to leave defhash%hash(0) uninitialized.
- use more sad_lists.

9/23/2012
- reverted the way of itfdownlevel, which was introduced on 9/4, to avoid issues with varying objects during evaluation, such as a={1,2,3,4};{a,a[[2]]=-1,a} .

9/24/2012
- reverted again itfdownlevel, by modifying tfconnect and tfsyeval. It should work for varying objects...
- SetPart now accepts setting to a definition, such as f[1][[2]] = 1 .
- modified tfdset's arguments.
- more sad_list, sad_symdef.

9/25/2012
- changed SetPart, ReplacePart, etc. to avoid unnecessary copying.
- moved all functions in TFSF.inc to MODULE tfstk.
- removed ivstkoffset by introducing itastk2, etc.

9/26/2012
- use ktfref for the original body of definition if compile is not necessary.
- introduced a new type sad_rlist and rlist_loc.
- introduced a new MODULE opdata .
- reduced appearance of ()'s in string representations of expressions to be more readable.