home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.fortran      Putting John Backus on a giant pedestal      5,130 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 5,130 of 5,130   
   Steven G. Kargl to Gary Scott   
   Re: Shared-memory implementation for coa   
   05 Mar 26 22:16:45   
   
   From: sgk@REMOVEtroutmask.apl.washington.edu   
      
   On Thu, 5 Mar 2026 16:03:13 -0600, Gary Scott wrote:   
      
   > On 3/5/2026 2:56 PM, Steven G. Kargl wrote:   
   >> All,   
   >>   
   >> The gfortran developers have added a shared-memory   
   >> implementation for coarray Fortran.  The forthcoming   
   >> GCC 16.1 will be the first release with this support.   
   >> This implementation sits on top an operating system's   
   >> pthread library (at least on Linux and BSD).   
   >>   
   >> To use it, one compile with   
   >>   
   >> % gfortran -fcoarray=lib -lcaf_shmem file.f90   
   >>   
   > Speaking of coarrays, I never did get a clear explanation of how to have   
   > a single instance of a GUI but with a coarray subsection (4 cores on   
   > Windows with the particular IVF and hardware I had) in the same process.   
   >   Within the same application i always got 4 copies of the GUI.  I could   
   > find no way to designate only certain threads were to be duplicated on   
   > the 4 cores, rather than the entire executable/program.  I ended up   
   > trying a coarray calculation engine and a separate GUI process that   
   > communicated with it via shared memory.  Is it possible within a single   
   > coarray application to have such fine control over what is delegated to   
   > each core?   
   >   
   > It worked with the separate GUI control, but for my application it only   
   > got about 10% performance improvement and was too difficult to support   
   > long term.   
      
   I don't know if one can get fine-grain control for a gui.   
   I don't use gui's.  All of programs are CLI only.  I would   
   guess that one could write the code to do   
      
      if (this_image == 1) then   
         ! Do GUI stuff here   
      end if   
      
   You need a 'sync all' on entry into the if block and exit.   
      
   PS: I forgot to mention, one may need to also add -lpthread   
   so the loader finds the pthread library.   
      
   --   
   steve   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca