opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: "Snuverink Jochem (PSI)" <jochem.snuverink AT psi.ch>
- To: "Dr. Simon Friederich" <s.friederich AT uni-mainz.de>, "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
- Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
- Subject: Re: [Opal] Monitor output: Text file busy
- Date: Thu, 30 Apr 2020 07:12:14 +0000
- Accept-language: en-US, de-CH
Dear Simon,
The difference in behaviour between the different h5 files, is because they are treated slightly different internally in OPAL: if the Monitor file already exists it is deleted at initialisation (which triggers the error message in your case), while the main h5 file is not (since it might be appended to depending on your input file).
Sent: Wednesday, April 29, 2020 2:00 PM
To: Dr. Simon Friederich
Cc: opal AT lists.psi.ch
Subject: Re: [Opal] Monitor output: Text file busy
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 uni-mainz.de> 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.
Problem:
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,
Simon
-- ----------------------------------- 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 uni-mainz.de -----------------------------------
- [Opal] Monitor output: Text file busy, Dr. Simon Friederich, 04/29/2020
- Re: [Opal] Monitor output: Text file busy, Adelmann Andreas (PSI), 04/29/2020
- Re: [Opal] Monitor output: Text file busy, Snuverink Jochem (PSI), 04/30/2020
- Re: [Opal] Monitor output: Text file busy, Adelmann Andreas (PSI), 04/29/2020
Archive powered by MHonArc 2.6.19.