Changeset 469 for codes/icosagcm/trunk


Ignore:
Timestamp:
09/05/16 12:07:12 (8 years ago)
Author:
ymipsl
Message:

Repairing openMP --> domain_update

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/geometry.f90

    r427 r469  
    367367    INTEGER :: ind,i,j,k,n 
    368368    TYPE(t_domain),POINTER :: d 
    369     TYPE(t_field),POINTER :: xyz_glo(:), xyz_loc(:), vertex_glo(:), vertex_loc(:) 
     369    TYPE(t_field),POINTER,SAVE :: xyz_glo(:), xyz_loc(:), vertex_glo(:), vertex_loc(:) 
    370370    REAL(rstd), POINTER :: xyz(:,:), vertex(:,:) 
    371371     
     
    382382       vertex(:,:) = xyz_v(:,:) 
    383383    END DO 
    384      
     384 
     385!$OMP BARRIER     
     386!$OMP MASTER 
    385387    CALL allocate_field_glo(xyz_glo, field_t, type_real, 3) 
    386388    CALL allocate_field_glo(vertex_glo, field_z, type_real, 3) 
     389 
    387390    CALL gather_field(xyz_loc, xyz_glo) 
     391    CALL gather_field(vertex_loc, vertex_glo) 
     392 
    388393    CALL bcast_field(xyz_glo) 
    389     CALL gather_field(vertex_loc, vertex_glo) 
    390394    CALL bcast_field(vertex_glo) 
    391     CALL deallocate_field(vertex_loc) 
    392     CALL deallocate_field(xyz_loc) 
    393395 
    394396    DO ind=1,ndomain_glo 
     
    409411    CALL deallocate_field_glo(vertex_glo) 
    410412    CALL deallocate_field_glo(xyz_glo) 
     413!$OMP END MASTER 
     414!$OMP BARRIER 
     415    CALL deallocate_field(vertex_loc) 
     416    CALL deallocate_field(xyz_loc) 
    411417 
    412418  END SUBROUTINE update_domain 
Note: See TracChangeset for help on using the changeset viewer.