Ignore:
Timestamp:
Aug 3, 2017 2:26:02 PM (4 years ago)
Author:
schwenkel
Message:

Bugfix for gfortran

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/lpm_exchange_horiz.f90

    r2305 r2330  
    2525! -----------------
    2626! $Id$
     27! Bugfix: Also for gfortran compilable, function c_sizeof is not used.
     28!
     29! 2305 2017-07-06 11:18:47Z hoffmann
    2730! Improved calculation of particle IDs.
    2831!
     
    406409    ENDDO
    407410
     411#if defined( __gfortran )
     412!
     413!--    For the gfortran compiler the function c_sizeof produces strange erros
     414!--    which can probably be attributed to an error in the gfortran compiler.
     415!--    Therefore the particle size in bytes is set manually. Attention: A
     416!--    change of the size of the particle type requires an adjustment of
     417!--    this value
     418       par_size = 184
     419#else
     420!     
     421!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
     422!--    variables in structure particle_type (due to the calculation of par_size)
     423       par_size = c_sizeof(trlp(1))
     424#endif
     425
     426
    408427!
    409428!-- Allocate arrays required for north-south exchange, as these
     
    424443
    425444       ALLOCATE(rvrp(MAX(1,trrp_count_recv)))
    426 !     
    427 !--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
    428 !--    variables in structure particle_type (due to the calculation of par_size)
    429        par_size = c_sizeof(trlp(1))
     445
    430446       CALL MPI_SENDRECV( trlp, max(1,trlp_count)*par_size, MPI_BYTE,&
    431447                          pleft, 1, rvrp,                            &
     
    447463!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
    448464!--    variables in structure particle_type (due to the calculation of par_size)
    449        par_size = c_sizeof(trrp(1))
    450465       CALL MPI_SENDRECV( trrp, max(1,trrp_count)*par_size, MPI_BYTE,&
    451466                          pright, 1, rvlp,                           &
     
    655670!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
    656671!--    variables in structure particle_type (due to the calculation of par_size)
    657        par_size = c_sizeof(trsp(1))
    658672       CALL MPI_SENDRECV( trsp, trsp_count*par_size, MPI_BYTE,      &
    659673                          psouth, 1, rvnp,                             &
     
    675689!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
    676690!--    variables in structure particle_type (due to the calculation of par_size)
    677        par_size = c_sizeof(trnp(1))
    678691       CALL MPI_SENDRECV( trnp, trnp_count*par_size, MPI_BYTE,      &
    679692                          pnorth, 1, rvsp,                          &
Note: See TracChangeset for help on using the changeset viewer.