Ignore:
Timestamp:
Feb 15, 2018 9:55:58 AM (7 years ago)
Author:
schwenkel
Message:

Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE

File:
1 edited

Legend:

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

    r2806 r2809  
    2525! -----------------
    2626! $Id$
     27! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
     28!
     29! 2806 2018-02-14 17:10:37Z thiele
    2730! Bugfixing Write statements
    2831!
     
    223226!       routine
    224227! @todo Data transfer of qc and nc is prepared but not activated
    225 ! @todo determine c_sizeof(childgrid(1)) for gfortran
    226228!------------------------------------------------------------------------------!
    227229 MODULE pmc_interface
     
    928930     
    929931       CALL MPI_BCAST( nz_cl, 1, MPI_INTEGER, 0, comm2d, ierr )
    930 #if defined( __gfortran )
    931 !
    932 !--    For the gfortran compiler the function c_sizeof produces strange erros
    933 !--    which can probably be attributed to an error in the gfortran compiler.
    934 !--    Therefore the particle size in bytes is set manually. Attention: A
    935 !--    change of the size of the particle type requires an adjustment of
    936 !--    this value
    937 !--    TODO: determine c_sizeof(childgrid(1)) as gfortran can not handle the
    938 !--    function
    939 #else
    940 !     
    941 !--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit
    942 !--    variables in structure particle_type (due to the calculation of par_size).
    943 !--    Please note, in case of 1D decomposition ( only 1 core along
    944 !--    x dimension), array trlp is not allocated, leading to program crash.
    945 !--    Hence, check if array is allocated and allocate it temporarily if
    946 !--    if required.
    947        CALL MPI_BCAST( childgrid(m), c_sizeof(childgrid(1)), MPI_BYTE, 0, comm2d, ierr )
    948 #endif
    949 
     932
     933       CALL MPI_BCAST( childgrid(m), STORAGE_SIZE(childgrid(1))/8, MPI_BYTE, 0, comm2d, ierr )
    950934!
    951935!--    TO_DO: Klaus: please give a comment what is done here
Note: See TracChangeset for help on using the changeset viewer.