[PATCH 10/13] Coarray shared memory library

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Dear all, as requested,

See attached patch 10 of 13

Best Regards,

Jerry
pr88076_v4_10.diff (text/x-patch, 778 B)
commit e9167f3c14969fbb467804b222516b1a88496210
Author: Andre Vehreschild <[email protected]>
Date:   Thu Nov 20 12:52:24 2025 +0100

    Fortran: Sync coarray images on exit.
    
    libgfortran/ChangeLog:
    
            * caf/shmem.c (_gfortran_caf_finalize): Add a sync on the
            initial team on exit.

diff --git a/libgfortran/caf/shmem.c b/libgfortran/caf/shmem.c
index 446e5f54483..1ef36cde1ac 100644
--- a/libgfortran/caf/shmem.c
+++ b/libgfortran/caf/shmem.c
@@ -147,6 +147,8 @@ _gfortran_caf_finalize (void)
       caf_static_list = tmp;
     }
 
+  /* Make sure to wait for all images to finish.  */
+  sync_team (caf_initial_team);
   free_team_list (caf_current_team);
   caf_initial_team = caf_current_team = NULL;
   free_team_list (caf_teams_formed);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.