Ignore:
Timestamp:
09/24/20 18:17:18 (4 years ago)
Author:
dubos
Message:

trunk : simplify allocate_field -- tested on 4 GPUs (TBC)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/parallel/transfert_mpi.f90

    r1018 r1053  
    135135    if( request(1)%field_type /= field(1)%field_type ) call dynamico_abort( "init_message : field_type/request mismatch" ) 
    136136    field_type = request(1)%field_type 
    137  
    138     ! Set field%rval4d pointer to always use 4d array 
    139     do ind = 1, ndomain 
    140       if( field(ind)%ndim == 2 ) field(ind)%rval4d(1:size(field(ind)%rval2d,1),1:1,1:1) => field(ind)%rval2d 
    141       ! This is Fortran 2008 : can be avoided by using a subroutine with rval3d as a 1D dummy argument 
    142       ! (/!\ : using a subroutine might generate a temporary contiguous array) 
    143       if( field(ind)%ndim == 3 ) field(ind)%rval4d(1:size(field(ind)%rval3d,1), & 
    144         1:size(field(ind)%rval3d,2), 1:1) => field(ind)%rval3d 
    145     end do 
     137     
    146138    dim3 = size(field(1)%rval4d,2) 
    147139    dim4 = size(field(1)%rval4d,3) 
Note: See TracChangeset for help on using the changeset viewer.