WATCH files aren't closed

Moderators: michael_borland, soliday

Post Reply
christoph_lechner
Posts: 2
Joined: 23 Aug 2011, 03:53

WATCH files aren't closed

Post by christoph_lechner » 02 Sep 2011, 06:50

Dear Michael,

I'm simulating a linear beam line containing lots of WATCH points.
My problem is that elegant aborts with the message

Error:
Unable to open file o/./keks-1018.wp for writing (SDDS_InitializeOutput)

At this time the maximum number of concurrently open files (=1023) is reached. Inspection of the elegant process reveals that the WATCH files remain open.

Is there some way to tell elegant that the files should be closed, or is this really a bug?
This behavior was verified with elegant 23.1.2 (Linux x64 and Mac) and 24.0.1 (Linux x64).

Regards,
Christoph

LTE File used
w: watch,filename="o/%s-%03ld.wp", disable=0
di: drift, l=1.5E-3
q1: quad, l=6E-3, k1=470
d1: drift, l=3E-3
q2: quad, l=6E-3, k1=-470
d2: drift, l=3E-3
q3: quad, l=6E-3, k1=-470
d3: drift, l=3E-3
q4: quad, l=6E-3, k1=470
df: drift, l=1.5E-3
q4x: quad, l=6E-3, k1=470, dx=50E-6
q4mx: quad, l=6E-3, k1=470, dx=-100E-6

! beamline constructed using the components above
bl2: line=(w,di,w,q1,w,d1,w,q2,w,d2,w,q3,w,d3,w,q4,w,df,w)
bl2k: line=(w,di,w,q1,w,d1,w,q2,w,d2,w,q3,w,d3,w,q4x,w,df,w)
bl2kk: line=(w,di,w,q1,w,d1,w,q2,w,d2,w,q3,w,d3,w,q4mx,w,df,w)
bl: line=(9*bl2,bl2k,bl2,bl2kk,95*bl2)

christoph_lechner
Posts: 2
Joined: 23 Aug 2011, 03:53

Re: WATCH files aren't closed

Post by christoph_lechner » 02 Sep 2011, 07:21

Hi all,

found out that use_disconnect=1 does the job.

But why does elegant keep the files open by default?

- Christoph

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: WATCH files aren't closed

Post by michael_borland » 02 Sep 2011, 07:54

Christoph,

The files are kept open by default because they may need to be written to again on multi-step runs.

--Michael

Post Reply