Skip to Content.
Sympa Menu

opal - Re: [Opal] Monitor output: Text file busy

opal AT

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Monitor output: Text file busy

Chronological Thread 
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT>
  • To: "Dr. Simon Friederich" <s.friederich AT>
  • Cc: "opal AT" <opal AT>
  • Subject: Re: [Opal] Monitor output: Text file busy
  • Date: Wed, 29 Apr 2020 12:00:08 +0000
  • Accept-language: en-US, de-CH

Dear Simon the 

mon1.h5 is closed when the OPAL simulation is terminating. 

It seams that while the mon1.h5 is open for write, you can not
read (file busy). If this is a bug or a feature is hard to say however to me it
sound logically that while a binary file is open one should not
try to read. 

I hope that helps.

Cheers A
Dr. sc. math. Andreas (Andy) Adelmann
Head a.i. Labor for Scientific Computing and Modelling 
Paul Scherrer Institut OHSA/ CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Zoom ID: 470-582-4086
Friday: ETH HPK G 28   +41 44 633 3076
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 

On 29 Apr 2020, at 13:20, Dr. Simon Friederich <s.friederich AT> wrote:

Dear OPAL-Team,

I use pyOPALTools in the following way (example.h5 = global .h5-file including all phase space information, mon1.h5 = monitor output):

    from opal.opal import load_dataset

    h5file = load_dataset(".", fname="example.h5")
    mon1 = load_dataset(".", fname="mon1.h5")

Which works perfectly well.

While having these commands executed in an interactive python shell or application, the OPAL terminal prints:

Error>     boost::filesystem::remove: Text file busy: "mon1.h5"

if I want to rerun the simulation simultanously.

Of course I understand what the error wants to tell me, but what I don't understand is, why does the global h5-file not lead to the error (or vice versa: why does the monitor output; both are of the same filetype after being instanciated). And following up: Can you tell me how to circumvent the locking. The "with open()"-like aproach "with load_dataset(...) as f: tmp = f" which normaly is used in such cases does not work due to an AttributError arising.

Thank you very much.

Best regards,


Dr. Simon Friederich
Helmholtz-Institut Mainz
Kollaboration B/ACID
Johannes Gutenberg-Universit├Ąt Mainz
Staudingerweg 18
55128 Mainz, Deutschland

Tel.: +49 (0)6131 39-23160
E-Mail: s.friederich AT

Archive powered by MHonArc 2.6.19.

Top of Page