From edc4fa1ecc9652af0f510ac719a2ee3998a4a4fe Mon Sep 17 00:00:00 2001 From: Kei Date: Wed, 12 Jul 2023 15:02:10 +0200 Subject: [PATCH] remove files from rank 0 only --- oasis/common/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oasis/common/io.py b/oasis/common/io.py index 53c4101..dd50a65 100644 --- a/oasis/common/io.py +++ b/oasis/common/io.py @@ -288,4 +288,5 @@ def merge_xml_files(files): base_tree.write(new_file[0], xml_declaration=True) # Delete xdmf file - [remove(f) for f in old_files] + if MPI.rank(MPI.comm_world) == 0: + [remove(f) for f in old_files]