Ignore:
Timestamp:
Apr 13, 2018 11:22:08 AM (3 years ago)
Author:
raasch
Message:

bugfix: missing parallel cpp-directives added

File:
1 edited

Legend:

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

    r2884 r2967  
    2626! -----------------!
    2727! $Id$
     28! bugfix: missing parallel cpp-directives added
     29!
     30! 2884 2018-03-14 08:33:20Z scharf
    2831! B: corrected KIND of variable "parsize" for some MPI calls
    2932!
     
    4750   USE, INTRINSIC ::  ISO_C_BINDING
    4851
    49 #if !defined( __mpifh )
     52#if defined( __parallel )  &&  !defined( __mpifh )
    5053   USE MPI
    5154#endif
     
    7578   USE lpm_pack_and_sort_mod
    7679
     80   USE lpm_exchange_horiz_mod,                                                 &
     81       ONLY: realloc_particles_array
     82
     83#if defined( __parallel )
    7784   USE pmc_general,                                                            &
    7885       ONLY: pedef
     
    97104       ONLY: pmc_send_to_parent, pmc_recv_from_child
    98105
    99    USE lpm_exchange_horiz_mod,                                                 &
    100        ONLY: realloc_particles_array
     106#endif
    101107
    102108   IMPLICIT NONE
    103109
    104 #if defined( __mpifh )
     110#if defined( __parallel )  &&  defined( __mpifh )
    105111   INCLUDE "mpif.h"
    106112#endif
     
    181187 
    182188    INTEGER(iwp) ::  nr_childs !< Number of child models of the current model
     189
     190#if defined( __parallel )
    183191
    184192    nr_childs = get_number_of_childs()
     
    216224    ENDIF
    217225
     226#endif
    218227 END SUBROUTINE pmcp_g_init
    219228!------------------------------------------------------------------------------!
     
    237246   
    238247    INTEGER ::  parsize !<
     248    TYPE(C_PTR), SAVE ::  ptr !<
     249   
     250    TYPE(particle_type),DIMENSION(:),POINTER ::  win_buffer !<
     251   
     252    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
     253
     254#if defined( __parallel )
    239255    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
    240256    INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize !<
    241     TYPE(C_PTR), SAVE ::  ptr !<
    242    
    243     TYPE(particle_type),DIMENSION(:),POINTER ::  win_buffer !<
    244    
    245     INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
    246257
    247258!
     
    292303    ENDIF
    293304
     305#endif
    294306 END SUBROUTINE pmcp_g_alloc_win
     307
     308
    295309!------------------------------------------------------------------------------!
    296310! Description:
     
    313327   
    314328    INTEGER ::  parsize !<
     329
     330#if defined( __parallel )
     331    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
     332
    315333    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
    316334    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp !<
    317    
    318     TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
    319335
    320336    IF ( cpl_id > 1 )  THEN
     
    361377    ENDIF
    362378
     379#endif
    363380 END SUBROUTINE pmcp_c_get_particle_from_parent
     381
     382
    364383!------------------------------------------------------------------------------!
    365384! Description:
     
    388407   
    389408    INTEGER ::  parsize !<
    390     INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
    391     INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp !<
    392409   
    393410    REAL(wp) ::  eps=0.00001 !< used in calculations to avoid rounding errors
     
    395412    REAL(wp) ::  yy          !< number of fine grid cells inside a coarse grid cell in y-direction
    396413
     414 !   TYPE(particle_type) ::  dummy_part !< dummy particle (needed for size calculations)
     415
     416#if defined( __parallel )
    397417    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
    398    
    399  !   TYPE(particle_type) ::  dummy_part !< dummy particle (needed for size calculations)
     418
     419    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
     420    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp !<
    400421   
    401422   
     
    473494    ENDIF
    474495
     496#endif
    475497 END SUBROUTINE pmcp_c_send_particle_to_parent
     498
     499
    476500!------------------------------------------------------------------------------!
    477501! Description:
     
    522546    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
    523547   
     548#if defined( __parallel )
    524549    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
    525550
     
    612637    lfirst = .FALSE.
    613638
     639#endif
    614640 END SUBROUTINE pmcp_p_fill_particle_win
     641
    615642 
    616643!------------------------------------------------------------------------------!
     
    621648!------------------------------------------------------------------------------!
    622649 SUBROUTINE pmcp_p_empty_particle_win
     650
    623651    IMPLICIT NONE
    624652
     
    629657    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
    630658
     659#if defined( __parallel )
    631660    DO  m = 1, get_number_of_childs()
    632661
     
    651680    ENDDO
    652681
     682#endif
    653683 END SUBROUTINE pmcp_p_empty_particle_win
    654  
     684
     685
    655686!------------------------------------------------------------------------------!
    656687! Description:
     
    689720    REAL(wp) ::  z          !< particle position
    690721   
     722#if defined( __parallel )
    691723    DO  m = 1, get_number_of_childs()
    692724       CALL get_child_edges( m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
     
    725757    ENDDO
    726758
     759#endif
    727760 END SUBROUTINE pmcp_p_delete_particles_in_fine_grid_area
     761
     762
    728763!------------------------------------------------------------------------------!
    729764! Description:
     
    755790    INTEGER(iwp),DIMENSION(2) ::  ivals !< integer value to be send
    756791   
    757 
     792#if defined( __parallel )
    758793    child_nr_particles = 0
    759794    IF ( myid == 0 )  THEN
     
    779814    ENDIF
    780815
     816#endif
    781817 END SUBROUTINE pmcp_g_print_number_of_particles
     818
    782819
    783820!------------------------------------------------------------------------------!
     
    810847    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  tmp_particles_d !<
    811848
     849#if defined( __parallel )
    812850    with_copy_lo = .FALSE.
    813851    IF ( PRESENT( with_copy ) ) with_copy_lo = with_copy
     
    843881    ENDIF
    844882
     883#endif
    845884 END SUBROUTINE check_and_alloc_coarse_particle
     885
    846886
    847887!------------------------------------------------------------------------------!
     
    873913    REAL(wp) ::  zc  !< child z coordinate
    874914
     915#if defined( __parallel )
    875916!
    876917!-- Child domain boundaries in the parent index space
     
    914955    ENDDO
    915956
     957#endif
    916958 END SUBROUTINE c_copy_particle_to_child_grid
     959
     960
    917961!------------------------------------------------------------------------------!
    918962! Description:
     
    949993    REAL(iwp) ::  z       !< z coordinate
    950994
     995#if defined( __parallel )
    951996!
    952997!-- Child domain boundaries in the parent index space
     
    10251070   CALL lpm_sort_in_subboxes
    10261071
     1072#endif
    10271073 END SUBROUTINE c_copy_particle_to_coarse_grid
     1074
     1075
    10281076!------------------------------------------------------------------------------!
    10291077! Description:
     
    10541102    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
    10551103
     1104#if defined( __parallel )
    10561105    buf_shape(1) = max_nr_particle_in_rma_win
    10571106    CALL C_F_POINTER( buf_ptr(m), particle_in_win , buf_shape )
     
    10901139       ENDDO
    10911140    ENDDO
    1092    
     1141
     1142#endif
    10931143 END SUBROUTINE p_copy_particle_to_org_grid
    10941144
Note: See TracChangeset for help on using the changeset viewer.