Changeset 3832


Ignore:
Timestamp:
Jul 7, 2025, 11:32:55 AM (10 hours ago)
Author:
emillour
Message:

Common physics routines:
Somewhat related to r3829 about improving OpenMP:
Introduce a "fix" in buffer allocation for logicals in OpenMP
Tests in debug show that if the task is done by the MASTER
sometimes the buffer is not allocated (yet) but used by threads
whereas things go more smoothly if the task is done via SINGLE.
Maybe just a compiler (or debugger) bug?
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/phy_common/mod_phys_lmdz_omp_transfert.F90

    r3288 r3832  
    9696
    9797!$OMP BARRIER
    98 !$OMP MASTER
     98! Ehouarn: weirdly enough, despite the BARRIER above and after
     99! tests in debug show that if the task is done by the MASTER
     100! sometimes the buffer is not allocated (yet) but used by threads
     101! whereas things go more smoothly if the task is done via SINGLE
     102!$OMP SINGLE
    99103    IF (buff_size>size_l) THEN
    100104      IF (ALLOCATED(buffer_l)) DEALLOCATE(buffer_l)
     
    102106      ALLOCATE(buffer_l(size_l))
    103107    ENDIF
    104 !$OMP END MASTER
     108!$OMP END SINGLE
    105109!$OMP BARRIER
    106110 
Note: See TracChangeset for help on using the changeset viewer.