Changeset 2967 for palm


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

bugfix: missing parallel cpp-directives added

Location:
palm/trunk/SOURCE
Files:
9 edited

Legend:

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

    r2817 r2967  
    2525! -----------------
    2626! $Id$
     27! bugfix: missing parallel cpp-directives added
     28!
     29! 2817 2018-02-19 16:32:21Z knoop
    2730! Preliminary gust module interface implemented
    2831!
     
    283286!-- For netCDF4/HDF5 output, data is written in parallel into one file.
    284287    IF ( netcdf_data_format < 5 )  THEN
     288#if defined( __parallel )
    285289       CALL check_open( 30 )
     290#endif
    286291       IF ( myid == 0 )  CALL check_open( 106+av*10 )
    287292    ELSE
  • palm/trunk/SOURCE/header.f90

    r2883 r2967  
    2525! -----------------
    2626! $Id$
     27! bugfix: missing parallel cpp-directives added
     28!
     29! 2883 2018-03-14 08:29:10Z Giersch
    2730! Format of the output of dt_dopr_listing (325) has been changed
    2831!
     
    422425        ONLY:  pcm_header
    423426
     427#if defined( __parallel )
    424428    USE pmc_handle_communicator,                                               &
    425429        ONLY:  pmc_get_model_info
     430#endif
    426431
    427432    USE pmc_interface,                                                         &
     
    608613    IF ( nested_run )  THEN
    609614
     615#if defined( __parallel )
    610616       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
    611617                          TRIM( nesting_datatransfer_mode )
     
    627633                             TRIM( cpl_name )
    628634       ENDDO
     635#endif
     636
    629637    ENDIF
    630638    WRITE ( io, 99 )
  • palm/trunk/SOURCE/lpm_init.f90

    r2954 r2967  
    2525! -----------------
    2626! $Id$
     27! nesting routine is only called if nesting is switched on
     28!
     29! 2954 2018-04-09 14:35:46Z schwenkel
    2730! Bugfix for particle initialization in case of ocean
    2831!
     
    288291        ONLY:  init_kernels
    289292
     293    USE pmc_interface,                                                         &
     294        ONLY: nested_run
     295
    290296    IMPLICIT NONE
    291297
     
    640646    ENDIF
    641647
    642     CALL pmcp_g_init
     648    IF ( nested_run )  CALL pmcp_g_init
    643649
    644650!
  • palm/trunk/SOURCE/lpm_write_exchange_statistics.f90

    r2841 r2967  
    2525! -----------------
    2626! $Id$
     27! nesting routine is only called if nesting is switched on
     28! bugfix: missing parallel cpp-directives added
     29!
     30! 2841 2018-02-27 15:02:57Z knoop
    2731! Bugfix: wrong placement of include 'mpif.h' corrected,
    2832! kinds module added and pegrid module scope restricted
     
    7680 SUBROUTINE lpm_write_exchange_statistics
    7781
    78 #if !defined( __mpifh )
     82#if defined( __parallel )  &&  !defined( __mpifh )
    7983    USE MPI
    8084#endif
     
    100104        ONLY:  comm2d, ierr, pleft, pright, psouth, pnorth
    101105
     106    USE pmc_interface,                                                         &
     107        ONLY: nested_run
     108
    102109    IMPLICIT NONE
    103110
    104 #if defined( __mpifh )
     111#if defined( __parallel )  &&  defined( __mpifh )
    105112    INCLUDE "mpif.h"
    106113#endif
     
    140147
    141148    IF ( number_of_particles > 0 ) THEN
    142         WRITE(9,*) 'number_of_particles ', number_of_particles, current_timestep_number + 1, simulated_time + dt_3d
     149        WRITE(9,*) 'number_of_particles ', number_of_particles,                &
     150                    current_timestep_number + 1, simulated_time + dt_3d
    143151    ENDIF
    144152
    145153#if defined( __parallel )
    146     CALL MPI_ALLREDUCE( number_of_particles, tot_number_of_particles, 1, MPI_INTEGER,      &
    147                                     MPI_SUM, comm2d, ierr)
     154    CALL MPI_ALLREDUCE( number_of_particles, tot_number_of_particles, 1,       &
     155                        MPI_INTEGER, MPI_SUM, comm2d, ierr )
    148156#else
    149157    tot_number_of_particles = number_of_particles
    150158#endif
    151159
    152     CALL pmcp_g_print_number_of_particles (simulated_time+dt_3d, tot_number_of_particles)
     160    IF ( nested_run )  THEN
     161       CALL pmcp_g_print_number_of_particles( simulated_time+dt_3d,            &
     162                                              tot_number_of_particles)
     163    ENDIF
    153164
    154165!
  • palm/trunk/SOURCE/parin.f90

    r2941 r2967  
    2525! -----------------
    2626! $Id$
     27! bugfix: missing parallel cpp-directives added
     28!
     29! 2941 2018-04-03 11:54:58Z kanani
    2730! Fix for spinup in case of restart run
    2831!
     
    691694!-- communicator.
    692695!-- First, set the default:
     696#if defined( __parallel )
    693697    CALL MPI_COMM_RANK( MPI_COMM_WORLD, global_id, ierr )
    694698    CALL MPI_COMM_SIZE( MPI_COMM_WORLD, global_procs, ierr )
     699#else
     700    global_id    = 0
     701    global_procs = 1
     702#endif
    695703    IF ( maximum_parallel_io_streams == -1  .OR.                               &
    696704         maximum_parallel_io_streams > global_procs )  THEN
  • palm/trunk/SOURCE/pmc_interface_mod.f90

    r2951 r2967  
    2525! -----------------
    2626! $Id$
     27! bugfix: missing parallel cpp-directives added
     28!
     29! 2951 2018-04-06 09:05:08Z kanani
    2730! Add log_point_s for pmci_model_configuration
    2831!
     
    745748    INTEGER(iwp) ::  ncpl   !<  number of nest domains
    746749
     750#if defined( __parallel )
    747751    CALL location_message( 'setup the nested model configuration', .FALSE. )
    748752    CALL cpu_log( log_point_s(79), 'pmci_model_config', 'start' )
     
    769773    CALL cpu_log( log_point_s(79), 'pmci_model_config', 'stop' )
    770774    CALL location_message( 'finished', .TRUE. )
     775#endif
    771776
    772777 END SUBROUTINE pmci_modelconfiguration
     
    33303335END SUBROUTINE pmci_set_array_pointer
    33313336
     3337
    33323338INTEGER FUNCTION get_number_of_childs ()
     3339
    33333340   IMPLICIT NONE
    33343341
     3342#if defined( __parallel )
    33353343   get_number_of_childs = SIZE( pmc_parent_for_child ) - 1
     3344#else
     3345   get_number_of_childs = 0
     3346#endif
    33363347
    33373348   RETURN
     3349
    33383350END FUNCTION get_number_of_childs
    33393351
     3352
    33403353INTEGER FUNCTION get_childid (id_index)
     3354
    33413355   IMPLICIT NONE
    33423356
    33433357   INTEGER,INTENT(IN)                 :: id_index
    33443358
     3359#if defined( __parallel )
    33453360   get_childid = pmc_parent_for_child(id_index)
     3361#else
     3362   get_childid = 0
     3363#endif
    33463364
    33473365   RETURN
     3366
    33483367END FUNCTION get_childid
     3368
    33493369
    33503370SUBROUTINE  get_child_edges (m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
  • 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
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r2964 r2967  
    2828! -----------------
    2929! $Id$
     30! bugfix: missing parallel cpp-directives added
     31!
     32! 2964 2018-04-12 16:04:03Z Giersch
    3033! Error message PA0491 has been introduced which could be previously found in
    3134! check_open. The variable numprocs_previous_run is only known in case of
     
    59645967        ENDIF
    59655968
     5969#if defined( __parallel )
    59665970        CALL MPI_BARRIER( comm2d, ierr )
     5971#endif
    59675972!         CALL radiation_write_debug_log( 'End of radiation_calc_svf (after mpi_barrier)' )
    59685973
     
    62236228      INTEGER(iwp)                           ::  ip           !< number of processor where gridbox reside
    62246229      INTEGER(iwp)                           ::  ig           !< 1D index of gridbox in global 2D array
    6225       INTEGER(MPI_ADDRESS_KIND)              ::  wdisp        !< RMA window displacement
    62266230      INTEGER(iwp)                           ::  wcount       !< RMA window item count
    62276231      INTEGER(iwp)                           ::  maxboxes     !< max no of CSF created
     
    62416245      REAL(wp), PARAMETER                    ::  grow_factor = 1.5_wp !< factor of expansion of grow arrays
    62426246
     6247#if defined( __parallel )
     6248      INTEGER(MPI_ADDRESS_KIND)              ::  wdisp        !< RMA window displacement
     6249#endif
    62436250     
    62446251      yxorigin(:) = origin(2:3)
  • palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90

    r2946 r2967  
    2525! -----------------
    2626! $Id$
     27! bugfix: missing parallel cpp-directives added
     28!
     29! 2946 2018-04-04 17:01:23Z suehring
    2730! Remove unused module load
    2831!
     
    125128    USE kinds
    126129
    127 #if !defined( __mpifh )
     130#if defined( __parallel )  &&  !defined( __mpifh )
    128131    USE MPI
    129132#endif
     
    138141    IMPLICIT NONE
    139142
    140 #if defined( __mpifh )
     143#if defined( __parallel )  &&  defined( __mpifh )
    141144    INCLUDE "mpif.h"
    142145#endif
Note: See TracChangeset for help on using the changeset viewer.