[Go to BBS]
All articles in a thread
SubjectSAD program memory allocation error
Article No1139
Date: 2014/01/11(Sat) 11:32:52
ContributorDavid Sagan < >
Hello:

Demin Zhou suggested I post to this list my problem. I am running SAD on a 64 bit Linux machine using gcc 4.6. I am not using X11, Tcl/Tk nor EPICS. No matter what input file I use, SAD bombs at the USE statement with a memory allocation error. An example run is listed below. Anyone have any ideas as to what to do?

-- Much Thanks, David



erpsim1:~/dcs16/sad/oldsad> ./bin/gs script/design_example.sad
*** Welcome to SAD Ver.1.0.10.5.5a43 built at 2014-01-10 21:11:57 -0500 ***
*** Today: 21:12:25 Friday 01/10/2014 ***
cpu time= 5.9980E-03(sec) dt= 5.998(msec) free area:: 1794
OFF LOG ECHO;READ 77 ; 23
cpu time= 6.9980E-03(sec) dt= 6.998(msec) free area:: 1794
cpu time= 6.9980E-03(sec) dt= 6.998(msec) free area:: 1793
cpu time= 6.9980E-03(sec) dt= 6.998(msec) free area:: 1793
cpu time= 6.9980E-03(sec) dt= 6.998(msec) free area:: 1793
!
! ***** DEFINITION OF ELEMENTS IN MAIN LEVEL *****
!
;
DRIFT L1 = (L = 1)
;
BEND B = (L = 2)
;
QUAD QF = (L = 1 K1 = 0.1 )
QD = (L = 1 K1 = -0.1 )
QSF = (L = 1 K1 = 0.1 )
QSD = (L = 1 K1 = -0.1 )
QRF = (L = 1 K1 = 0.1 )
QRD = (L = 1 K1 = -0.1 )
;
SEXT SF =(L = 1 K2 = 0.1)
SD =(L = 1 K2 = -0.1)
;
MARK IP1 =(BETAX = 10 BETAY =10 EMIX = 4.0E-7
EMIY = 4.0E-7 DP = 0.01 )
;
CAVI CA1 = (L = 1 VOLT=1 MV HARM=100)
;
!
! ***** DEFINITION OF UNIT CELL IN MAIN LEVEL *****
!
! You need at least one LINE to start FFS, but
! other lines can be created in FFS.
!
;
LINE CELL = (IP1 QF L1 SF L1 B 3*L1 QD L1 SD L1 B 3*L1)
;
FFS USE=CELL;
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbba95cd010 offset=0xff7752b3c10
lmalloc4: allocated chunk offset is out of range
base=0x2ef90 heap=0x7fbbab3cd010 offset=0xff775673c10
Memory Full, request: 4000001 1 2057144
STOP talocp@italoc.f

SubjectRe: SAD program memory allocation error
Article No1140
Date: 2014/01/11(Sat) 17:42:08
ContributorAnonymous
> Demin Zhou suggested I post to this list my problem. I am running SAD on a 64 bit Linux machine using gcc 4.6. I am not using X11, Tcl/Tk nor EPICS. No matter what input file I use, SAD bombs at the USE statement with a memory allocation error. An example run is listed below. Anyone have any ideas as to what to do?
>
SAD MAIN trunk assumes that malloc(3) returns 4GiB clipped virtual address.

SOLUTIONs
* Use k64-1-6 branch
* Use 32bit executable(cross-build, virtual machine, ...)
* Limit virtual memory address mapping(Modify kernel VM sub-system parameter or configure tuning knobs(if supported))
* Use another memory allocation API with address space limitation if available
For example, some operating system supports vendor dependent extension of 64bit mmap(2) system call
for limiting address space into 2GiB region.
Read src/sim/unix_memory_.c and mmap(2) online manual of your system.

SubjectRe^2: SAD program memory allocation error
Article No1141
Date: 2014/01/12(Sun) 06:44:27
ContributorDavid Sagan < >
OK from where do I download the k64-1-6 branch? The "CVS Access" page does not give any information on this.

-- Thanks, David



> > Demin Zhou suggested I post to this list my problem. I am running SAD on a 64 bit Linux machine using gcc 4.6. I am not using X11, Tcl/Tk nor EPICS. No matter what input file I use, SAD bombs at the USE statement with a memory allocation error. An example run is listed below. Anyone have any ideas as to what to do?
> >
> SAD MAIN trunk assumes that malloc(3) returns 4GiB clipped virtual address.
>
> SOLUTIONs
> * Use k64-1-6 branch
> * Use 32bit executable(cross-build, virtual machine, ...)
> * Limit virtual memory address mapping(Modify kernel VM sub-system parameter or configure tuning knobs(if supported))
> * Use another memory allocation API with address space limitation if available
> For example, some operating system supports vendor dependent extension of 64bit mmap(2) system call
> for limiting address space into 2GiB region.
> Read src/sim/unix_memory_.c and mmap(2) online manual of your system.

SubjectRe^3: SAD program memory allocation error
Article No1142
Date: 2014/01/14(Tue) 01:25:11
Contributoranonymous
> OK from where do I download the k64-1-6 branch? The "CVS Access" page does not give any information on this.
>
Use branch tag via -r option.
See also cvs(1) online manual.
You can check available branch tags by using log & status sub-command with -v option.

SubjectRe^4: SAD program memory allocation error
Article No1143
Date: 2014/01/14(Tue) 07:42:14
ContributorDavid Sagan < >
Unfortunately the -v option just shows the version of my CVS client (1.12.13) so I cannot determine what argument to use for the -r option. What to do?

-- Thanks, David

> > OK from where do I download the k64-1-6 branch? The "CVS Access" page does not give any information on this.
> >
> Use branch tag via -r option.
> See also cvs(1) online manual.
> You can check available branch tags by using log & status sub-command with -v option.

SubjectRe^5: SAD program memory allocation error
Article No1144
Date: 2014/01/14(Tue) 09:54:15
ContributorAnonymous
> Unfortunately the -v option just shows the version of my CVS client (1.12.13) so I cannot determine what argument to use for the -r option. What to do?
> 
Read ``status'' sub-command description of cvs(1) online manual.

===================================================================
File: MAIN.f            Status: Up-to-date

   Working revision:    1.960
   Repository revision: 1.960   /SAD/cvsroot/oldsad/src/MAIN.f,v
   Sticky Tag:          (none)
   Sticky Date:         (none)
   Sticky Options:      (none)

   Existing Tags:
        SAD_1_0_10_5_6a16               (revision: 1.960)
        SAD_1_0_10_5_6a15               (revision: 1.959)
        SAD_1_0_10_5_6a14               (revision: 1.958)
        SAD_1_0_10_5_6a13               (revision: 1.957)
        SAD_1_0_10_5_6a12               (revision: 1.956)
        SAD_1_0_10_5_6a11               (revision: 1.955)
        SAD_1_0_10_5_6a10               (revision: 1.954)
        SAD_1_0_10_5_6a9                (revision: 1.953)
        SAD_1_0_10_5_6a8                (revision: 1.952)

SubjectRe^6: SAD program memory allocation error
Article No1145
Date: 2014/01/14(Tue) 22:10:36
ContributorDavid Sagan < >
OK I was confused on this. Thanks for your help.

-- Best, David


> > Unfortunately the -v option just shows the version of my CVS client (1.12.13) so I cannot determine what argument to use for the -r option. What to do?
> >
> Read ``status'' sub-command description of cvs(1) online manual.
>
> ===================================================================
> File: MAIN.f Status: Up-to-date
>
> Working revision: 1.960
> Repository revision: 1.960 /SAD/cvsroot/oldsad/src/MAIN.f,v
> Sticky Tag: (none)
> Sticky Date: (none)
> Sticky Options: (none)
>
> Existing Tags:
> SAD_1_0_10_5_6a16 (revision: 1.960)
> SAD_1_0_10_5_6a15 (revision: 1.959)
> SAD_1_0_10_5_6a14 (revision: 1.958)
> SAD_1_0_10_5_6a13 (revision: 1.957)
> SAD_1_0_10_5_6a12 (revision: 1.956)
> SAD_1_0_10_5_6a11 (revision: 1.955)
> SAD_1_0_10_5_6a10 (revision: 1.954)
> SAD_1_0_10_5_6a9 (revision: 1.953)
> SAD_1_0_10_5_6a8 (revision: 1.952)