From 6dd5767e25a2ae297d83f740b6da6580f75ef00b Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 25 Apr 2023 11:28:16 -0400 Subject: [PATCH] Improved file handling in coarray mode --- src/swiftest/swiftest_io.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index c36ce9b79..be96af345 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -3158,6 +3158,9 @@ module subroutine swiftest_io_write_frame_system(self, nc, param) nc%file_name = param%outfile if (lfirst) then inquire(file=param%outfile, exist=fileExists) +#ifdef COARRAY + if (this_image() /= 1) param%out_stat = 'APPEND' +#endif select case(param%out_stat) case('APPEND')